summaryrefslogtreecommitdiff
path: root/sound/soc/codecs
AgeCommit message (Collapse)Author
10 daysASoC: adau1372: Fix error handling in adau1372_set_power()Mark Brown
Jihed Chaibi <jihed.chaibi.dev@gmail.com> says: adau1372_set_power() had two related error handling issues in its enable path: clk_prepare_enable() was called but its return value discarded, and adau1372_enable_pll() was a void function that silently swallowed lock failures, leaving mclk enabled and adau1372->enabled set to true despite the device being in a broken state. Patch 1 fixes the unchecked clk_prepare_enable() by making adau1372_set_power() return int and propagating the error. Patch 2 converts adau1372_enable_pll() to return int and adds a full unwind in adau1372_set_power() if PLL lock fails, reversing the regcache, GPIO power-down, and clock state.
10 daysASoC: adau1372: Fix clock leak on PLL lock failureJihed Chaibi
adau1372_enable_pll() was a void function that logged a dev_err() on PLL lock timeout but did not propagate the error. As a result, adau1372_set_power() would continue with adau1372->enabled set to true despite the PLL being unlocked, and the mclk left enabled with no corresponding disable on the error path. Convert adau1372_enable_pll() to return int, using -ETIMEDOUT on lock timeout and propagating regmap errors directly. In adau1372_set_power(), check the return value and unwind in reverse order: restore regcache to cache-only mode, reassert GPIO power-down, and disable the clock before returning the error. Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com> Fixes: 6cd4c6459e47 ("ASoC: Add ADAU1372 audio CODEC support") Reviewed-by: Nuno Sá <nuno.sa@analog.com> Link: https://patch.msgid.link/20260325210704.76847-3-jihed.chaibi.dev@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: adau1372: Fix unchecked clk_prepare_enable() return valueJihed Chaibi
adau1372_set_power() calls clk_prepare_enable() but discards the return value. If the clock enable fails, the driver proceeds to access registers on unpowered hardware, potentially causing silent corruption. Make adau1372_set_power() return int and propagate the error from clk_prepare_enable(). Update adau1372_set_bias_level() to return the error directly for the STANDBY and OFF cases. Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com> Fixes: 6cd4c6459e47 ("ASoC: Add ADAU1372 audio CODEC support") Reviewed-by: Nuno Sá <nuno.sa@analog.com> Link: https://patch.msgid.link/20260325210704.76847-2-jihed.chaibi.dev@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
12 daysASoC: codecs: wcd934x: fix typo in dt parsingSrinivas Kandagatla
Looks like we ended up with a typo during device tree data parsing as part of 4f16b6351bbff ("ASoC: codecs: wcd: add common helper for wcd codecs") patch. This will result in not parsing the device tree data and results in zero mic bias values. Fix this by calling wcd_dt_parse_micbias_info instead of wcd_dt_parse_mbhc_data. Fixes: 4f16b6351bbff ("ASoC: codecs: wcd: add common helper for wcd codecs") Cc: Stable@vger.kernel.org Reported-by: Joel Selvaraj <foss@joelselvaraj.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://patch.msgid.link/20260323231748.2217967-1-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-19ASoC: tas2781: Add null check for calibration dataBaojun Xu
For avoid null pointer problem if no calibration data exist. Fixes: 55137f5a68b5e ("ASoC: tas2781: Put three different calibrated data solution into the same data structure") Signed-off-by: Baojun Xu <baojun.xu@ti.com> Link: https://patch.msgid.link/20260319090747.2090-1-baojun.xu@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-16ASoC: sma1307: fix double free of devm_kzalloc() memoryGuangshuo Li
A previous change added NULL checks and cleanup for allocation failures in sma1307_setting_loaded(). However, the cleanup for mode_set entries is wrong. Those entries are allocated with devm_kzalloc(), so they are device-managed resources and must not be freed with kfree(). Manually freeing them in the error path can lead to a double free when devres later releases the same memory. Drop the manual kfree() loop and let devres handle the cleanup. Fixes: 0ec6bd16705fe ("ASoC: sma1307: Add NULL check in sma1307_setting_loaded()") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Link: https://patch.msgid.link/20260313040611.391479-1-lgs201920130244@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-10ASoC: codecs: rt1011: Use component to get the dapm context in spk_mode_putPeter Ujfalusi
The correct helper to use in rt1011_recv_spk_mode_put() to retrieve the DAPM context is snd_soc_component_to_dapm(), from kcontrol we will receive NULL pointer. Closes: https://github.com/thesofproject/linux/issues/5691 Fixes: 5b35bb517f27 ("ASoC: codecs: rt1011: convert to snd_soc_dapm_xxx()") Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/20260310065350.18921-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-05Merge tag 'asoc-fix-v7.0-rc2' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v7.0 A moderately large pile of fixes, though none of them are super major, plus a few new quirks and device IDs.
2026-03-01ASoC: cs35l56: Suppress pointless warning about number of GPIO pullsRichard Fitzgerald
In cs35l56_process_xu_onchip_speaker_id() the warning that the number of pulls != number of GPIOs should only be printed if pulls are defined. Pull settings are optional because there would normally be an external resistor providing the pull. The warning would still be true if pulls are not defined, but in that case is just log noise. While we're changing that block of code, also fix the indenting of the arguments to the dev_warn(). Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260226113511.1768838-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-01ASoC: rt1321: fix DMIC ch2/3 mask issueShuming Fan
This patch fixed the DMIC ch2/3 mask missing problem. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20260225091210.3648905-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-01ASoC: cs35l56: Only patch ASP registers if the DAI is part of a DAIlinkRichard Fitzgerald
Move the ASP register patches to a separate struct and apply this from the ASP DAI probe() function so that the registers are only patched if the DAI is part of a DAI link. Some systems use the ASP as a special-purpose interconnect and on these systems the ASP registers are configured by a third party (the firmware, the BIOS, or another device using the amp's secondary host control interface). If the machine driver does not hook up the ASP DAI then the ASP registers must be omitted from the patch to prevent overwriting the third party configuration. If the machine driver includes the ASP DAI in a DAI link, this implies that the machine driver and higher components (such as alsa-ucm) are taking ownership of the ASP. In this case the ASP registers are patched to known defaults and the machine driver should configure the ASP. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260226110137.1664562-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-28ALSA: hda/tas2781: A workaround solution to lower-vol issue among lower ↵Shenghao Ding
calibrated-impedance micro-speaker on TAS2781 On TAS2781, if the Speaker calibrated impedance is lower than default value hard-coded inside the TAS2781, it will cuase vol lower than normal. In order to fix this issue, the parameter of SineGainI need updating. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Tested-by: Matthew Schwartz <matthew.schwartz@linux.dev> Link: https://patch.msgid.link/20260227144641.1243-1-shenghao-ding@ti.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-02-23ASoC: cs42l43: Report insert for exotic peripheralsCharles Keepax
For some exotic peripherals the type detect can return a reserved value of 0x4. This will currently return an error and not report anything to user-space, update this to report the insert normally. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260223093616.3800350-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-22Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL usesKees Cook
Conversion performed via this Coccinelle script: // SPDX-License-Identifier: GPL-2.0-only // Options: --include-headers-for-types --all-includes --include-headers --keep-comments virtual patch @gfp depends on patch && !(file in "tools") && !(file in "samples")@ identifier ALLOC = {kmalloc_obj,kmalloc_objs,kmalloc_flex, kzalloc_obj,kzalloc_objs,kzalloc_flex, kvmalloc_obj,kvmalloc_objs,kvmalloc_flex, kvzalloc_obj,kvzalloc_objs,kvzalloc_flex}; @@ ALLOC(... - , GFP_KERNEL ) $ make coccicheck MODE=patch COCCI=gfp.cocci Build and boot tested x86_64 with Fedora 42's GCC and Clang: Linux version 6.19.0+ (user@host) (gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7), GNU ld version 2.44-12.fc42) #1 SMP PREEMPT_DYNAMIC 1970-01-01 Linux version 6.19.0+ (user@host) (clang version 20.1.8 (Fedora 20.1.8-4.fc42), LLD 20.1.8) #1 SMP PREEMPT_DYNAMIC 1970-01-01 Signed-off-by: Kees Cook <kees@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-21Convert more 'alloc_obj' cases to default GFP_KERNEL argumentsLinus Torvalds
This converts some of the visually simpler cases that have been split over multiple lines. I only did the ones that are easy to verify the resulting diff by having just that final GFP_KERNEL argument on the next line. Somebody should probably do a proper coccinelle script for this, but for me the trivial script actually resulted in an assertion failure in the middle of the script. I probably had made it a bit _too_ trivial. So after fighting that far a while I decided to just do some of the syntactically simpler cases with variations of the previous 'sed' scripts. The more syntactically complex multi-line cases would mostly really want whitespace cleanup anyway. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-21Convert 'alloc_flex' family to use the new default GFP_KERNEL argumentLinus Torvalds
This is the exact same thing as the 'alloc_obj()' version, only much smaller because there are a lot fewer users of the *alloc_flex() interface. As with alloc_obj() version, this was done entirely with mindless brute force, using the same script, except using 'flex' in the pattern rather than 'objs*'. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-21Convert 'alloc_obj' family to use the new default GFP_KERNEL argumentLinus Torvalds
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-21treewide: Replace kmalloc with kmalloc_obj for non-scalar typesKees Cook
This is the result of running the Coccinelle script from scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to avoid scalar types (which need careful case-by-case checking), and instead replace kmalloc-family calls that allocate struct or union object instances: Single allocations: kmalloc(sizeof(TYPE), ...) are replaced with: kmalloc_obj(TYPE, ...) Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...) are replaced with: kmalloc_objs(TYPE, COUNT, ...) Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...) are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...) (where TYPE may also be *VAR) The resulting allocations no longer return "void *", instead returning "TYPE *". Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20Merge tag 'sound-fix-7.0-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Here are a bunch of updates, but there should be no big surprises; mostly device-specific quirks and fix-ups or non-code changes: - Quirks for ASoC AMD, HD-audio and USB-audio - Fixes in ASoC fsl, rockchip, renesas, aw codecs - Fixes for USB-audio packet handling in the implicit feedback mode - Updates of SPDX license IDs in some files" * tag 'sound-fix-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (28 commits) ASoC: rockchip: i2s-tdm: Use param rate if not provided by set_sysclk ALSA: hda/hdmi: Add quirk for TUXEDO IBS14G6 ASoC: dt-bindings: asahi-kasei,ak5558: Fix the supply names ASoC: dt-bindings: asahi-kasei,ak4458: Fix the supply names ASoC: dt-bindings: asahi-kasei,ak4458: set unevaluatedProperties:false ASoC: amd: amd_sdw: add machine driver quirk for Lenovo models ASoC: amd: acp: Add ACP7.0 match entries for Realtek parts ALSA: echoaudio: Add SPDX ids to some files ALSA: isa: Add SPDX id lines to some files ALSA: core: Add SPDX license id to files ASoC: tas2783A: add explicit port prepare handling ASoC: renesas: rz-ssi: Fix playback and capture ALSA: hda/realtek: Fix headset mic on ASUS Zenbook 14 UX3405MA ALSA: hda/conexant: Fix headphone jack handling on Acer Swift SF314 ASoC: qcom: sm8250: Add quinary MI2S support ASoC: amd: yc: Add DMI quirk for ASUS Vivobook Pro 15X M6501RR ALSA: usb-audio: Avoid potentially repeated XRUN error messages ALSA: usb-audio: Add sanity check for OOB writes at silencing ALSA: usb-audio: Optimize the copy of packet sizes for implicit fb handling ALSA: usb-audio: Update the number of packets properly at receiving ...
2026-02-17Merge tag 'soundwire-7.0-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire Pull soundwire updates from Vinod Koul: - support for Qualcomm v2.2.0 controllers - bus method updates for .probe(), .remove() and .shutdown() and remove function return value updates - Avell B.ON dmi-quirks mapping - mark cs42l45 codec as wake capable * tag 'soundwire-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: intel_ace2x: add SND_HDA_CORE dependency dt-bindings: soundwire: qcom: Add SoundWire v2.2.0 compatible soundwire: Use bus methods for .probe(), .remove() and .shutdown() soundwire: Make remove function return no value soundwire: dmi-quirks: add mapping for Avell B.ON (OEM rebranded of NUC15) soundwire: qcom: Use guard to avoid mixing cleanup and goto soundwire: intel_auxdevice: add cs42l45 codec to wake_capable_list
2026-02-17ASoC: tas2783A: add explicit port prepare handlingNiranjan H Y
TAS2783a required port prepare bits to be set during playback even when it is using simplified CP_SM. Normally, SoundWire core handles prepare sequencing automatically depending on the type of the device available. For simplified CP_SM there is no need to set the prepare bits. However, due to a hardware limitation in TAS2783A, the port must still be explicitly prepared and de-prepared by the driver to ensure reliable playback. Add a custom .port_prep() callback to program DPN_PREPARECTRL during PRE_PREP and PRE_DEPREP operations. Signed-off-by: Niranjan H Y <niranjan.hy@ti.com> Link: https://patch.msgid.link/20260214104710.632-1-niranjan.hy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-12ASoC: codecs: aw88261: Fix erroneous bitmask logic in Awinic initAlexandre Ferrieux
The aw88261_dev_reg_update() function sets the Awinic registers in a rather nonuniform way: - most registers get directly overwritten from the firmware blob - but a handful of them need more delicate logic to preserve some bits from their current value, according to a register- specific mask For the latter, the logic is basically NEW = (OLD & MASK) | (VAL & ~MASK) However, the ~MASK value is hand-computed, and in the specific case of the SYSCTRL register, in a buggy way. This patch restores the proper ~MASK value. Fixes: 028a2ae25691 ("ASoC: codecs: Add aw88261 amplifier driver") Signed-off-by: Alexandre Ferrieux <alexandre.ferrieux@orange.com> Link: https://patch.msgid.link/20260211-aw88261-fwname-v1-1-e24e833a019d@fairphone.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-10ASoC: Merge up releaseMark Brown
We need to fix some commits that went into the final release.
2026-02-10ASoC: rt721-sdca: Fix issue of fail to detect OMTP jack typeJack Yu
Add related HP-JD settings to fix issue of fail to detect OMTP jack type. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://patch.msgid.link/20260210074335.2337830-1-jack.yu@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-09Merge tag 'asoc-v6.20' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v7.0 This release is almost all abut driers, there's very little core work here, although some of that driver work is in more generic areas like SDCA and SOF: - Generic SDCA support for reporting jack events. - Continuing platform support, cleanup and feature improements for the AMD, Intel, Qualcomm and SOF code. - Platform description improvements for the Cirrus drivers. - Support for NXP i.MX952, Realtek RT1320 and RT5575, and Sophogo CV1800B. We also pulled in one small SPI API update and some more substantial regmap work (cache description improvements) for use in drivers.
2026-02-05ASoC: cs35l56: More support for new Dell laptopsMark Brown
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: Some new Dell models use spare pins on the amp as a binary integer value to indicate the speaker type. The driver must use this to select the correct firmware files for the hardware. Patch #1 is the new support. The other patches are for KUnit testing.
2026-02-05ASoC: cs35l56: KUnit tests for parsing and using onchip GPIOsRichard Fitzgerald
Add KUnit test cases for: - cs35l56_process_xu_properties() which reads the onchip GPIO definitions. - cs35l56_set_fw_name() calls functions to configure and set the GPIOs. - cs35l56_set_fw_name() saves the ID value in cs35l56_priv.speaker_id. - cs35l56_set_fw_name() does not overwrite a speaker ID that was already found some other way. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260205164838.1611295-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-05ASoC: cs35l56-shared: KUnit tests for onchip speaker ID gpiosRichard Fitzgerald
Add KUnit testing of: cs35l56_check_and_save_onchip_spkid_gpios() cs35l56_configure_onchip_spkid_pads() cs35l56_read_onchip_spkid() The test consists of: - A mock regmap that simulates the pad and pin config registers. - Parameterization of the pin list, pulls list, a simulated value for each pin and the speaker ID value that this should produce. - A self-test of the simulated pin and GPIO registers. - A test that the value returned by cs35l56_read_onchip_spkid() is correct. - A test that the pin pull-up/down are set correctly by cs35l56_configure_onchip_spkid_pads() - A test that cs35l56_configure_onchip_spkid_pads() and cs35l56_read_onchip_spkid(0 return the expected values if cs35l56_base->num_onchip_spkid_gpios == 0. - A test that cs35l56_check_and_save_onchip_spkid_gpios() saves the configuration. - A test that cs35l56_check_and_save_onchip_spkid_gpios() rejects illegal GPIO numbers. - A test that cs35l56_check_and_save_onchip_spkid_gpios() rejects illegal pull types. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260205164838.1611295-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-05ASoC: cs35l56: Support for reading speaker ID from on-chip GPIOsRichard Fitzgerald
Add support for using the state of pins on the amplifier to indicate the type of speaker fitted. Previously, where there were alternate speaker vendors, this was indicated using host CPU GPIOs. Some new Dell models use spare pins on the CS35L63 as GPIOs for the speaker ID detection. Cirrus-specific SDCA Disco properties provide a list of the pins to be used, and pull-up/down settings for the pads. This list is ordered, MSbit to LSbit. The code to set the firmware filename has been modified to check for using chip pins for speaker ID. The entire block of code to set firmware name has been moved out of cs35l56_component_probe() into its own function to make it easier to KUnit test. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260205164838.1611295-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-05ASoC: cs4271: Fix resource leak in cs4271_soc_resume()Harshit Mogalapalli
Smatch detects this resource leak: sound/soc/codecs/cs4271.c:548 cs4271_soc_resume() warn: 'cs4271->clk' from clk_prepare_enable() not released on lines: 540,546. Instead of direct returns, unprepare the clock and disable regulators on the error paths. Fixes: cf6bf51b5325 ("ASoC: cs4271: Add support for the external mclk") Fixes: 9a397f473657 ("ASoC: cs4271: add regulator consumer support") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Herve Codina <herve.codina@bootlin.com> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Link: https://patch.msgid.link/20260110195337.2522347-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-04ASoC: tas2781: Put three different calibrated data solution into the same ↵Shenghao Ding
data structure TAS2781 driver supports three solutions of calibrated data. The first is from the driver itself: driver reads the calibrated files directly during probe; The second is from user space: during init of audio hal, the audio hal will pass the calibrated data via kcontrol interface. Driver will store this data in "struct calidata" for use. The third is from UEFI, mainly used in hda device. These three solutions save the calibrated data into different data structures. It is time to put them together into "struct calidata" for use. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20260202102757.532-1-shenghao-ding@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-03ASoC: rt1320: fix intermittent no-sound issueShuming Fan
This patch adds a setting to resolve the intermittent no-sound issue. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20260203084827.768238-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02ASoC: es8328: error handling and resume fixesMark Brown
Merge series from Hsieh Hung-En <hungen3108@gmail.com>: This series fixes some issues and improves robustness in the es8328 driver.
2026-02-02Anbernic RG-DS AW87391 Speaker AmpsMark Brown
Merge series from Chris Morgan <macroalpha82@gmail.com>: Add support for the Anbernic RG-DS Speaker Amplifiers. The Anbernic RG-DS uses two AW87391 ICs at 0x58 and 0x5B on i2c2. However, the manufacturer did not provide a firmware file, only a sequence of register writes to each device to enable and disable them. Add support for this *specific* configuration in the AW87390 driver. Since we are relying on a device specific sequence I am using a device specific compatible string. This driver does not currently support the aw87391 for any other device as I have none to test with valid firmware. Attempts to create firmware with the AwinicSCPv4 have not been successful.
2026-02-02ASoC: wcd-mbhc-v2: remove unnecessary module_init/exit functionsEthan Nelson-Moore
The wcd-mbhc-v2 driver has unnecessary empty module_init and module_exit functions. Remove them. Note that if a module_init function exists, a module_exit function must also exist; otherwise, the module cannot be unloaded. Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20260131020111.46108-1-enelsonmoore@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02ASoC: es8328: Add error unwind in resumeHsieh Hung-En
Handle failures in the resume path by unwinding previously enabled resources. If enabling regulators or syncing the regcache fails, disable regulators and unprepare the clock to avoid leaking resources and leaving the device in a partially resumed state. Signed-off-by: Hsieh Hung-En <hungen3108@gmail.com> Link: https://patch.msgid.link/20260130160017.2630-6-hungen3108@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02ASoC: es8328: Use cached regmap on resumeHsieh Hung-En
Use the regmap stored in the driver private data when restoring the register cache on resume, instead of looking it up from the device. This keeps the resume path consistent with the regmap instance used by the driver and avoids relying on a separate dev_get_regmap() lookup. Signed-off-by: Hsieh Hung-En <hungen3108@gmail.com> Link: https://patch.msgid.link/20260130160017.2630-5-hungen3108@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02ASoC: es8328: Check errors in set_dai_fmt()Hsieh Hung-En
Check and propagate return values from snd_soc_component_update_bits() in es8328_set_dai_fmt(). This avoids silent failures when register updates fail and ensures the DAI format is not left in an inconsistent state. Signed-off-by: Hsieh Hung-En <hungen3108@gmail.com> Link: https://patch.msgid.link/20260130160017.2630-4-hungen3108@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02ASoC: es8328: Propagate errors in set_bias_level()Hsieh Hung-En
Register writes and updates in set_bias_level() ignored return values, potentially masking I/O failures during bias level transitions. Check and propagate errors from component register writes and updates. Signed-off-by: Hsieh Hung-En <hungen3108@gmail.com> Link: https://patch.msgid.link/20260130160017.2630-3-hungen3108@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02ASoC: es8328: Fix DAC deemphasis control handlingHsieh Hung-En
The DAC deemphasis control updated the hardware before updating the cached state, causing the previous setting to be applied. Update the cached deemphasis state first and then apply the setting. Also check and propagate errors from es8328_set_deemph() in hw_params(). Signed-off-by: Hsieh Hung-En <hungen3108@gmail.com> Link: https://patch.msgid.link/20260130160017.2630-2-hungen3108@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02ASoC: codecs: aw87390: Add Anbernic RG-DS amp driverChris Morgan
Add support for Anbernic's RG-DS audio amplifiers, powered by Awinic AW87391 amplifier ICs. These chips typically require an init sequence provided by firmware, but the manufacturer did not provide firmware in this case. As a result we had to hard-code the init sequence and use a device specific binding (rather than a binding just for the aw87391). Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Link: https://patch.msgid.link/20260128174608.1498-3-macroalpha82@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02ASoC: rt5575: fix SPI dependencyArnd Bergmann
The rt5575 driver fails to link when SPI support is in a loadable module but the codec is built-in: x86_64-linux-ld: vmlinux.o: in function `rt5575_i2c_probe': rt5575.c:(.text+0x9792ce): undefined reference to `rt5575_spi_get_device' rt5575.c:(.text+0x979332): undefined reference to `rt5575_spi_fw_load' Change the symbol in to a 'bool' and add a dependency that rules out the broken configuration. Fixes: 420739112e95 ("ASoC: rt5575: Add the codec driver for the ALC5575") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20260202095432.1234133-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02ASoC: cs42l43: Correct handling of 3-pole jack load detectionCharles Keepax
The load detection process for 3-pole jacks requires slightly updated reference values to ensure an accurate result. Update the code to apply different tunings for the 3-pole and 4-pole cases. This also updates the thresholds overall so update the relevant comments to match. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260130150927.2964664-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-30ASoC: codecs: max98390: Check return value of devm_gpiod_get_optional() in ↵Chen Ni
max98390_i2c_probe() The devm_gpiod_get_optional() function may return an error pointer (ERR_PTR) in case of a genuine failure during GPIO acquisition, not just NULL which indicates the legitimate absence of an optional GPIO. Add an IS_ERR() check after the function call to catch such errors and propagate them to the probe function, ensuring the driver fails to load safely rather than proceeding with an invalid pointer. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://patch.msgid.link/20260130091904.3426149-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-28ASoC: wm8962: add .set_tdm_slot callback functionShengjiu Wang
The slot_width can be different with the params_width(), for example, DSP_A mode, slot_width = 32, but data format is S16_LE, if the word length is configured to be 16, there is no sound on the right speaker. So add .set_tdm_slot() callback function to configure the slot_width and update the word length according to slot_width in hw_params(). Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260128025955.2562331-1-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-28ASoC: capsuling struct snd_soc_dapm_contextMark Brown
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: Now, all DAPM users are using function to handling it. We can capsuling it. This patchset moves struct snd_soc_dapm_context into soc-dapm.c, and remove un-used functions. Link: https://lore.kernel.org/r/87zf7jrx52.wl-kuninori.morimoto.gx@renesas.com
2026-01-28ASoC: codec: Remove ak4641/pxa2xx-ac97 and convert toMark Brown
Merge series from "Peng Fan (OSS)" <peng.fan@oss.nxp.com>: The main goal is to convert drivers to use GPIO descriptors. While reading the code, I think it is time to remove ak4641 and pxa2xx-ac97 driver, more info could be found in commit log of each patch. Then only need to convert sound/arm/pxa2xx-ac97-lib.c to use GPIO descriptors. Not have hardware to test the pxa2xx ac97.
2026-01-27ASoC: codec: Remove ak4641Peng Fan
Since commit d6df7df7ae5a0 ("ARM: pxa: remove unused board files"), there has been no in-tree user of the AK4641 codec driver. The last user (HP iPAQ hx4700) was a non-DT PXA board file that instantiated the device via I2C board data; that code was removed as part of the PXA board-file purge. The AK4641 driver was introduced ~2011 and still probes only via the I2C device-ID table ('.id_table'), without an 'of_match_table', so there are no upstream Devicetree users to retain. With no in-tree users left, remove the driver. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Acked-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://patch.msgid.link/20260122-sound-cleanup-v1-1-0a91901609b8@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-26ASoC: codecs: wm8731: Remove unnecessary NULL check before ↵Chen Ni
clk_prepare_enable/clk_disable_unprepare clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter. Remove unneeded NULL check for wm8731->mclk here. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260126073528.1826406-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-26ASoC: codecs: rt1320-sdw: Refactor to reduce stack framesAndy Shevchenko
Compiler is not happy about used stack frames in a couple of functions: sound/soc/codecs/rt1320-sdw.c: In function 'rt1320_rae_load': sound/soc/codecs/rt1320-sdw.c:1570:1: error: the frame size of 1336 bytes is larger than 1280 bytes [-Werror=frame-larger-than=] sound/soc/codecs/rt1320-sdw.c: In function 'rt1320_dspfw_load_code': sound/soc/codecs/rt1320-sdw.c:1786:1: error: the frame size of 1520 bytes is larger than 1280 bytes [-Werror=frame-larger-than=] Refactor the code to fix these. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260124101824.3424793-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>