aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/codecs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2025-06-12ASoC: cs35l56: Use SoundWire address as alternate firmware suffix on L56 B0Richard Fitzgerald4-17/+50
Use the SoundWire link number and device unique ID as the firmware file qualifier suffix on CS35L56 B0 if .bin files are not found with the older suffix. Some changes in wm_adsp needed to support this have been included in this patch because they are trivial. The allows future products with CS35L56 B0 silicon to use the same firmware file naming as CS35L57 and cs35L63, while retaining backward compatibility for firmware that has already been published with the old naming scheme. The old suffix is searched first, partly because there are already many files using that naming scheme, but also because they are a smaller subset of all the possible fallback name options offered by wm_adsp so we know that it will either find the qualified files or fail. All the firmware files already published have the wmfw qualified with only the ACPI SSID and the bin files qualified with both SSID and the suffix. Originally, the firmware file names indicated which amplifier instance they were for by appending the ALSA prefix string. This is the standard ASoC way of distinguishing different instances of the same device. However, on SoundWire systems the SoundWire physical unique address is available as a unique identifier for each amp, and this address is hardwired by the address pin on the amp. The firmware files are specific for each physical amp so they must be applied to that amp. Using the ALSA prefix for the filename qualifier means that to name a firmware file it must be determined what prefix string the machine driver will assign to each device and then use that to name the firmware file correctly. This is straightforward in traditional ASoC systems where the machine driver is specific to a particular piece of hardware. But on SoundWire the machine driver is generic and can handle a very wide range of hardware. It is more difficult to determine exactly what the prefix will be on any particular production device, and more prone to mistakes. Also, when the machine driver switches to generating this automatically from SDCA properties in ACPI, there is an additional layer of complexity in determining the mapping. This uncertainty is unnecessary because the firmware is built for a specific amp. with known address, so we can use that directly instead of introducing a redundant intermediate alias. This ensures the firmware is applied to the amp it was intended for. There are already many published firmware for CS35L56 B0 silicon so this first looks for the original name suffix, to keep backward compatibility. If this doesn't find .bin files it will switch to using the new name suffix so that future products using CS35L56 B0 can start to use the new suffix. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250612121428.1667-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12ASoC: cs35l56: Use SoundWire address as firmware name suffix for new siliconRichard Fitzgerald5-17/+54
Use the SoundWire link number and device unique ID as the firmware file qualifier suffix on CS35L57, CS35L63 and revisions of CS35L56 after B0. The change in wm_adsp needed to support this has been included in this patch because it is fairly trivial. Originally, the firmware file names indicated which amplifier instance they were for by appending the ALSA prefix string. This is the standard ASoC way of distinguishing different instances of the same device. However, on SoundWire systems the SoundWire physical unique address is available as a unique identifier for each amp, and this address is hardwired by a pin on the amp. The firmware files are specific for each physical amp so they must be applied to that amp. Using the ALSA prefix for the filename qualifier means that to name a firmware file it must be determined what prefix string the machine driver will assign to each device and then use that to name the firmware file correctly. This is straightforward in traditional ASoC systems where the machine driver is specific to a particular piece of hardware. But on SoundWire the machine driver is generic and can handle a very wide range of hardware. It is more difficult to determine exactly what the prefix will be on any particular production device, and more prone to mistakes. Also, when the machine driver switches to generating this automatically from SDCA properties in ACPI, there is an additional layer of complexity in determining the mapping. This uncertainty is unnecessary because the firmware is built for a specific amp. with known address, so we can use that directly instead of introducing the redundant intermediate alias. This ensures the firmware is applied to the amp it was intended for. There have not been any firmwares published for CS35L57 or CS35L63, so these can safely be switched to using the SoundWire unique address as the suffix string. Also note that the machine driver in older kernel version only has match entries for the CS35L56 Soundwire identity so any future product with a cs35L57 or CS35L63 would require a new kernel anyway. There are already many published firmware for CS35L56 B0 silicon so this keeps the original naming scheme on those, to preserve backward compatibility. Note that although sdw_slave.id contains a unique_id field, this cannot be trusted because the SoundWire core code also puts magic values into it that it uses as a flag. So the unique ID is read from the chip register. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250612121428.1667-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: codecs: ES8326: Modify initialization configurationZhang Yi1-2/+1
Modify the value of ES8326_SDINOUT1_IO in the initialization Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20250604061821.2678-1-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: cs48l32: Fix a signedness bug in cs48l32_hw_params()Harshit Mogalapalli1-0/+4
There is a type promotion that can happen when freq(u32) variable is comapared with sclk_target(integer), when sclk_target is a negative value it promotes to a large postive integer which might not be a problem in this particular case as the condition evaluates to false when that happens, but bail out early when sclk_target has negative error codes. cs48l32_sclk_rates[i].freq >= sclk_target Fix this by adding a negative error check when snd_soc_tdm_params_to_bclk() fails Fixes: e2bcbf99d045 ("ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSP") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Link: https://patch.msgid.link/20250603214813.197346-1-harshit.m.mogalapalli@oracle.com Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08treewide, timers: Rename from_timer() to timer_container_of()Ingo Molnar1-1/+2
Move this API to the canonical timer_*() namespace. [ tglx: Redone against pre rc1 ] Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/aB2X0jCKQO56WdMt@gmail.com
2025-06-05Merge tag 'asoc-fix-v6.16-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linusTakashi Iwai7-29/+126
ASoC: Fixes for v6.16 A bunch of fixes, including a big batch for the Intel AVS driver, and one new device ID. It's all device specific.
2025-06-02ASoC: Intel: avs: Set of functional fixesMark Brown1-2/+2
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: Medium range of fixes all avs-driver related. The most important fixes lead the way: 1. For ASoC-hda codec driver, existing RPM manipulation in hda_codec_probe_complete()'s error path is superfluous and leads to RPM usage count underflow if the probe exists early e.g.: build-controls operation fails. 2. Resolve deadlock when DSP-recovery is a consequence of SET_D0IX IPC. The procedure handling IPC timeouts and EXCEPTION_CAUGHT notification shall cancel any D0IX work before proceeding with DSP recovery. If SET_D0IX called from delayed_work is the failing IPC the procedure will deadlock. 3. LINK format (PPLCxFMT) calculation is incorrect. HDAudio transfer types utilize SDxFMT for front-end (HOST) and PPLCxFMT for back-end (LINK) side when setting up the stream. BE's substream->runtime duplicates FE runtime so switch to using BE's hw_params to address incorrect format values on the LINK side when FE and BE formats differ. Below three patches address problems found by Coverity static analyzer: ASoC: Intel: avs: Fix possible null-ptr-deref when initing hw ASoC: Intel: avs: Verify kcalloc() status when setting constraints ASoC: Intel: avs: Verify content returned by parse_int_array() While unlikely in runtime, it's good to keep code resilient. The last few patches are readability/cohesiveness improvements.
2025-06-02ASoC: rt1320: fix speaker noise when volume bar is 100%Shuming Fan1-1/+16
This patch updates the settings to fix the speaker noise. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20250602085851.4081886-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-02ASoC: codecs: hda: Fix RPM usage count underflowCezary Rojewski1-2/+2
RPM manipulation in hda_codec_probe_complete()'s error path is superfluous and leads to RPM usage count underflow if the build-controls operation fails. hda_codec_probe_complete() is called in: 1) hda_codec_probe() for all non-HDMI codecs 2) in card->late_probe() for HDMI codecs Error path for hda_codec_probe() takes care of bus' RPM already. For 2) if late_probe() fails, ASoC performs card cleanup what triggers hda_codec_remote() - same treatment is in 1). Fixes: b5df2a7dca1c ("ASoC: codecs: Add HD-Audio codec driver") Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250530141025.2942936-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-28ASoC: tas571x: fix tas5733 num_controlsBram Vlerick1-1/+1
Commit e3de7984e451 ("ASoC: tas571x: add separate tas5733 controls") introduces a separate struct for the tas5733 controls but did not update the num_controls with the correct ARRAY_SIZE. Fixes: e3de7984e451 ("ASoC: tas571x: add separate tas5733 controls") Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org> Acked-by: Peter Korsgaard <peter@korsgaard.com> Link: https://patch.msgid.link/20250528-tas5733-fix-controls-size-v1-1-5c70595accaf@openpixelsystems.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-27ASoC: codecs: wcd93xx: Few regulator supplies fixesMark Brown2-24/+8
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>: Fix cleanup paths in wcd9335 and wcd937x codec drivers.
2025-05-27ASoC: tas571x: add separate tas5733 controlsBram Vlerick2-1/+98
The controls between the tas5717 and tas5733 should not be shared since the biquad and register setup is not identical. For example, writing to 0x5c on the tas5717 modifies ch2_bq[10] while on the tas5733 this is ch1_cross_bq[3]. see https://www.ti.com/lit/ds/symlink/tas5733l.pdf and https://www.ti.com/lit/ds/symlink/tas5717.pdf for more details on the register maps. Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org> Link: https://patch.msgid.link/20250527-tas5733-biquad-fix-v1-1-0d3d941700bb@openpixelsystems.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-27ASoC: codecs: fix out-of-bounds access on invalid clock configQasim Ijaz1-0/+1
get_coeff() returns –EINVAL when no table entry matches. The driver then uses that value as an index into coeff_div[], causing an OOB access. To fix lets abort the hw_params call instead. Fixes: de2b3119f9f7 ("ASoC: codecs: add support for ES8375") Signed-off-by: Qasim Ijaz <qasdev00@gmail.com> Link: https://patch.msgid.link/20250526191820.72577-1-qasdev00@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-27ASoC: codecs: wcd9375: Fix double free of regulator suppliesKrzysztof Kozlowski1-5/+1
Driver gets regulator supplies in probe path with devm_regulator_bulk_get(), so should not call regulator_bulk_free() in error and remove paths to avoid double free. Fixes: 216d04139a6d ("ASoC: codecs: wcd937x: Remove separate handling for vdd-buck supply") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250526-b4-b4-asoc-wcd9395-vdd-px-fixes-v1-3-0b8a2993b7d3@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-27ASoC: codecs: wcd937x: Drop unused buck_supplyKrzysztof Kozlowski1-1/+0
Last user of wcd937x_priv->buck_supply was removed in commit 216d04139a6d ("ASoC: codecs: wcd937x: Remove separate handling for vdd-buck supply"). Fixes: 216d04139a6d ("ASoC: codecs: wcd937x: Remove separate handling for vdd-buck supply") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250526-b4-b4-asoc-wcd9395-vdd-px-fixes-v1-2-0b8a2993b7d3@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-27ASoC: codecs: wcd9335: Fix missing free of regulator suppliesKrzysztof Kozlowski1-18/+7
Driver gets and enables all regulator supplies in probe path (wcd9335_parse_dt() and wcd9335_power_on_reset()), but does not cleanup in final error paths and in unbind (missing remove() callback). This leads to leaked memory and unbalanced regulator enable count during probe errors or unbind. Fix this by converting entire code into devm_regulator_bulk_get_enable() which also greatly simplifies the code. Fixes: 20aedafdf492 ("ASoC: wcd9335: add support to wcd9335 codec") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250526-b4-b4-asoc-wcd9395-vdd-px-fixes-v1-1-0b8a2993b7d3@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-23Merge tag 'asoc-v6.16-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai4-0/+923
ASoC: Additional v6.16 updates A couple more updates on top of the last set I sent you, a new driver for the ES8375 and a fix for the Cirrus KUnit tests from Jaroslav.
2025-05-23ASoC: codecs: add support for ES8375Mark Brown4-0/+923
Merge series from Zhang Yi <zhangyi@everest-semi.com>: The driver is for codec ES8375 of everest-semi.
2025-05-23ASoC: codecs: add support for ES8375Zhang Yi4-0/+923
The driver is for codec es8375 of everest Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20250523025502.23214-3-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-22Merge tag 'asoc-v6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai71-716/+8514
ASoC: Updates for v6.16 The changes in this release are quite large, mainly in drivers rather than the core. This is partly due to cleanups that touch a lot of drivers and partly due to several relatively large new drivers. - Support for automatically enumerating DAIs from standards conforming SoundWire SDCA devices, further work is required for these to be useful in an actual card. - Conversion of quite a few drivers to newer GPIO APIs. - More helpers and cleanups from Mormimoto-san. - Support for a wider range of AVS platforms. - Support for AMD ACP 7.x platforms, Cirrus Logic CS35L63 and CS48L32, Everest Semiconductor ES8389, Longsoon-1 AC'97 controllers, nVidia Tegra264, Richtek ALC203 and RT9123 and Rockchip SAI controllers.
2025-05-22ASoC: wm_adsp: Make cirrus_dir constRichard Fitzgerald1-1/+1
The cirrus_dir pointer should be const data but was missing the second const needed to achieve this. I haven't marked this as a 'Fixes' because it isn't causing any bugs, it's only a code improvement. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250522103816.543919-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-22ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda libShenghao Ding1-15/+0
Calibration data getting function for SPI and I2C HDA drivers are almost same, which read the calibration data from UEFI. To put them into tas2781_hda lib for code cleanup is more reasonable than to still keep them in the codec driver. For tas2781 codec driver, there're two different sources for calibrated data, one is from bin file, generated in factory test, requested and read in codec driver side; the other is from user space during device bootup. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20250522014347.1163-1-shenghao-ding@ti.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-19ASoC: tas2781: Header file cleanup and Move the macro definitions to fwlibShenghao Ding1-0/+5
Drop the I2C in one comment, for these registers are also used in SPI driver; Move the macro definition of TASDEVICE_CMD_XXX from tas2781.h to tas2781_fmwlib.c, because the macros are only referenced in only fwlib. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20250518132451.707-1-shenghao-ding@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-19ASoC: rt722: make regmap cache-only in probeShuming Fan2-1/+4
This patch makes sure the access to the codecs is cached until the device is enumerated. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20250519090645.2620292-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-16Merge branch 'for-linus' into for-nextTakashi Iwai2-3/+9
Back-merge of 6.15 devel branch for further development of HD-audio stuff. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-15cs35l56: Log tuning unique identifiers during firmwareMark Brown2-0/+29
Merge series from Simon Trimmer <simont@opensource.cirrus.com>: These two patches introduce a log message when provisioning the cs35l56 family of devices that uniquely identifies the firmware tuning.
2025-05-15ASoC: codecs: add support for ES8389Mark Brown4-1/+1110
Merge series from Zhang Yi <zhangyi@everest-semi.com>: The driver is for codec ES8389 of everest-semi.
2025-05-14ASoC: codecs: add support for ES8389Zhang Yi4-1/+1110
The driver is for codec es8389 of everest which is different from ES8388 Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20250514094546.35508-2-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-14ASoC: cs35l56: Log tuning unique identifiers during firmware loadSimon Trimmer2-0/+29
The cs35l56 smart amplifier has some informational firmware controls that are populated by a tuning bin file to unique values - logging these during firmware load identifies the specific configuration being used on that device instance. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Link: https://patch.msgid.link/47762a5f1ce2b178ad863c6698296aea09b72e10.1747142267.git.simont@opensource.cirrus.com Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-13ASoC: tlv320aic3x: Use dev_err_probeNishanth Menon1-4/+2
During probe the regulator supply drivers may not yet be available. Use dev_err_probe to provide just the pertinent log. Signed-off-by: Nishanth Menon <nm@ti.com> Link: https://patch.msgid.link/20250512185739.2907466-1-nm@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-13ALSA: hda/tas2781: Fix the ld issue reported by kernel test robotShenghao Ding2-6/+6
After commit 9fa6a693ad8d ("ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage SND_SOC_TAS2781_FMWLIB")created a separated lib for i2c, However, tasdevice_remove() used for not only for I2C but for SPI being still in that lib caused ld issue. All errors (new ones prefixed by >>): >> ld.lld: error: undefined symbol: tasdevice_remove >>> referenced by tas2781_hda.c:33 (sound/pci/hda/tas2781_hda.c:33) >>> vmlinux.o:(tas2781_hda_remove) To fix this issue, the implementation of tasdevice_remove was moved from tas2781-comlib-i2c.c to tas2781-comlib.c. Fixes: 9fa6a693ad8d ("ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage SND_SOC_TAS2781_FMWLIB") Reported-by: kernel test robot <lkp@intel.com> Closes: https://urldefense.com/v3/__https://lore.kernel.org/oe-kbuild-all/202505111855.FP2fScKA-lkp@intel.com/__;!!G3vK!U-wdsvrOG1iezggZ55RYi8ikBxMaJD Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20250513085947.1121-1-shenghao-ding@ti.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-08ASoC: rt712-sdca: remove redundant else path of if statementColin Ian King1-6/+2
There is an if/else check where the else part is executed if adc_vol_flag is true, this else path checks if adc_vol_flag is true (which is a redundant second check) and the if path is always taken. Remove the redundant check and remove the else path since that can never occur. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20250508084527.316380-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-08ASoC: codecs: rt9123: Fix sparse cast warningChiYuan Huang1-3/+3
Use i2c block read/write API to fix casting warning. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202505072140.iHyLlDN6-lkp@intel.com/ Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://patch.msgid.link/185a5ffea22ebd20725fdc7739db6b6addfae3ad.1746672687.git.cy_huang@richtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-08ASoC: rt712-sdca: remove redundant else path of if statementColin Ian King1-6/+2
There is an if/else check where the else part is executed if adc_vol_flag is true, this else path checks if adc_vol_flag is true (which is a redundant second check) and the if path is always taken. Remove the redundant check and remove the else path since that can never occur. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20250507140907.255562-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-07ASoC: tas2781: Add a debugfs node for acoustic tuningShenghao Ding1-0/+154
"Acoustic Tuning" debugfs node is a bridge to the acoustic tuning tool which can tune the chips' acoustic effect. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20250507094616.210-1-shenghao-ding@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-07Add support for CS35L63 Smart AmplifierMark Brown6-25/+369
Merge series from Stefan Binding <sbinding@opensource.cirrus.com>: CS35L63 is a Mono Class-D PC Smart Amplifier, with Speaker Protection and Audio Enhancement Algorithms. CS35L63 uses a similar control interface to CS35L56 so support for it can be added into the CS35L56 driver. CS35L63 only has SoundWire and I2C control interfaces.
2025-05-07ASoC: codec: cs42l[56,73,52]: Convert to GPIOMark Brown3-122/+150
Merge series from "Peng Fan (OSS)" <peng.fan@oss.nxp.com>: This patchset is separate from [1], and not merging changes in one patch. So separate changes into three patches for each chip. - sort headers - Drop legacy platform support - Convert to GPIO descriptors 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_cansleep to configure output value. I not have platforms to test, just do the patches with my best efforts, and make build pass. [1] https://lore.kernel.org/all/20250408-asoc-gpio-v1-0-c0db9d3fd6e9@nxp.com/
2025-05-06ASoC: codec: cs42l52: Convert to GPIO descriptorsPeng Fan1-16/+12
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_cansleep to configure output value. Checking the current driver using legacy GPIO API, the reset value is first output HIGH, then LOW, then HIGH. Checking the datasheet, the device remains in Power-down state until RESET pin is brought high. Since the driver has been here for quite long time and no complain on the reset flow, still follow original flow when using GPIOD descriptors. Per datasheet, the DTS polarity should be GPIOD_ACTIVE_LOW. The binding example use value 0(GPIOD_ACTIVE_HIGH) which seems wrong. And the binding use reset-gpio as example, not same as driver using "cirrus,reset-gpio", and there is no in-tree DTS has the device, so all should be fine with this patch. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250506-csl42x-v3-9-e9496db544c4@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: codec: cs42l52: Drop cs42l52.hPeng Fan1-32/+46
There is no in-tree user of "include/sound/cs42l52.h", so move 'struct cs42l52_platform_data ' to cs42l52.c and remove the header file. And platform data is mostly for legacy platforms that create devices non using device tree. So drop cs42l52.h to prepare using GPIOD API. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250506-csl42x-v3-8-e9496db544c4@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: codec: cs42l52: Sort headers alphabeticallyPeng Fan1-8/+8
Sort headers alphabetically to easily insert new ones and drop unused ones. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250506-csl42x-v3-7-e9496db544c4@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: codec: cs42l73: Convert to GPIO descriptorsPeng Fan1-15/+11
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_cansleep to configure output value. Checking the current driver using legacy GPIO API, the reset value is first output HIGH, then LOW, then HIGH. Checking the datasheet, Hold RESET LOW (active) until all the power supply rails have risen to greater than or equal to the minimum recommended operating voltages. Since the driver has been here for quite long time and no complain on the reset flow, still follow original flow when using GPIOD descriptors. Per datasheet, the DTS polarity should be GPIOD_ACTIVE_LOW. The binding example use value 0(GPIOD_ACTIVE_HIGH) which seems wrong. There is no in-tree DTS has the device, so all should be fine. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250506-csl42x-v3-6-e9496db544c4@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: codec: cs42l73: Drop cs42l73.hPeng Fan1-18/+18
There is no in-tree user of "include/sound/cs42l56.h", so move 'struct cs42l73_platform_data ' to cs42l73.c and remove the header file. And platform data is mostly for legacy platforms that create devices non using device tree. So drop cs42l73.h to prepare using GPIOD API. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250506-csl42x-v3-5-e9496db544c4@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: codec: cs42l73: Sort headers alphabeticallyPeng Fan1-7/+7
Sort headers alphabetically to easily insert new ones and drop unused ones. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250506-csl42x-v3-4-e9496db544c4@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: codec: cs42l56: Convert to GPIO descriptorsPeng Fan1-14/+11
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_cansleep to configure output value. Checking the current driver using legacy GPIO API, the nreset value is first output HIGH, then LOW, then HIGH. Checking the datasheet, nreset is should be held low after power on, when nreset is high, it starts to work. Since the driver has been here for quite long time and no complain on the nreset flow, still follow original flow when using GPIOD descriptors. Commit 944004eb56dc ("gpiolib: of: add a quirk for reset line for Cirrus CS42L56 codec") added quirks, so the gpio request API will work as before. Per datasheet, the DTS polarity should be GPIOD_ACTIVE_LOW. The binding example use value 0(GPIOD_ACTIVE_HIGH) which seems wrong. There is no in-tree DTS has the device, so all should be fine. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250506-csl42x-v3-3-e9496db544c4@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: codec: cs42l56: Drop cs42l56.hPeng Fan1-12/+37
There is no in-tree user of "include/sound/cs42l56.h", so move 'struct cs42l56_platform_data' to cs42l56.c and remove the header file. And platform data is mostly for platforms that create devices non using device tree. CS42L56 is a discontinued product, there is less possibility that new users will use legacy method to create devices. So drop cs42l56.h to prepare using GPIOD API. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250506-csl42x-v3-2-e9496db544c4@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: codec: cs42l56: Sort headers alphabeticallyPeng Fan1-11/+11
Sort headers alphabetically to easily insert new ones and drop unused ones. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250506-csl42x-v3-1-e9496db544c4@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: cs35l56: Read Silicon ID from DIE_STS registers for CS35L63Stefan Binding1-3/+36
On CS35L63 the DIE_STS registers are populated by the Firmware from OTP, so the driver can read these registers directly, rather than obtaining them from OTP. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250407151842.143393-6-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: cs35l56: Add initial support for CS35L63 for I2C and SoundWireStefan Binding5-2/+225
CS35L63 uses a similar control interface to CS35L56 so support for it can be added into the CS35L56 driver. New regmap configs have been added to support CS35L63. CS35L63 only has SoundWire and I2C control interfaces. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250407151842.143393-5-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: cs35l56: Add Mute, Volume and Posture registers to firmware register listStefan Binding2-3/+41
Registers to set Mute, Volume and Posture are inside firmware, which means they should be added to the list of registers set inside firmware, in case they vary across Device or Revision. These three registers are also used for controls, so additional handling is required to be able to obtain and set the register inside ALSA controls. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250407151842.143393-4-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: cs35l56: Add struct to index firmware registersStefan Binding5-11/+41
Firmware based registers may be different addresses across different device ids and revision ids. Create a structure to store and access these addresses. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250407151842.143393-3-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>