summaryrefslogtreecommitdiff
path: root/sound/soc/codecs
AgeCommit message (Collapse)Author
2025-04-24ASoC: codec: tpa6130a2: Convert to GPIO descriptorsPeng Fan
of_gpio.h is deprecated, update the driver to use GPIO descriptors. - Use devm_gpiod_get_optional to get GPIO descriptor with default polarity GPIOD_OUT_LOW, set consumer name. - Use gpiod_set_value to configure output value. Checking the DTS polarity, all users are using GPIOD_ACTIVE_HIGH. so all should work as expected with this patch. Cc: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patch.msgid.link/20250414-asoc-tpa6130a2-v1-3-5f4052e656a0@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-24ASoC: codec: tpa6130a2: Remove tpa6130a2_platform_dataPeng Fan
There is no in-tree user to create the device using platform data 'struct tpa6130a2_platform_data', so drop the dead code. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250414-asoc-tpa6130a2-v1-2-5f4052e656a0@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-24ASoC: codec: tpa6130a2: Sort headers alphabeticallyPeng Fan
Sort headers alphabetically to easily insert new ones and drop duplications. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250414-asoc-tpa6130a2-v1-1-5f4052e656a0@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-23ASoC: cs42l43: Disable headphone clamps during type detectionCharles Keepax
The headphone clamps cause fairly loud pops during type detect because they sink current from the detection process itself. Disable the clamps whilst the type detect runs, to improve the detection pop performance. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250423090944.1504538-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-22ASoC: adau7118: Allow dsp_a modeMichael Sikora
TDM mode on the adau7118 is dsp_a compatible. Set SPT_SAI_MODE on the SPT_CTRL1 register to 1 for TDM mode when the DAI is operating in dsp_a mode. Signed-off-by: Michael Sikora <michael.sikora@axis.com> Link: https://patch.msgid.link/20250411-adau7118-dsp-a-v1-1-be3fb487a6ac@axis.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-21ASoC: wm8998: Add Kconfig promptAndré Apitzsch
Add tristate prompt to allow codec selection. Signed-off-by: André Apitzsch <git@apitzsch.eu> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250418-wm8998-v1-1-21c4bead9cd8@apitzsch.eu Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-21ASoC: codecs: Remove unused rt566[58]_sel_asrc_clk_srcDr. David Alan Gilbert
rt5665_sel_asrc_clk_src() was added in 2016 by commit 33ada14a26c8 ("ASoC: add rt5665 codec driver") rt5668_sel_asrc_clk_src() was added in 2018 by commit d59fb2856223 ("ASoC: rt5668: add rt5668B codec driver") Neither have been used. Remove them. Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org> Link: https://patch.msgid.link/20250420232733.182802-1-linux@treblig.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-21ASoC: cs48l32: Use modern PM_OPSNathan Chancellor
When building for a platform that does not support CONFIG_PM, such as s390, cs48l32_runtime_{suspend,resume}() are unused because SET_RUNTIME_PM_OPS does not reference its argument when CONFIG_PM is not set: sound/soc/codecs/cs48l32.c:3822:12: error: 'cs48l32_runtime_suspend' defined but not used [-Werror=unused-function] 3822 | static int cs48l32_runtime_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/cs48l32.c:3779:12: error: 'cs48l32_runtime_resume' defined but not used [-Werror=unused-function] 3779 | static int cs48l32_runtime_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Use RUNTIME_PM_OPS and pm_ptr() to ensure these functions are seen as used by the compiler but be dropped in the final object file when CONFIG_PM is not set, matching the current behavior while clearing up the warnings. Fixes: e2bcbf99d045 ("ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSP") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250418-cs48l32-modern-pm_ops-v1-1-640559407619@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-16ASoC: rt722: fix pop noise at the beginning of DMIC recordingShuming Fan
This patch added the PDE status check which makes sure the PDE transition is done. It will decrease the pop noise at the beginning of DMIC recording. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20250416092547.737879-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-16ASoC: cs48l32: Fix spelling mistake "exceeeds" -> "exceeds"Colin Ian King
There is a spelling mistake in a cs48l32_fll_err message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250416081204.36851-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-16ASoC: ak4458: Remove useless return variableChen Ni
Remove unnecessary return variable and compress the return logic. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20250416041023.546311-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-16ASoC: rt722: fix pop noise at the beginning of headphone playbackShuming Fan
This patch added the function_status check to avoid the calibration again. The codec driver reinitializes when the 'FUNCTION_NEEDS_INITIALIZATION' flag raises. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20250416092528.737845-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-16ASoC: cs-amp-lib-test: Use faux bus instead of creating a dummy platform deviceRichard Fitzgerald
Change the code to use faux bus for the dummy codec driver device instead of creating a platform device. Also use KUnit automatic resource cleanup to destroy the device instead of doing it "manually" in a test case exit() function. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250416121604.780220-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-15ASoC: Add codec driver for Cirrus Logic CS48L32 DSPMark Brown
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: formance low-power audio DSP with analog and PDM digital inputs and support for low-power always-on voice-trigger functionality. This series adds the devicetree bindings and the ASoC codec driver.
2025-04-15ASoC: cs-amp-lib-test: Use flex_array_size()Richard Fitzgerald
Use flex_array_size() when calculating the number of bytes argument to get_random_bytes(). This replaces a calculation based on passing sizeof() the expected type of the destination. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250415131837.568750-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-15ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSPRichard Fitzgerald
Add a codec driver for the Cirrus Logic CS48L32 audio DSP. The CS48L32 is a low-power audio DSP with microphone inputs for "Always on Voice" (i.e. voice trigger) and voice command processing. It has a programmable Halo Core DSP and a variety of power-efficient fixed-function audio processors, with configurable digital mixing and routing. There are two I2S/TDM audio serial ports. Four analogue inputs are available through IN1. These feed into a 2-channel ADC through an analogue mux. There is an ALSA control for each IN1 ADC channel to select which analogue input to use. A dedicated digital mic (DMIC) PDM input is available on IN2. Two PDM outputs can feed DMIC inputs on another codec or a host DMIC/PDM input. An on-board regulator provides a power supply or bias voltage to attached microphones. Three switchable MICBIAS outputs are fed from this allowing only the microphone in use to be powered-up. There are DAPM widgets for these outputs: MICBIAS1A, MICBIAS1B and MICBIAS1C. The machine driver must create a DAPM route from the required MICBIAS1x widget to the INn input widgets to make the MICBIAS switch on when the audio input is powered-up. For example if the microphone feeding CS48L32 pin IN1LN_1 is powered from MICBIAS1A, the machine driver must create the path: (sink) IN1LN_1 <----- (source) MICBIAS1A Co-developed-by: Stuart Henderson <stuarth@opensource.cirrus.com> Signed-off-by: Stuart Henderson <stuarth@opensource.cirrus.com> Co-developed-by: Qi Zhou <qi.zhou@cirrus.com> Signed-off-by: Qi Zhou <qi.zhou@cirrus.com> Co-developed-by: Piotr Stankiewicz <piotrs@opensource.cirrus.com> Signed-off-by: Piotr Stankiewicz <piotrs@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250415115016.505777-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-14ASoC: cs-amp-lib: Replace offsetof() with struct_size()Thorsten Blum
Use struct_size() to calculate the number of bytes to allocate and used by 'cirrus_amp_efi_data'. Compared to offsetof(), struct_size() provides additional compile-time checks (e.g., __must_be_array()). Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20250414114528.355204-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-14Add support for Loongson-1 AC97Mark Brown
Merge series from Keguang Zhang <keguang.zhang@gmail.com>: Add the driver and dt-binding document for Loongson-1 AC97. Add the dt-binding document for Realtek ALC203 Codec. Add DT support for the AC97 generic codec driver.
2025-04-14ASoC: convert GPIO chips to using new value settersMark Brown
Merge series from Bartosz Golaszewski <brgl@bgdev.pl>: struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. We're in the process of converting all GPIO drivers to using the new API. This series converts all ASoC GPIO controllers.
2025-04-14ASoC: Add Richtek rt9123 and rt9123p supportMark Brown
Merge series from cy_huang@richtek.com: This patch series adds Richtek rt9123 and rt9123p support. It's a 3.2W mono Class-D audio amplifier.
2025-04-14ASoC: tas27{64,70}: improve support for Apple codecMark Brown
Merge series from James Calligeros <jcalligeros99@gmail.com>: This series introduces a number of changes to the drivers for the Texas Instruments TAS2764 and TAS2770 amplifiers in order to introduce (and improve in the case of TAS2770) support for the variants of these amps found in Apple Silicon Macs. Apple's variant of TAS2764 is known as SN012776, and as always with Apple is a subtly incompatible variant with a number of quirks. It is not publicly available. The TAS2770 variant is known as TAS5770L, and does not require incompatible handling. Much as with the Cirrus codec patches, I do not expect that we will get any official acknowledgement that these parts exist from TI, however I would be delighted to be proven wrong. This series has been living in the downstream Asahi kernel tree[1] for over two years, and has been tested by many thousands of users by this point[2]. v4 drops the TDM idle TX slot behaviour patches. I experimented with the API discussed in v3, however this did not work on any of the machines I tested it with. More tweaking is probably needed. [1] https://github.com/AsahiLinux/linux/tree/asahi-wip [2] https://stats.asahilinux.org/
2025-04-14Fix up building KUnit tests for Cirrus Logic modulesMark Brown
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: This series fixes the KConfig for cs_dsp and cs-amp-lib tests so that CONFIG_KUNIT_ALL_TESTS doesn't cause them to add modules to the build.
2025-04-13ASoC: codecs: Add support for Richtek rt9123pChiYuan Huang
Add codec driver for Richtek rt9123p. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://patch.msgid.link/d10c08abb3e92598ce7ff3663db7dd70ec2d3c65.1744245663.git.cy_huang@richtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: codecs: Add support for Richtek rt9123ChiYuan Huang
Add codec driver for Richtek rt9123. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://patch.msgid.link/f467200d7c116f5f34a3c31fafeebd9a410ab8bd.1744245663.git.cy_huang@richtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: tas2764: expose die temp to hwmonJames Calligeros
TAS2764 contains an ADC that reports the chip's die temperature. The temperature in degrees Celsius is yielded by subtracting 93 from the raw value reported by the ADC. Expose the codec die temperature to the hwmon interface. The chip will initialise the temperature register to 2.6 *C to avoid triggering over temp protection. As the ADC is powered down during software shutdown, this value will persist until the chip is fully powered up (e.g. when the PCM it's attached to is opened). When the chip is powered back down, the last value sampled will persist in the register. Co-developed-by: Martin Povišer <povik+lin@cutebit.org> Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-8-50a00ec850a3@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: tas2770: expose die temp to hwmonJames Calligeros
TAS2770 includes an ADC which reports the chip's die temperature. As per the datasheet, the temperature in degrees Celsius is derived by taking the raw value stored in the ADC's registers, dividing by 16, then subtracting 93. Create and register a hwmon device to expose the chip's die temperature to the hwmon interface. The ADC is shut down during software shutdown mode, and its registers are initialised to 0 on reset. This means that the die temperature will read -93 *C until the chip has been fully powered up at least once (e.g. the PCM its attached to is opened). Once the chip is put into software shutdown again, the ADC will also shut down. The last value sampled before this happens will persist in the ADC's registers. Co-developed-by: Martin Povišer <povik+lin@cutebit.org> Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-7-50a00ec850a3@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: tas2764: Apply Apple quirksMartin Povišer
Apple's SN012776 driver has some peculiar aspects to its behavior that are suspected to work around issues in the codec part. Add a module parameter for enabling individual quirks that should be imitated after the Apple driver. Setting some of these by default seems to be required. For example, setting 0xf fixes an issue with transient overcurrent errors which can crash the chip until the next system reboot. To be safe, let's enable all of them by default. Reviewed-by: Neal Gompa <neal@gompa.dev> Co-developed-by: Hector Martin <marcan@marcan.st> Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Co-developed-by: James Calligeros <jcalligeros99@gmail.com> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-6-50a00ec850a3@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: tas2764: Raise regmap range maximumMartin Povišer
TAS2764 has a number of undocumented registers between page 0xf0 and 0xff. These are used to apply in-silicon quirks and workarounds at runtime. Raise the regmap max register to 0xffff to cover any quirks registers. Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-5-50a00ec850a3@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: tas2764: Enable main IRQsHector Martin
IRQ handling was added in commit dae191fb957f ("ASoC: tas2764: Add IRQ handling") however that same commit masks all interrupts coming from the chip. Unmask the "main" interrupts so that we can see and deal with a number of errors including clock, voltage, and current. Fixes: dae191fb957f ("ASoC: tas2764: Add IRQ handling") Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-4-50a00ec850a3@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: tas2764: Reinit cache on part resetMartin Povišer
When the part is reset in component_probe, do not forget to reinit the regcache, otherwise the cache can get out of sync with the part's actual state. This fix is similar to commit 0a0342ede303 ("ASoC: tas2770: Reinit regcache on reset") which concerned the tas2770 driver. Fixes: 827ed8a0fa50 ("ASoC: tas2764: Add the driver for the TAS2764") Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-3-50a00ec850a3@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: tas2770: Support setting the PDM TX slotHector Martin
We don't actually support configuring the PDM input right now. Rather, this is useful as a hack. On Apple Silicon machines, amps are split between two I2S buses which are logically ANDed internally at the SoC. Odd and even slot groups are driven by amps on either bus respectively. Since the signals are ANDed, unused slot groups must be driven as zero to avoid corrupting the data from the other side. On most recent machines (TAS2764-based), this is accomplished using the "SDOUT zero mask" feature of that chip. Unfortunately, TAS2770 does not support this. It does support zeroing out *all* unused slots, which works well for machines with a single amp per I2S bus. That is all, except one. The 13" M1 MacBook Pro is the only machine using TAS2770 and two amps per I2S bus: L Bus: SPK0I SPK0V Hi-Z Hi-Z SPK2I SPK2V Hi-Z Hi-Z R Bus: Hi-Z Hi-Z SPK1I SPK2V Hi-Z Hi-Z SPK3I SPK3V To ensure uncorrupted data, we need to force all the Hi-Z periods to zero. We cannot use the "force all zero" feature, as that would cause a bus conflict between both amps. We can use the pull-down feature, but that leaves a few bits of garbage on the trailing edge of the speaker data, since the pull-down is weak. This is where the PDM transmit feature comes in. With PDM grounded and disabled (the default state), the PDM slot is transmitted as all zeroes. We can use that to force a zero 16-bit slot after the voltage data for each speaker, cleaning it up. Then the pull-down ensures the line stays low for the subsequent slot: L Bus: SPK0I SPK0V PDM0 PulDn SPK2I SPK2V PDM0 PulDn R Bus: PDM0 PulDn SPK1I SPK2V PDM0 PulDn SPK3I SPK3V Yes, this is a horrible hack, but it beats adding dummy slots that would be visible to the userspace capture side. There may be some other way to fix the logical AND behavior on the MCA side... that would make this unnecessary. ("How does Apple deal with this"? - they don't, macOS does not use IVSENSE on TAS2770 machines even though it's physically wired up, but we want to do so on Linux.) Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-2-50a00ec850a3@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: tas2770: Power cycle amp on ISENSE/VSENSE changeHector Martin
The ISENSE/VSENSE blocks are only powered up when the amplifier transitions from shutdown to active. This means that if those controls are flipped on while the amplifier is already playing back audio, they will have no effect. Fix this by forcing a power cycle around transitions in those controls. Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20250406-apple-codec-changes-v5-1-50a00ec850a3@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: codecs: zl38060: use new GPIO line value setter callbacksBartosz Golaszewski
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-11-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: codecs: wm8903: use new GPIO line value setter callbacksBartosz Golaszewski
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-10-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: codecs: peb2466: use new GPIO line value setter callbacksBartosz Golaszewski
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Acked-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-9-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: codecs: idt821034: use new GPIO line value setter callbacksBartosz Golaszewski
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Acked-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-8-dd54b6ca1ef9@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: codecs: tlv320adc3xxx: use new GPIO line value setter callbacksBartosz Golaszewski
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-7-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: codecs: wm8996: use new GPIO line value setter callbacksBartosz Golaszewski
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-6-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: codecs: rt5677: use new GPIO line value setter callbacksBartosz Golaszewski
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-5-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: codecs: wm5100: use new GPIO line value setter callbacksBartosz Golaszewski
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-4-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: codecs: wm8962: use new GPIO line value setter callbacksBartosz Golaszewski
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://patch.msgid.link/20250408-gpiochip-set-rv-sound-v1-3-dd54b6ca1ef9@linaro.org Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: ac97: Add DT supportKeguang Zhang
Add an of_match_table with 'realtek,alc203' to provide DT support for the AC97 generic codec driver. Signed-off-by: Keguang Zhang <keguang.zhang@gmail.com> Link: https://patch.msgid.link/20250409-loongson1-ac97-v2-4-65d5db96a046@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-13ASoC: cs-amp-lib-test: Don't select SND_SOC_CS_AMP_LIBRichard Fitzgerald
Depend on SND_SOC_CS_AMP_LIB instead of selecting it. KUNIT_ALL_TESTS should only build tests for components that are already being built, it should not cause other stuff to be added to the build. Fixes: 177862317a98 ("ASoC: cs-amp-lib: Add KUnit test for calibration helpers") Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250411123608.1676462-3-rf@opensource.cirrus.com Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-10ASoC: wm_adsp: Use vmemdup_user() instead of open-codingRichard Fitzgerald
Use vmemdup_user() to get a copy of the user buffer in wm_coeff_tlv_put(). Apart from simplifying the code and avoiding open-coding, it means we also automatically benefit from any security enhancements in the code behind vmemdup_user(). Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250410101812.1180539-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-10ASoC: codecs: Add of_match_table for aw888081 driverWeidong Wang
Add of_match_table for aw88081 driver to make matching between dts and driver more flexible Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> Link: https://patch.msgid.link/20250410024953.26565-1-wangweidong.a@awinic.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-09ASoC: cs42l43: Reset clamp override on jack removalCharles Keepax
Some of the manually selected jack configurations will disable the headphone clamp override. Restore this on jack removal, such that the state is consistent for a new insert. Fixes: fc918cbe874e ("ASoC: cs42l43: Add support for the cs42l43") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250409120717.1294528-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-08ASoC: wcd938x: enable t14s audio headsetMark Brown
Merge series from srinivas.kandagatla@linaro.org: On Lenovo ThinkPad T14s, the headset is connected via a HiFi Switch to support CTIA and OMTP headsets. This switch is used to minimise pop and click during headset type switching. This patchset adds required bindings and changes to codec and dts to tnable the regulator required to power this switch along with wiring up gpio that control the headset switching. Without this patchset, there will be lots of noise on headset and mic will not we functional.
2025-04-08ASoC: codec: wcd93xx: Convert to GPIO descriptorsMark Brown
Merge series from "Peng Fan (OSS)" <peng.fan@oss.nxp.com>: of_gpio.h is deprecated, so update driver to use gpiod API. The current driver use value 0 to assert reset and 1 to deassert reset. The DTSes in tree that use the codec are using GPIO_ACTIVE_LOW. So it is safe to use devm_gpiod_get to get GPIO descriptors and use gpiod_set_value to configure output with value 1 means raw value 0, value 0 means raw value 1. Note: I not have devices to test, just my best pratice to do the convertion.
2025-04-08ASoC: codecs: lpass-wsa: fix VI capture setup.Mark Brown
Merge series from srinivas.kandagatla@linaro.org: This two patches fixes below two issues with the VI setup. 1. Only one channel gets enabled on VI feedback patch instead of two channels 2. recording rate is hardcoded to 8K instead dyamically setting it up. Both of these issues are fixed in these patches.
2025-04-08ASoC: hdmi-codec: use RTD ID instead of DAI ID for ELD entryKuninori Morimoto
commit 0ecd24a6d8b2 ("ASoC: hdmi-codec: dump ELD through procfs") adds "eld#%d" entry for sound proc. It is using DAI ID. But it is possible to have duplicate DAI ID on same Sound Card. In such case, we will get below error. To avoid duplicate entry name, use RTD ID instead of DAI ID. proc_dir_entry 'card0/eld#0' already registered WARNING: CPU: 3 PID: 74 at fs/proc/generic.c:377 proc_register+0x11c/0x1a4 Modules linked in: CPU: 3 UID: 0 PID: 74 Comm: kworker/u33:5 Not tainted 6.14.0-rc1-next-20250206-arm64-renesas #174 Hardware name: Renesas Salvator-X 2nd version board based on r8a77951 (DT) Workqueue: events_unbound deferred_probe_work_func pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : proc_register+0x11c/0x1a4 ata1: SATA link down (SStatus 0 SControl 300) lr : proc_register+0x11c/0x1a4 sp : ffff8000847db880 x29: ffff8000847db880 x28: 0000000000000000 x27: ffff0004c3403c98 x26: 0000000000000005 x25: ffff0004c14b03e4 x24: 0000000000000005 x23: ffff0004c361adb8 x22: ffff800082f24860 x21: ffff0004c361ad00 x20: ffff0004c14b0300 x19: ffff0004c14b02c0 x18: 00000000ffffffff x17: 0000000000000000 x16: 00400034b5503510 x15: ffff8001047db447 x14: 0000000000000000 x13: 6465726574736967 x12: ffff800082e66d30 x11: 000000000000028e x10: ffff800082e66d30 x9 : 00000000ffffefff x8 : ffff800082ebed30 x7 : 0000000000017fe8 x6 : 0000000000000000 x5 : 80000000fffff000 x4 : 0000000000000000 x3 : 0000000000000000 x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0004c15b3600 Call trace: proc_register+0x11c/0x1a4 (P) proc_create_data+0x3c/0x60 snd_info_register+0xd0/0x130 snd_info_register+0x30/0x130 snd_info_card_register+0x1c/0xbc snd_card_register+0x194/0x1ec snd_soc_bind_card+0x7f8/0xad0 snd_soc_register_card+0xe8/0xfc devm_snd_soc_register_card+0x48/0x98 audio_graph_parse_of+0x1c4/0x1f8 graph_probe+0x6c/0x80 ... Fixes: 0ecd24a6d8b2 ("ASoC: hdmi-codec: dump ELD through procfs") Reported-by: Thuan Nguyen <thuan.nguyen-hong@banvien.com.vn> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Thuan Nguyen <thuan.nguyen-hong@banvien.com.vn> Acked-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/87a58roatw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>