Commit Graph

39502 Commits

Author SHA1 Message Date
Linus Torvalds
4b820e167b Revert "ALSA: usb-audio: Reduce latency at playback start"
This reverts commit 9ce650a75a.

This commit causes watchdog lockups on my machine, and while I have no
idea what the cause is, it bisected right to this commit, and reverting
the change promptly fixes it.

At least occasionally one of the watchdog call traces was

  Call Trace:
    _raw_spin_lock_irqsave+0x35/0x40
    snd_pcm_period_elapsed+0x1b/0xa0 [snd_pcm]
    snd_usb_endpoint_start+0x1a0/0x3c0 [snd_usb_audio]
    start_endpoints+0x23/0x90 [snd_usb_audio]
    snd_usb_substream_playback_trigger+0x7b/0x1a0 [snd_usb_audio]
    snd_pcm_common_ioctl+0x1c44/0x2360 [snd_pcm]
    snd_pcm_ioctl+0x2e/0x40 [snd_pcm]
    __se_sys_ioctl+0x72/0xc0
    do_syscall_64+0x4c/0xa0
    entry_SYSCALL_64_after_hwframe+0x44/0xae

so presumably it's a locking error on that substream spinlock that
snd_pcm_period_elapsed() takes.  But at this point I just want to have a
working system so that I can continue the merge window work tomorrow.

Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-07-02 22:05:52 -07:00
Linus Torvalds
d6b63b5b7d sound updates for 5.14
As the diffstat scatters over the tree, we've got many tree-wide
 small changes, but also got quite a few intrusive changes in the
 core side.  The only ABI-visible core change is the new rawmidi
 framing mode support while others are kernel-internal, mostly code
 refactoring and/or nice improvements.
 
 Here are some highlights:
 
 Core:
 - A new framing access mode for rawmidi to get timestamps
 - Cleanup / refactoring of buffer memory management helper code
 - Support for automatic negotiation of ASoC DAI formats
 - Revival of software suspend for PCM and control core, as a
   preliminary work for PCI BAR rescan support
 
 ASoC:
 - Accessory detection support for several Qualcomm parts
 - Support for IEC958 control with hdmi-codec
 - Merging of Tegra machine drivers into a single driver
 - Support for AmLogic SM1 TOACODEC, Intel AlderLake-M, several NXP
   i.MX8 variants, NXP TFA1 and TDF9897, Rockchip RK817, Qualcomm
   Quinary MI2S, Texas Instruments TAS2505
 
 USB-audio:
 - Reduction of latency at playback start
 - Code cleanup / fixes of usx2y driver
 - Scarlett2 mixer code fixes and enhancements
 - Quirks for Ozone and Denon devices
 
 HD-audio:
 - A few quirks for HP and ASUS machines
 - Display power management fixes
 
 Others:
 - FireWire code refactoring and enhancements
 - Tree-wide trivial coding-style fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmDezZ8OHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE8kxhAAhWyQBU9HX7xo/132J0SsP0tqT0NhePr217T7
 RSmRre3kD8iNDtpe9P9eziyN5q5TB8+InY52yUiDiWdSxCHOBDKBPwzzDeVRdOGg
 /BdQqCtEAtdgzsnPEsXxvK+y3LayLwlkCyN1kMLCl4KGFfMg8fQgMbXobEOfyKwT
 r23Xgbkb8jIFyjEAmvJnbvPXjkUjv2ew0+RB+cqV80m9h+KdNN/k/8+0wdWaQBEd
 6oRSE8ApYclgyLf4TYCkLAwTP3NQ8SuvYSuZ9tFGy7vjz7l69xPWS/6ndbfrJvEP
 pO615dYWKTWQKi2SjStnjFUH7ODirbPZzyDqU9tvEAGbKj0l07LNXy0JrbwJ8VB2
 JBfsdTlmSwHcAXmj0JB7IhflmG96W9azUKf1a8YNJLw7UgHoXjDZC0NFtOanaB7x
 PEdf+27Ty1pZaNbtJpwdzEyc06UNA8dNRAr6FsSMphRTnBBzcUz2uEAfWbevS7Yl
 Q5IOZd2lqKIUHPB6j2r0iDiCKScXzlHVhFzOLj3vHS4L8vjfbVshxkIkSY0HeA9r
 HINbkby2mpk901oyqaFwTLkoatXBk5zDX2m2ow7rQLLUIdF0hWBXrE5Xrl3c/T/x
 aFXuDxJfZm4YibJiBAOO5xv03DzVBNJz01E020oyum2m0NHhB1xD3RK428pcjshV
 zgXJaZg=
 =IN9G
 -----END PGP SIGNATURE-----

Merge tag 'sound-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "As the diffstat scatters over the tree, we've got many tree-wide small
  changes, but also got quite a few intrusive changes in the core side.
  The only ABI-visible core change is the new rawmidi framing mode
  support while others are kernel-internal, mostly code refactoring
  and/or nice improvements.

  Here are some highlights:

  Core:
   - A new framing access mode for rawmidi to get timestamps
   - Cleanup / refactoring of buffer memory management helper code
   - Support for automatic negotiation of ASoC DAI formats
   - Revival of software suspend for PCM and control core, as a
     preliminary work for PCI BAR rescan support

  ASoC:
   - Accessory detection support for several Qualcomm parts
   - Support for IEC958 control with hdmi-codec
   - Merging of Tegra machine drivers into a single driver
   - Support for AmLogic SM1 TOACODEC, Intel AlderLake-M, several NXP
     i.MX8 variants, NXP TFA1 and TDF9897, Rockchip RK817, Qualcomm
     Quinary MI2S, Texas Instruments TAS2505

  USB-audio:
   - Reduction of latency at playback start
   - Code cleanup / fixes of usx2y driver
   - Scarlett2 mixer code fixes and enhancements
   - Quirks for Ozone and Denon devices

  HD-audio:
   - A few quirks for HP and ASUS machines
   - Display power management fixes

  Others:
   - FireWire code refactoring and enhancements
   - Tree-wide trivial coding-style fixes"

* tag 'sound-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (594 commits)
  ALSA: usb-audio: scarlett2: Fix for loop increment in scarlett2_usb_get_config
  ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 630 G8
  ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 445 G8
  ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 450 G8
  ALSA: hda/realtek - Add ALC285 HP init procedure
  ALSA: hda/realtek - Add type for ALC287
  ALSA: scarlett2: Fix scarlett2_*_ctl_put() return values again
  ALSA: scarlett2: Fix pad count for 18i8 Gen 3
  ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook 830 G8 Notebook PC
  ALSA: firewire-lib: Fix 'amdtp_domain_start()' when no AMDTP_OUT_STREAM stream is found
  ASoC: qcom: lpass-cpu: mark IRQ_CLEAR register as volatile and readable
  ALSA: hda: Release codec display power during shutdown/reboot
  ALSA: hda: Release controller display power during shutdown/reboot
  ALSA: hda/realtek: Apply LED fixup for HP Dragonfly G1, too
  ASoC: fsl: remove unnecessary oom message
  ASoC: tlv320aic32x4: dt-bindings: add TAS2505 to compatible
  ASoC: tlv320aic32x4: add support for TAS2505
  ASoC: tlv320aic32x4: add type to device private data struct
  ASoC: tegra30: ahub: Use devm_platform_get_and_ioremap_resource()
  ASoC: tegra: tegra210_admaif: Use devm_platform_get_and_ioremap_resource()
  ...
2021-07-02 15:25:23 -07:00
Linus Torvalds
514798d365 This round has a diffstat dominated by Qualcomm clk drivers. Honestly though
that's just a bunch of data so the diffstat reflects that. Looking beyond that
 there's just a bunch of updates all around in various clk drivers. Renesas and
 NXP (for i.MX) are two SoC vendors that have a lot of patches in here. Overall
 the driver changes look to be mostly enabling more clks and non-critical fixes
 that we could hold until the next merge window.
 
 I'm especially excited about the series from Arnd that graduates clkdev to be
 the only implementation of clk_get() and clk_put(). That's a good step in the
 right direction to migreate eveerything over to the common clk framework. Now
 we don't have to worry about clkdev specific details, they're just part of the
 clk API now.
 
 Core:
  - clkdev is now the only option, i.e. clk_get()/clk_put() is implemented in
    only one place in the kernel instead of in drivers/clk/clkdev.c and in
    architectures that want their own implementation
 
 New Drivers:
  - Texas Instruments' LMK04832 Ultra Low-Noise JESD204B Compliant Clock
    Jitter Cleaner With Dual Loop PLLs
  - Qualcomm MDM9607 GCC
  - Qualcomm SC8180X display clks
  - Qualcomm SM6125 GCC
  - Qualcomm SM8250 CAMCC (camera)
  - Renesas RZ/G2L SoC
  - Hisilicon hi3559A SoC
 
 Updates:
  - Stop using clock-output-names in ST clk drivers (yay!)
  - Support secure mode of STM32MP1 SoCs
  - Improve clock support for Actions S500 SoC
  - duty cycle setting support on qcom clks
  - Add TI am33xx spread spectrum clock support
  - Use determine_rate() for the Amlogic pll ops instead of round_rate()
  - Restrict Amlogic gp0/1 and audio plls range on g12a/sm1
  - Improve Amlogic axg-audio controller error on deferral
  - Add NNA clocks on Amlogic g12a
  - Reduce memory footprint of Rockchip PLL rate tables
  - A fix for the newly added Rockchip rk3568 clk driver
  - Exported clock for the newly added Rockchip video decoder
  - Remove audio ipg clock from i.MX8MP
  - Remove deprecated legacy clock binding for i.MX SCU clock driver
  - Use common clk-imx8qxp for both i.MX8QXP and i.MX8QM
  - Add multiple clocks to clk-imx8qxp driver (enet, hdmi, lcdif, audio,
    parallel interface)
  - Add dedicated clock ops for i.MX paralel interface
  - Different fixes for clocks controlled by ATF on i.MX SoCs
  - Add A53/A72 frequency scaling support i.MX clk-scu driver
  - Add special case for DCSS clock on suspend for i.MX clk-scu driver
  - Add parent save/restore on suspend/resume to i.MX clk-scu driver
  - Skip runtime PM enablement for CPU clocks in i.MX clk-scu driver
  - Remove the sys1_pll/sys2_pll clock gates for i.MX8MQ and their
    bindings
  - Tegra clk driver no longer deasserts resets on clk_enable as it
    gets in the way of certain power-up sequences
  - Fix compile testing for Tegra clk driver
  - One patch to fix a divider on the Allwinner v3s Audio PLL
  - Add support for CPU core clock boost modes on Renesas R-Car Gen3
  - Add ISPCS (Image Signal Processor) clocks on Renesas R-Car V3U
  - Switch SH/R-Mobile and R-Car "DIV6" clocks to .determine_rate()
    and improve support for multiple parents
  - Switch Renesas RZ/N1 divider clocks to .determine_rate()
  - Add ZA2 (Audio Clock Generator) clock on Renesas R-Car D3
  - Convert ar7 to common clk framework
  - Convert ralink to common clk framework
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEE9L57QeeUxqYDyoaDrQKIl8bklSUFAmDbu3sRHHNib3lkQGtl
 cm5lbC5vcmcACgkQrQKIl8bklSV+OA/9EEV3uuauFsxVm8ySX4T8amHAzE98asEX
 XldxMqBuGNnlqJn3A3LeGISKKafaRMkL/7xqBnTi9ZycDy1WRi2SiAKLTDoJCmi7
 ES32EBCO1O9D5uo4mYFsYgHUaxFmE+4tQbtDCttVt59yZEiiNPz0Lm8tWz5yuDzX
 IwCN8HrNShyL4dykTRUDuUkqrTg9sSqSvdG+XcyI24pgLtBWvJU32wIFfLN+/n9C
 JSyYwzHkajoeuv5kpAJ1IV/tzZgy77xQHunsatJWz1qJ1J2eFADWI2p3NVf88N21
 5Mw5xvikMJZ5Xq8pdZKiyEQOFfcxN/+k7hfc6eq3SDpbkaHPti9CX2rv9Uck6rdh
 Bigixsx9IHbQ+1CJAXZxcAJma/GwzoWW1irqzTQoChYgwlJIyPijFqbuJxqS4P0d
 9sEp0WvbdAEgnktiqs7gphki7Q04y2gUD3LKD6hz5sL0vZ+Dy1DY6olkWJefGrHo
 FDnEGf6gsP3vvvlJt5G2zeZQ/NzMKkfaIGLj/1hTtoLMaxpg282cmPXVUxD+ripW
 /GG/z14RdaHQXeMXduo+MeK5qUsO6LspnYown54IWilOOo1m/rfbun3yAFJaphG1
 ZQB+JDfeH8Cv6AYbNwbEpXyXyj2Rz5fGQjA31+97fCCxykZ+suBQkWqK/lUCmTyf
 ofwokRnKiYY=
 =YnCF
 -----END PGP SIGNATURE-----

Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk updates from Stephen Boyd:
 "This round has a diffstat dominated by Qualcomm clk drivers. Honestly
  though that's just a bunch of data so the diffstat reflects that.
  Looking beyond that there's just a bunch of updates all around in
  various clk drivers. Renesas and NXP (for i.MX) are two SoC vendors
  that have a lot of patches in here.

  Overall the driver changes look to be mostly enabling more clks and
  non-critical fixes that we could hold until the next merge window.

  I'm especially excited about the series from Arnd that graduates
  clkdev to be the only implementation of clk_get() and clk_put().
  That's a good step in the right direction to migreate eveerything over
  to the common clk framework. Now we don't have to worry about clkdev
  specific details, they're just part of the clk API now.

  Core:
   - clkdev is now the only option, i.e. clk_get()/clk_put() is
     implemented in only one place in the kernel instead of in
     drivers/clk/clkdev.c and in architectures that want their own
     implementation

  New Drivers:
   - Texas Instruments' LMK04832 Ultra Low-Noise JESD204B Compliant
     Clock Jitter Cleaner With Dual Loop PLLs
   - Qualcomm MDM9607 GCC
   - Qualcomm SC8180X display clks
   - Qualcomm SM6125 GCC
   - Qualcomm SM8250 CAMCC (camera)
   - Renesas RZ/G2L SoC
   - Hisilicon hi3559A SoC

  Updates:
   - Stop using clock-output-names in ST clk drivers (yay!)
   - Support secure mode of STM32MP1 SoCs
   - Improve clock support for Actions S500 SoC
   - duty cycle setting support on qcom clks
   - Add TI am33xx spread spectrum clock support
   - Use determine_rate() for the Amlogic pll ops instead of
     round_rate()
   - Restrict Amlogic gp0/1 and audio plls range on g12a/sm1
   - Improve Amlogic axg-audio controller error on deferral
   - Add NNA clocks on Amlogic g12a
   - Reduce memory footprint of Rockchip PLL rate tables
   - A fix for the newly added Rockchip rk3568 clk driver
   - Exported clock for the newly added Rockchip video decoder
   - Remove audio ipg clock from i.MX8MP
   - Remove deprecated legacy clock binding for i.MX SCU clock driver
   - Use common clk-imx8qxp for both i.MX8QXP and i.MX8QM
   - Add multiple clocks to clk-imx8qxp driver (enet, hdmi, lcdif,
     audio, parallel interface)
   - Add dedicated clock ops for i.MX paralel interface
   - Different fixes for clocks controlled by ATF on i.MX SoCs
   - Add A53/A72 frequency scaling support i.MX clk-scu driver
   - Add special case for DCSS clock on suspend for i.MX clk-scu driver
   - Add parent save/restore on suspend/resume to i.MX clk-scu driver
   - Skip runtime PM enablement for CPU clocks in i.MX clk-scu driver
   - Remove the sys1_pll/sys2_pll clock gates for i.MX8MQ and their
     bindings
   - Tegra clk driver no longer deasserts resets on clk_enable as it
     gets in the way of certain power-up sequences
   - Fix compile testing for Tegra clk driver
   - One patch to fix a divider on the Allwinner v3s Audio PLL
   - Add support for CPU core clock boost modes on Renesas R-Car Gen3
   - Add ISPCS (Image Signal Processor) clocks on Renesas R-Car V3U
   - Switch SH/R-Mobile and R-Car "DIV6" clocks to .determine_rate() and
     improve support for multiple parents
   - Switch Renesas RZ/N1 divider clocks to .determine_rate()
   - Add ZA2 (Audio Clock Generator) clock on Renesas R-Car D3
   - Convert ar7 to common clk framework
   - Convert ralink to common clk framework"

* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (161 commits)
  clk: zynqmp: Handle divider specific read only flag
  clk: zynqmp: Use firmware specific mux clock flags
  clk: zynqmp: Use firmware specific divider clock flags
  clk: zynqmp: Use firmware specific common clock flags
  clk: lmk04832: Use of match table
  clk: lmk04832: Depend on SPI
  clk: stm32mp1: new compatible for secure RCC support
  dt-bindings: clock: stm32mp1 new compatible for secure rcc
  dt-bindings: reset: add MCU HOLD BOOT ID for SCMI reset domains on stm32mp15
  dt-bindings: reset: add IDs for SCMI reset domains on stm32mp15
  dt-bindings: clock: add IDs for SCMI clocks on stm32mp15
  reset: stm32mp1: remove stm32mp1 reset
  clk: hisilicon: Add clock driver for hi3559A SoC
  dt-bindings: Document the hi3559a clock bindings
  clk: si5341: Add sysfs properties to allow checking/resetting device faults
  clk: si5341: Add silabs,iovdd-33 property
  clk: si5341: Add silabs,xaxb-ext-clk property
  clk: si5341: Allow different output VDD_SEL values
  clk: si5341: Update initialization magic
  clk: si5341: Check for input clock presence and PLL lock on startup
  ...
2021-07-01 13:26:16 -07:00
Nathan Chancellor
9a7b7ec3c6 ALSA: usb-audio: scarlett2: Fix for loop increment in scarlett2_usb_get_config
Clang warns:

sound/usb/mixer_scarlett_gen2.c:1189:32: warning: expression result
unused [-Wunused-value]
                        for (i = 0; i < count; i++, (u16 *)buf++)
                                                    ^      ~~~~~
1 warning generated.

It appears the intention was to cast the void pointer to a u16 pointer
so that the data could be iterated through like an array of u16 values.
However, the cast happens after the increment because a cast is an
rvalue, whereas the post-increment operator only works on lvalues, so
the loop does not iterate as expected. This is not a bug in practice
because count is not greater than one at the moment but this could
change in the future so this should be fixed.

Replace the cast with a temporary variable of the proper type, which is
less error prone and fixes the iteration. Do the same thing for the
'u8 *' below this if block.

Fixes: ac34df733d ("ALSA: usb-audio: scarlett2: Update get_config to do endian conversion")
Link: https://github.com/ClangBuiltLinux/linux/issues/1408
Acked-by: Geoffrey D. Bennett <g@b4.vu>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20210627051202.1888250-1-nathan@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-01 19:11:30 +02:00
Andy Chi
fb3acdb2ba ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 630 G8
The HP ProBook 630 G8 using ALC236 codec which using 0x02 to
control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210701091417.9696-3-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-01 19:08:29 +02:00
Andy Chi
a3b7f9b8fa ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 445 G8
The HP ProBook 445 G8 using ALC236 codec.
COEF index 0x34 bit 5 is used to control the playback mute LED, but the
microphone mute LED is controlled using pin VREF instead of a COEF index.
Therefore, add a quirk to make it works.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210701091417.9696-2-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-01 19:08:02 +02:00
Andy Chi
2b70b264d3 ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 450 G8
The HP ProBook 450 G8 using ALC236 codec which using 0x02 to
control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210701091417.9696-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-01 19:07:18 +02:00
Kailang Yang
3c24e48330 ALSA: hda/realtek - Add ALC285 HP init procedure
ALC285 headphone initial procedure.
It also could suitable for ALC215/ALC289/ALC225/ALC295/ALC299.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/2b7539c3e96f41a4ab458d53ea5f5784@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-01 19:05:58 +02:00
Kailang Yang
99cee034c2 ALSA: hda/realtek - Add type for ALC287
Add independent type for ALC287.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/2b7539c3e96f41a4ab458d53ea5f5784@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-01 19:05:06 +02:00
Takashi Iwai
50de417b7a ASoC: Updates for v5.14
This release sees a nice new feature in the core from Morimoto-san,
 support for automatic negotiation of DAI formats between the components
 on the link.  Otherwise the big highlight was the merging of the Tegra
 machine drivers into a single driver avoiding a bunch of duplication.
 
  - Support for automatic negotiation of DAI formats.
  - Accessory detection support for several Qualcomm parts.
  - Support for IEC958 control with hdmi-codec.
  - Merging of Tegra machine drivers into a single driver.
  - Support for AmLogic SM1 TOACODEC, Intel AlderLake-M, several NXP
    i.MX8 variants, NXP TFA1 and TDF9897, Rockchip RK817, Qualcomm
    Quinary MI2S, Texas Instruments TAS2505
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmDZzCgACgkQJNaLcl1U
 h9DmKAf+IhmeYLxMuSe7uC/BZHQN1PFFHDb9rNyznqYD0kCzgfqvt7RIbbpOB83g
 Rw6+SnKWq1k2LOtJc7nVfFXfCrWTCH/GkqH22YoDWUjc2ZLTLE4V/dZhrYzggkjz
 qE4bOUNBHUyqO0Xir1iMFCdr9V4+Fc5iYT83FccHB+hF+o8GNcU0MkovUKgiTeuz
 EChmQlfsOHxKU6DbRUQrO30plSTaCQZ9CHAOXlGRQnGaYH/99ecav2O7sM1F4SrI
 uHR544UuJUiZ26PcZ5M66GvuwAOoSw/v6Tr/OykBulgFUX8wafDcHq7vGK5A6WCE
 qGwWpe12E+veMsJjn7wzifryaxJ9zQ==
 =F1Zu
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v5.14

This release sees a nice new feature in the core from Morimoto-san,
support for automatic negotiation of DAI formats between the components
on the link.  Otherwise the big highlight was the merging of the Tegra
machine drivers into a single driver avoiding a bunch of duplication.

 - Support for automatic negotiation of DAI formats.
 - Accessory detection support for several Qualcomm parts.
 - Support for IEC958 control with hdmi-codec.
 - Merging of Tegra machine drivers into a single driver.
 - Support for AmLogic SM1 TOACODEC, Intel AlderLake-M, several NXP
   i.MX8 variants, NXP TFA1 and TDF9897, Rockchip RK817, Qualcomm
   Quinary MI2S, Texas Instruments TAS2505
2021-07-01 08:36:12 +02:00
Geoffrey D. Bennett
459d2320dc ALSA: scarlett2: Fix scarlett2_*_ctl_put() return values again
Mixer control put callbacks should return 1 if the value is changed.
Fix the mute, air, phantom, direct monitor, speaker switch, talkback,
and MSD controls accordingly.

Fix scarlett2_speaker_switch_enable() to not ignore the return value
of scarlett2_sw_hw_change().

Reported-by: Aaron Wolf <aaron@wolftune.com>
Tested-by: Aaron Wolf <aaron@wolftune.com>
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/76643f7ac81aef93351122d07881e30d51dcb1b9.1624798436.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-01 08:34:39 +02:00
Geoffrey D. Bennett
fe9a23a6cc ALSA: scarlett2: Fix pad count for 18i8 Gen 3
The 18i8 Gen 3 has 4 inputs with a pad control, not 2. Update
s18i8_gen3_info.pad_input_count.

Reported-by: Aaron Wolf <aaron@wolftune.com>
Tested-by: Aaron Wolf <aaron@wolftune.com>
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/29a6ce412a42373daab7c96c395560461fcf08c6.1624798436.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-01 08:34:28 +02:00
Takashi Iwai
498386d1c4 Merge branch 'for-next' into for-linus 2021-07-01 08:34:15 +02:00
Linus Torvalds
69609a91ac spi: Updates for v5.14
The biggest single thing in the diffstat here is a massive overhaul of
 the PXA2xx driver from Andy Shevchenko (the IP is still in use on modern
 Intel systems), though we also have quite a lot of core work as well:
 
  - Better support for mixing native and GPIO chip selects also from
    Andy.
  - Support for devices with multiple chip selects from Sebastian
    Reichel.
  - Helper for polling status registers in spi-mem from Patrice Chotard.
  - Support for Renesas RZ/N1 and Rockchip RV1126.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmDZ1XMACgkQJNaLcl1U
 h9Cw4Qf/dD9K8Psa6oBLrJBVH9L8Bl8UN36UyrZgnZP/cydlPp3MkLpwg9K/mwPV
 zqYEm/WcI5mzZ7+RxVwK3fchEBFtlKcIGe2lvfqGBCsVGW8NMtoaiSsCtJ9NoKLk
 Q3cjYbERql26sl7fyEx4tCEMGHsRP8XuToyPCm4htSayY6Wh7dsCLpsDPqszeK/c
 KnGQItG1hGkXJmy4A47AZqdJlRjeoNxdfnwkE0dxihDmzirE86r4x+QqTVw/OGT/
 sE8dtxjuR1bC04oY7I0J3yvgFSA1VxPR+vP0b8KQcXd0pJbTooYppQHDQmltFJ7i
 KThmZhDLCsQ8Q/PuWJF7NIPD+gbAoA==
 =zcuM
 -----END PGP SIGNATURE-----

Merge tag 'spi-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi updates from Mark Brown:
 "The biggest single thing in the diffstat here is a massive overhaul of
  the PXA2xx driver from Andy Shevchenko (the IP is still in use on
  modern Intel systems), though we also have quite a lot of core work as
  well:

   - Better support for mixing native and GPIO chip selects also from
     Andy.

   - Support for devices with multiple chip selects from Sebastian
     Reichel.

   - Helper for polling status registers in spi-mem from Patrice
     Chotard.

   - Support for Renesas RZ/N1 and Rockchip RV1126"

* tag 'spi-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (86 commits)
  spi: core: add dma_map_dev for dma device
  spi: convert Xilinx Zynq UltraScale+ MPSoC GQSPI bindings to YAML
  spi: Fix self assignment issue with ancillary->mode
  spi: spi-sh-msiof: : use proper DMAENGINE API for termination
  spi: spi-rspi: : use proper DMAENGINE API for termination
  spi: spi-rockchip: add description for rv1126
  spi: rockchip: Support SPI_CS_HIGH
  spi: rockchip: Support cs-gpio
  spi: rockchip: Wait for STB status in slave mode tx_xfer
  spi: rockchip: Set rx_fifo interrupt waterline base on transfer item
  spi: rockchip: add compatible string for rv1126
  spi: spi-sun6i: Fix chipselect/clock bug
  spi: dt-bindings: support devices with multiple chipselects
  spi: add ancillary device support
  spi: xilinx: convert to yaml
  spi: convert Cadence SPI bindings to YAML
  spi: stm32-qspi: Remove unused qspi field of struct stm32_qspi_flash
  spi: add of_device_uevent_modalias support
  spi: meson-spicc: fix memory leak in meson_spicc_probe
  spi: meson-spicc: fix a wrong goto jump for avoiding memory leak.
  ...
2021-06-28 11:10:20 -07:00
Jeremy Szu
dfc2e8ae40 ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook 830 G8 Notebook PC
The HP EliteBook 830 G8 Notebook PC using ALC285 codec which using 0x04 to
control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210625133414.26760-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-25 18:28:42 +02:00
Mark Brown
1bee1ecf23
Merge remote-tracking branch 'spi/for-5.14' into spi-next 2021-06-25 14:08:26 +01:00
Mark Brown
1926645281
Merge remote-tracking branch 'asoc/for-5.14' into asoc-next 2021-06-25 14:08:03 +01:00
Mark Brown
c073a58a7e
Merge remote-tracking branch 'asoc/for-5.13' into asoc-linus 2021-06-25 14:08:01 +01:00
Christophe JAILLET
0cbbeaf370 ALSA: firewire-lib: Fix 'amdtp_domain_start()' when no AMDTP_OUT_STREAM stream is found
The intent here is to return an error code if we don't find what we are
looking for in the 'list_for_each_entry()' loop.

's' is not NULL if the list is empty or if we scan the complete list.
Introduce a new 'found' variable to handle such cases.

Fixes: 60dd49298e ("ALSA: firewire-lib: handle several AMDTP streams in callback handler of IRQ target")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/9c9a53a4905984a570ba5672cbab84f2027dedc1.1624560484.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-25 09:38:11 +02:00
Srinivas Kandagatla
6a7f5bd618
ASoC: qcom: lpass-cpu: mark IRQ_CLEAR register as volatile and readable
Currently IRQ_CLEAR register is marked as write-only, however using
regmap_update_bits on this register will have some side effects.
so mark IRQ_CLEAR register appropriately as readable and volatile.

Fixes: da0363f7bf ("ASoC: qcom: Fix for DMA interrupt clear reg overwriting")
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210624092153.5771-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-24 19:29:53 +01:00
Mark Brown
10043bb6af ASoC: rt5645: Avoid upgrading static warnings to errors
One of the fixes reverted as part of the UMN fallout was actually fine,
however rather than undoing the revert the process that handled all this
stuff resulted in a patch which attempted to add extra error checks
instead.  Unfortunately this new change wasn't really based on a good
understanding of the subsystem APIs and bypassed the usual patch flow
without ensuring it was reviewed by people with subsystem knowledge and
was merged as a fix rather than during the merge window.

The effect of the new fix is to upgrade what were previously warnings on
static data in the code to hard errors on that data.  If this actually
happens then it would break existing systems, if it doesn't happen then
the change has no effect so this was not a safe change to apply as a fix
to the release candidates.  Since the new code has not been tested and
doesn't in practice improve error handling revert it instead, and also
drop the original revert since the original fix was fine.  This takes
the driver back to what it was in -rc1.

Fixes: 5e70b8e22b ("ASoC: rt5645: add error checking to rt5645_probe function")
Fixes: 1e0ce84215 ("Revert "ASoC: rt5645: fix a NULL pointer dereference")
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Phillip Potter <phil@philpotter.co.uk>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20210608160713.21040-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 916cccb507)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-24 12:22:27 +02:00
Takashi Iwai
5c89c2c7fb ASoC: Fixes for v5.13
A final batch of fixes for v5.13, this is larger than I'd like due to
 the fixes for a series of suspend issues that Intel turned up in their
 testing this week.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmDTZ30ACgkQJNaLcl1U
 h9C5dQf6AjDh6y0SfB264cv2kSCLtYsOstSeamrEv3HBjqGiWEDgzfdB5Z+5d+EJ
 ScWsfsZ8eMr7WcMZJ+wEGNKxcZO2uHEaC29dpNrDeE4Ffr9hsSucPhJ8Fm+K0qDH
 VqX4kDPFY+OiuOf5RipDyAgoHo4zhIeaE9Rgxd4lbNH/xpWtgalN22iyYLpiYZLP
 YJk+/8L37ZcKYX3uCImMEe4yseH3AFzGz7yi/tyyWCUP7GEwtWgzv2vadxewjY5E
 h12ToqsTMQIrix0ZfMbYW9KJ7ANn6PFBz10vH8XuGbUlBW33pVzqP+Wr9adXGG4N
 XLs6wRpbDbdJc3aDpDjA1nRlBl5XEg==
 =h2+R
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v5.13-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Fixes for v5.13

A final batch of fixes for v5.13, this is larger than I'd like due to
the fixes for a series of suspend issues that Intel turned up in their
testing this week.
2021-06-24 10:02:45 +02:00
Mark Brown
8cc802bd75
Merge series "ASoC: tlv320aic32x4: Add support for TAS2505" from Claudius Heine <ch@denx.de>:
Hi,

this is v2 from my patchset that add support for the TAS2505 to the tlv320aic32x4 driver.

kind regards,
Claudius

Changes from v1:
- clarified commit message of first patch, which add the type value to the struct
- removed unnecessary code to put and get speaker volume
- removed 'Gain' from 'HP Driver Playback Volume' control
- fixed rebase issues

Claudius Heine (3):
  ASoC: tlv320aic32x4: add type to device private data struct
  ASoC: tlv320aic32x4: add support for TAS2505
  ASoC: tlv320aic32x4: dt-bindings: add TAS2505 to compatible

 .../bindings/sound/tlv320aic32x4.txt          |   1 +
 sound/soc/codecs/tlv320aic32x4-i2c.c          |  22 ++-
 sound/soc/codecs/tlv320aic32x4-spi.c          |  23 ++-
 sound/soc/codecs/tlv320aic32x4.c              | 139 +++++++++++++++++-
 sound/soc/codecs/tlv320aic32x4.h              |  10 ++
 5 files changed, 186 insertions(+), 9 deletions(-)

base-commit: 70585216fe
--
2.32.0
2021-06-23 16:31:14 +01:00
Mark Brown
f5e2d697d3
Merge series "ASoC: tegra: Use devm_platform_get_and_ioremap_resource()" from Yang Yingliang <yangyingliang@huawei.com>:
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Yang Yingliang (4):
  ASoC: tegra20: i2s: Use devm_platform_get_and_ioremap_resource()
  ASoC: tegra20: spdif: Use devm_platform_get_and_ioremap_resource()
  ASoC: tegra: tegra210_admaif: Use
    devm_platform_get_and_ioremap_resource()
  ASoC: tegra30: ahub: Use devm_platform_get_and_ioremap_resource()

 sound/soc/tegra/tegra20_i2s.c     | 3 +--
 sound/soc/tegra/tegra20_spdif.c   | 3 +--
 sound/soc/tegra/tegra210_admaif.c | 4 +---
 sound/soc/tegra/tegra30_ahub.c    | 3 +--
 4 files changed, 4 insertions(+), 9 deletions(-)

--
2.25.1
2021-06-23 16:31:13 +01:00
Imre Deak
3099406ef4 ALSA: hda: Release codec display power during shutdown/reboot
Similarly to the previous patch for the HDA controller make sure here
that codecs also drop the display power reference during shutdown and
reboot.

This fixes a power ref leaked WARN in i915 during shutdown if the HDA
driver is built with CONFIG_PM=n.

Suggested-by: Takashi Iwai <tiwai@suse.de>
References: https://gitlab.freedesktop.org/drm/intel/-/issues/3618
References: https://lore.kernel.org/intel-gfx/s5hzgvhngw6.wl-tiwai@suse.de
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://lore.kernel.org/r/20210623134601.2128663-2-imre.deak@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-23 16:28:27 +02:00
Imre Deak
472e18f63c ALSA: hda: Release controller display power during shutdown/reboot
Make sure the HDA driver's display power reference is released during
shutdown/reboot.

During the shutdown/reboot sequence the pci device core calls the
pm_runtime_resume handler for all devices before calling the driver's
shutdown callback and so the HDA driver's runtime resume callback will
acquire a display power reference (on HSW/BDW). This triggers a power
reference held WARN on HSW/BDW in the i915 driver's subsequent shutdown
handler, which expects all display power references to be released by
that time.

Since the HDA controller is stopped in the shutdown handler in any case,
let's follow here the same sequence as the one during runtime suspend.
This will also reset the HDA link and drop the display power reference,
getting rid of the above WARN.

Tested on HSW.

v2:
- Fix the build for CONFIG_PM=n (Takashi)
- s/__azx_runtime_suspend/azx_shutdown_chip/

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3618
References: https://lore.kernel.org/lkml/cea1f9a-52e0-b83-593d-52997fe1aaf6@er-systems.de
Reported-and-tested-by: Thomas Voegtle <tv@lio96.de>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://lore.kernel.org/r/20210623134601.2128663-1-imre.deak@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-23 16:28:02 +02:00
Takashi Iwai
0ac05b25c3 ALSA: hda/realtek: Apply LED fixup for HP Dragonfly G1, too
HP Dragonfly G1 (SSID 103c:861f) also requires the same quirk for the
mute and mic-mute LED just as Dragonfly G2 model.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213329
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210623122022.26179-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-23 14:20:53 +02:00
Zhen Lei
723ca2f894
ASoC: fsl: remove unnecessary oom message
Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20210617103141.1765-1-thunder.leizhen@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-23 11:49:38 +01:00
Claudius Heine
b4525b6196
ASoC: tlv320aic32x4: add support for TAS2505
This adds support for TAS2505 and TAS2521 to the tlv320aic32x4 driver.

The TAS2505 seems to be a stripped down version of the TLV320AIC32X4 so
it makes sense to handle them in the same driver.

Signed-off-by: Claudius Heine <ch@denx.de>
Link: https://lore.kernel.org/r/20210617085230.1851503-3-ch@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-23 11:49:35 +01:00
Claudius Heine
688d47cdd9
ASoC: tlv320aic32x4: add type to device private data struct
While this driver can already handle different device variants, the
variant information cannot be used in the driver code and therefor
cannot have different code paths depending on the device variant.

This change adds a `type` value into the `aic32x4_priv` structure, that
contains a device variant identifier, which was set when the driver was
bound to the device.

Signed-off-by: Claudius Heine <ch@denx.de>
Link: https://lore.kernel.org/r/20210617085230.1851503-2-ch@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-23 11:49:34 +01:00
Yang Yingliang
fc8344e63e
ASoC: tegra30: ahub: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210618024722.2618842-5-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-23 11:49:32 +01:00
Yang Yingliang
c29b6382d2
ASoC: tegra: tegra210_admaif: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210618024722.2618842-4-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-23 11:49:31 +01:00
Yang Yingliang
8d81f0da47
ASoC: tegra20: spdif: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210618024722.2618842-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-23 11:49:30 +01:00
Yang Yingliang
8ad9e5baa9
ASoC: tegra20: i2s: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210618024722.2618842-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-23 11:49:29 +01:00
Shengjiu Wang
a7a0a2feb9
ASoC: fsl_spdif: Fix unexpected interrupt after suspend
When system enter suspend, the machine driver suspend callback
function will be called, then the cpu driver trigger callback
(SNDRV_PCM_TRIGGER_SUSPEND) be called, it would disable the
interrupt.

But the machine driver suspend and cpu dai driver suspend order
maybe changed, the cpu dai driver's suspend callback is called before
machine driver's suppend callback, then the interrupt is not cleared
successfully in trigger callback.

So need to clear interrupts in cpu dai driver's suspend callback
to avoid such issue.

Fixes: 9cb2b3796e ("ASoC: fsl_spdif: Add pm runtime function")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/1624365084-7934-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-23 11:47:43 +01:00
Takashi Sakamoto
ae44705f98 ALSA: firewire-motu: fix register handling for 896
After further investigation, I find out some mistakes for 896 about its
register. This commit fixes it.

Fixes: b431f16f16 ("ALSA: firewire-motu: add support for MOTU 896")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210623075941.72562-10-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-23 10:17:29 +02:00
Takashi Sakamoto
e949e338d7 ALSA: firewire-motu: fix register handling for 828
After further investigation, I find out some mistakes for 828 about its
register. This commit fixes it.

Fixes: d13d6b284d ("ALSA: firewire-motu: add support for MOTU 828")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210623075941.72562-9-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-23 10:17:28 +02:00
Takashi Sakamoto
7203233ea7 ALSA: firewire-motu: use macro instead of magic number for clock source in v3 protocol
This commit adds a series of macro for source of sampling clock in
version 3 protocol.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210623075941.72562-8-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-23 10:17:27 +02:00
Takashi Sakamoto
ef8f14ad2a ALSA: firewire-motu: code refactoring for source detection of sampling clock in v3 protocol
Current implementation of driver has two similar helper functions for
source detection of sampling clock. This commit merges them as a code
refactoring.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210623075941.72562-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-23 10:17:26 +02:00
Takashi Sakamoto
53ed8cf625 ALSA: firewire-motu: code refactoring for packet format detection in v2 protocol
Current implementation of driver has several similar helper functions
for packet format detection in protocol version 2.

This commit merges them as code refactoring.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210623075941.72562-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-23 10:17:26 +02:00
Takashi Sakamoto
184aa6b7e1 ALSA: firewire-motu: use macro instead of magic number for clock source in v2 protocol
This commit adds a series of macro for source of sampling clock in
version 2 protocol.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210623075941.72562-5-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-23 10:17:25 +02:00
Takashi Sakamoto
683d36690f ALSA: firewire-motu: add support for AES/EBU clock source in v2 protocol
Although MOTU Traveler supports AES/EBU source for sampling clock,
current implementation of driver doesn't code it.

This commit adds support for AES/EBU source in protocol version 2.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210623075941.72562-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-23 10:17:25 +02:00
Takashi Sakamoto
25eb438920 ALSA: firewire-motu: code refactoring for detection of clock source in v2 protocol
Current implementation of driver has two similar helper functions for
source detection of sampling clock. This commit merges them as a code
refactoring.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210623075941.72562-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-23 10:17:24 +02:00
Takashi Sakamoto
fa4db23233 ALSA: firewire-motu: fix detection for S/PDIF source on optical interface in v2 protocol
The devices in protocol version 2 has a register with flag for IEC 60958
signal detection as source of sampling clock without discrimination
between coaxial and optical interfaces. On the other hand, current
implementation of driver manage to interpret type of signal on optical
interface instead.

This commit fixes the detection of optical/coaxial interface for S/PDIF
signal.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210623075941.72562-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-23 10:17:23 +02:00
Geoffrey D. Bennett
d5bda7e039 ALSA: usb-audio: scarlett2: Add support for the talkback feature
Add support for the talkback feature of the 18i20 Gen 3.

Co-developed-by: Vladimir Sadovnikov <sadko4u@gmail.com>
Signed-off-by: Vladimir Sadovnikov <sadko4u@gmail.com>
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/e39599893a7479c290e1aaec6c79dcee87681b47.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
ac34df733d ALSA: usb-audio: scarlett2: Update get_config to do endian conversion
For configuration items with a size of 16, scarlett2_usb_get_config()
was filling *buf with little-endian data. Update it to convert to CPU
endian. This function is not currently used so affects nothing yet;
will be used by the upcoming talkback feature.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/cbc8b6eedd859dd27086ab4126d724a86dd50bcb.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
e914d8432c ALSA: usb-audio: scarlett2: Add speaker switching support
The 18i8 and 18i20 Gen 3 support "speaker switching". Add a Speaker
Switch control which can be set to Off/Main/Alt.

When speaker switching is enabled or disabled, the interface may
change the state of the Analog Outputs 3 and 4 routing and the global
mute button, so use a flag private->speaker_switching_switched to note
that those should be checked when the next "monitor other"
notification is received.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/874193a534cd0aeb6f2e108ae761cadd2dc25ad2.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
8df25eb0a2 ALSA: usb-audio: scarlett2: Update mux controls to allow updates
Enabling/disabling speaker switching will update the mux
configuration. To prepare for this, add a private->mux_updated flag
and update the scarlett2_mux_src_enum_ctl_get() callback to check it.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/5ce3bb9fe4006b550d18c783c5ff640fe0bfbfcb.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
f02da65348 ALSA: usb-audio: scarlett2: Add sw_hw_ctls and mux_ctls
Save the struct snd_kcontrol pointers for the sw_hw and mux controls.
This is in preparation for speaker switching support which needs to be
able to update those controls.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/269d89181bf29dbea80ba6f8cfff84fb23b77f86.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
3b9e3720a9 ALSA: usb-audio: scarlett2: Split up sw_hw_enum_ctl_put()
Split part of scarlett2_sw_hw_enum_ctl_put() out into
scarlett2_sw_hw_change() so that the code which actually makes the
change is available in its own function. This will be used by the
speaker switching support which needs to set the SW/HW switch to HW
when speaker switching is enabled.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/f2cf91841ba067b490e7709bc4b14f4532b4ddd5.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-22 21:42:24 +02:00