Commit graph

54975 commits

Author SHA1 Message Date
Bard Liao
89e1d632bb
ASoC: SOF: Intel: add hda_dsp_stream_pair_get/put helpers
Currently, hda_dsp_stream_get/put are used to get/put the host dma.
However, we may want to use a hda stream that both host and link dma are
available. Add helper to find the hda stream and reserve/release it.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20260203114027.3742558-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-03 13:47:19 +00:00
Shuming Fan
6e1e735181
ASoC: rt1320: fix intermittent no-sound issue
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-03 13:47:12 +00:00
Bard Liao
284e70ace9
ASoC: SOF: Intel: use hdev->info.link_mask directly
The link_mask variable is not changed after setting to
hdev->info.link_mask until it is used for another purpose to get the
used SoundWire links and set to mach->mach_params.links. Besides, the
link_mask variable should be reset before any link id is added to the
link_mask. To fix the issue above and avoid confusing, use the
hdev->info.link_mask variable directly to check if the SoundWire link
is enabled.

Fixes: 5226d19d4c ("ASoC: SOF: Intel: use sof_sdw as default SDW machine driver")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260203072405.3716307-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-03 13:47:11 +00:00
Mark Brown
d83039b5dc
ASoC: es8328: error handling and resume fixes
Merge series from Hsieh Hung-En <hungen3108@gmail.com>:

This series fixes some issues and improves robustness in the es8328
driver.
2026-02-02 23:31:48 +00:00
Mark Brown
0f625fc2de
ASoC: amd: acp: Add ACP7.0 match entries for Cirrus
Merge series from Simon Trimmer <simont@opensource.cirrus.com>:

This patch series adds a number of ACP7.0 match table entries that are
being used in customer products.

Some of the configurations are very similar so the series begins with
renaming and sorting the existing structures so that the end result is
easier to manage.
2026-02-02 23:31:44 +00:00
Mark Brown
c1b835eefb
Anbernic RG-DS AW87391 Speaker Amps
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-02 23:31:39 +00:00
Cédric Bellegarde
8a066a81ee
ASoC: qcom: q6asm: drop DSP responses for closed data streams
'Commit a354f030db ("ASoC: qcom: q6asm: handle the responses
after closing")' attempted to ignore DSP responses arriving
after a stream had been closed.

However, those responses were still handled, causing lockups.

Fix this by unconditionally dropping all DSP responses associated with
closed data streams.

Signed-off-by: Cédric Bellegarde <cedric.bellegarde@adishatz.org>
Link: https://patch.msgid.link/20260102215225.609166-1-cedric.bellegarde@adishatz.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02 21:52:19 +00:00
Ethan Nelson-Moore
090c8844e5
ASoC: wcd-mbhc-v2: remove unnecessary module_init/exit functions
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-02 21:52:18 +00:00
Simon Trimmer
ddd9bf2212
ASoC: amd: acp: Add ACP7.0 match entries for Cirrus Logic parts
This adds some match entries for a few system configurations:

cs42l45 link 1 UID 0
cs35l63 link 0 UID 0
cs35l63 link 0 UID 2
cs35l63 link 0 UID 4
cs35l63 link 0 UID 6

cs42l45 link 0 UID 0
cs35l63 link 1 UID 0
cs35l63 link 1 UID 1

cs42l45 link 0 UID 0
cs35l63 link 1 UID 1
cs35l63 link 1 UID 3

cs42l45 link 1 UID 0
cs35l63 link 0 UID 0
cs35l63 link 0 UID 1

cs35l63 link 0 UID 0
cs35l63 link 0 UID 2
cs35l63 link 0 UID 4
cs35l63 link 0 UID 6

cs42l43 link 0 UID 1

cs42l43b link 0 UID 1

cs42l45 link 0 UID 0

cs42l45 link 1 UID 0

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Reviewed-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Link: https://patch.msgid.link/6cac5670fd5bc14201d925584251d75e59307431.1769534442.git.simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02 13:24:12 +00:00
Simon Trimmer
3de9cf4782
ASoC: amd: acp: Sort Cirrus Logic match entries
In preparation for adding more match entries sort the ones that are
present.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/0a756390dfb7e928246d0f35c611f175e1311e55.1769534442.git.simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02 13:24:11 +00:00
Simon Trimmer
5eb3fc48d3
ASoC: amd: acp: Rename Cirrus Logic component match entries to include link and uid
In preparation for having similar matches with multiple UIDs on the same
bus rename the match entries to include the bus link and device uid
numbers in their name using the lNuN convention.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/f8f7fab5131ea6080421812dcce3e9ffc5b936e0.1769534442.git.simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02 13:24:10 +00:00
Simon Trimmer
9ba734901c
ASoC: amd: acp: Sort match table into most specific first
Match tables should be sorted so that more complex combinations of
device matches are before simpler combinations, with the single device
matches at the end.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/50c385a7f64ccd75cabf49eddbc0ec6fe13f3252.1769534442.git.simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02 13:24:09 +00:00
Hsieh Hung-En
8232e6079a
ASoC: es8328: Add error unwind in resume
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-02 12:50:03 +00:00
Hsieh Hung-En
9917d99f44
ASoC: es8328: Use cached regmap on resume
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-02 12:50:02 +00:00
Hsieh Hung-En
3570e8eef2
ASoC: es8328: Check errors in set_dai_fmt()
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-02 12:50:01 +00:00
Hsieh Hung-En
0801a03a31
ASoC: es8328: Propagate errors in set_bias_level()
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-02 12:50:00 +00:00
Hsieh Hung-En
4c6b74d587
ASoC: es8328: Fix DAC deemphasis control handling
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-02 12:49:59 +00:00
Chris Morgan
a145cfd0ff
ASoC: codecs: aw87390: Add Anbernic RG-DS amp driver
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-02 12:18:46 +00:00
Arnd Bergmann
742048f2e1
ASoC: fsl_sai: add IMX_SCMI_MISC_DRV dependency
The sai driver now links against the SCMI code directly, causing a
link failure when that is in a loadable module:

aarch64-linux-ld: sound/soc/fsl/fsl_sai.o: in function `fsl_sai_probe':
fsl_sai.c:(.text+0x1fe4): undefined reference to `scmi_imx_misc_ctrl_set'

Move the dependency from SND_SOC_FSL_MQS to SND_SOC_FSL_SAI. The MQS
driver depends on the SAI one, so it still gets the same dependency
indirectly.

All other drivers that select the SAI symbol need the same dependency
in turn, though that could probably get replaced with a 'depends on
SND_SOC_FSL_SAI' to keep it simpler.

Fixes: 19b08fd23b ("ASoC: fsl_sai: Add AUDMIX mode support on i.MX952")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260202095353.1233963-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02 12:09:36 +00:00
Arnd Bergmann
cad9720dd7
ASoC: sophgo: fix 64-bit division build failure
cv1800b_adc_setbclk_div() does four 64-bit divisions in a row, which
is rather inefficient on 32-bit systems, and using the plain division
causes a build failure as a result:

ERROR: modpost: "__aeabi_uldivmod" [sound/soc/sophgo/cv1800b-sound-adc.ko] undefined!

Consolidate those into a single division using the div_u64() macro.

Fixes: 4cf8752a03 ("ASoC: sophgo: add CV1800B internal ADC codec driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260202095323.1233553-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02 12:09:35 +00:00
Arnd Bergmann
1db63f6af1
ASoC: rt5575: fix SPI dependency
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: 420739112e ("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-02 12:09:34 +00:00
Dirk Su
611c7d2262
ASoC: amd: yc: Add quirk for HP 200 G2a 16
Fix the missing mic on HP 200 G2a 16 by adding quirk with the
board ID 8EE4

Signed-off-by: Dirk Su <dirk.su@canonical.com>
Link: https://patch.msgid.link/20260129065038.39349-1-dirk.su@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02 12:09:27 +00:00
Charles Keepax
e77a4081d7
ASoC: cs42l43: Correct handling of 3-pole jack load detection
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-02-02 12:09:26 +00:00
Tagir Garaev
6b641122d3
ASoC: Intel: sof_es8336: Add DMI quirk for Huawei BOD-WXX9
Add DMI entry for Huawei Matebook D (BOD-WXX9) with HEADPHONE_GPIO
and DMIC quirks.

This device has ES8336 codec with:
- GPIO 16 (headphone-enable) for headphone amplifier control
- GPIO 17 (speakers-enable) for speaker amplifier control
- GPIO 269 for jack detection IRQ
- 2-channel DMIC

Hardware investigation shows that both GPIO 16 and 17 are required
for proper audio routing, as headphones and speakers share the same
physical output (HPOL/HPOR) and are separated only via amplifier
enable signals.

RFC: Seeking advice on GPIO control issue:

GPIO values change in driver (gpiod_get_value() shows logical value
changes) but not physically (debugfs gpio shows no change). The same
gpiod_set_value_cansleep() calls work correctly in probe context with
msleep(), but fail when called from DAPM event callbacks.

Context information from diagnostics:
- in_atomic=0, in_interrupt=0, irqs_disabled=0
- Process context: pipewire
- GPIO 17 (speakers): changes in driver, no physical change
- GPIO 16 (headphone): changes in driver, no physical change

In Windows, audio switching works without visible GPIO changes,
suggesting possible ACPI/firmware involvement.

Any suggestions on how to properly control these GPIOs from DAPM
events would be appreciated.

Signed-off-by: Tagir Garaev <tgaraev653@gmail.com>
Link: https://patch.msgid.link/20260201121728.16597-1-tgaraev653@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02 12:09:25 +00:00
Maciej Strozek
1425900231
ASoC: sof_sdw: Add a quirk for Lenovo laptop using sidecar amps with cs42l43
Add a quirk for a Lenovo laptop (SSID: 0x17aa3821) to allow using sidecar
CS35L57 amps with CS42L43 codec.

Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260128092410.1540583-1-mstrozek@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02 11:09:35 +00:00
Vivian Wang
cb9b6f9d2b ALSA: hda/intel: Make MSI address limit based on the device DMA limit
The hda/intel driver restricts the MSI message address for devices which do
not advertise full 64-bit DMA address space support to 32-bit due to the
former restrictions of the PCI/MSI code which only allowed either 32-bit or
a full 64-bit address range.

This does not work on platforms which have a MSI doorbell address above the
32-bit boundary but do not support the full 64 bit address range.

The PCI/MSI core converted this binary decision to a DMA_BIT_MASK() based
decision, which allows to describe the device limitations precisely.

Convert the driver to provide the exact DMA address limitations to the
PCI/MSI core. That allows devices which do not support the full 64-bit
address space to work on platforms which have a MSI doorbell address above
the 32-bit limit as long as it is within the hardware's addressable range.

[ tglx: Massage changelog ]

Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Acked-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260129-pci-msi-addr-mask-v4-4-70da998f2750@iscas.ac.cn
2026-01-31 01:11:48 +01:00
Vivian Wang
386ced19e9 PCI/MSI: Convert the boolean no_64bit_msi flag to a DMA address mask
Some PCI devices have PCI_MSI_FLAGS_64BIT in the MSI capability, but
implement less than 64 address bits. This breaks on platforms where such
a device is assigned an MSI address higher than what's supported.

Currently, no_64bit_msi bit is set for these devices, meaning that only
32-bit MSI addresses are allowed for them. However, on some platforms the
MSI doorbell address is above the 32-bit limit but within the addressable
range of the device.

As a first step to enable MSI on those combinations of devices and
platforms, convert the boolean no_64bit_msi flag to a DMA mask and fixup
the affected usage sites:

  - no_64bit_msi = 1    ->    msi_addr_mask = DMA_BIT_MASK(32)
  - no_64bit_msi = 0    ->    msi_addr_mask = DMA_BIT_MASK(64)
  - if (no_64bit_msi)   ->    if (msi_addr_mask < DMA_BIT_MASK(64))

Since no values other than DMA_BIT_MASK(32) and DMA_BIT_MASK(64) are used,
this is functionally equivalent.

This prepares for changing the binary decision between 32 and 64 bit to a
DMA mask based decision which allows to support systems which have a DMA
address space less than 64bit but a MSI doorbell address above the 32-bit
limit.

[ tglx: Massaged changelog ]

Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Brett Creeley <brett.creeley@amd.com> # ionic
Reviewed-by: Thomas Gleixner <tglx@kernel.org>
Acked-by: Takashi Iwai <tiwai@suse.de> # sound
Link: https://patch.msgid.link/20260129-pci-msi-addr-mask-v4-1-70da998f2750@iscas.ac.cn
2026-01-31 01:11:48 +01:00
Chen Ni
a1d14d8364
ASoC: codecs: max98390: Check return value of devm_gpiod_get_optional() in 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-30 13:53:23 +00:00
Boris Faure
bbb758a694
ASoC: sdca: Fix missing regmap dependencies in Kconfig
The SDCA modules failed to build with modpost errors:

  ERROR: modpost: "__devm_regmap_init_sdw" [sound/soc/sdca/snd-soc-sdca-class.ko] undefined!
  ERROR: modpost: "__devm_regmap_init_sdw_mbq" [sound/soc/sdca/snd-soc-sdca-class-function.ko] undefined!

The issue occurs because:
- sdca_class.c calls devm_regmap_init_sdw() which requires REGMAP_SOUNDWIRE
- sdca_class_function.c calls devm_regmap_init_sdw_mbq_cfg() which requires REGMAP_SOUNDWIRE_MBQ

However, the Kconfig didn't select these dependencies, causing the symbols
to be unavailable when the SDCA modules are built.

Fix this by adding:
- select REGMAP_SOUNDWIRE to SND_SOC_SDCA_CLASS
- select REGMAP_SOUNDWIRE_MBQ to SND_SOC_SDCA_CLASS_FUNCTION

This ensures the required regmap drivers are enabled when building SDCA support.

Configuration after fix:
  CONFIG_SND_SOC_SDCA_CLASS=m
  CONFIG_SND_SOC_SDCA_CLASS_FUNCTION=m
  CONFIG_REGMAP_SOUNDWIRE=m
  CONFIG_REGMAP_SOUNDWIRE_MBQ=m

Signed-off-by: Boris Faure <boris@fau.re>
Link: https://patch.msgid.link/20260129141419.13843-1-boris@fau.re
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-29 14:16:59 +00:00
Takashi Iwai
00f32dfced ASoC: Fixes for v6.19
A couple of small fixes and a couple of quirks, nothing major
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAml7R60ACgkQJNaLcl1U
 h9C3vgf/QuwPWH9VpWT+bfMPcdjASh2+UdBIzUrCO2SRxQDK7S1RPJCVCvkw9Cmu
 hWpHq5JudgkzzK46hil2zB6y2DKFCYNjoLBwmYweJ/tBG02nqDhLjiqI7nllIF8t
 l3+MpKqiEeiikrdpTrluChwMnbZpi8poR7JQt1arQ3BB+1bw3wqT545lDkif5S+5
 hVs0/XRwOXa3NOSUFYQOUImctsh3VEgI9BeUFpzCtOpCONr0BrVhRWiUF8E056TA
 xLLVj43v4lpkLsCHFwshulfsLAGy94VVyJdRUkABhl/aH9S9RyD8hNHMGjaHQ5y/
 rpzKmqrvIHxt7RV157hga66MF2ZT3g==
 =siK8
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v6.19-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.19

A couple of small fixes and a couple of quirks, nothing major
2026-01-29 13:58:06 +01:00
Maciej Strozek
94e5baff3e
ASoC: sof_sdw: Add a quirk for Lenovo laptop using sidecar amps with cs42l43
Add a quirk for a Lenovo laptop (SSID: 0x17aa3821) to allow using sidecar
CS35L57 amps with CS42L43 codec.

Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260128092410.1540583-1-mstrozek@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-29 11:41:54 +00:00
Mark Brown
fc15f8a41e
regmap: reg_default_cb for flat cache defaults
Merge series from "Sheetal ." <sheetal@nvidia.com>:

This series adds a reg_default_cb callback for REGCACHE_FLAT to provide
defaults for registers not listed in reg_defaults. Defaults are loaded
eagerly during regcache init and the callback can use writeable_reg to
filter valid addresses and avoid holes.

Tegra ASoC drivers set reg_default_cb and add writeable_reg filtering for
AHUB RX holes to prevent invalid addresses from being marked valid.
2026-01-29 00:24:43 +00:00
Kuninori Morimoto
88340fc880
ASoC: soc-core: add lockdep_assert_held() at snd_soc_unregister_dai()
snd_soc_register_dai()           has  lockdep_assert_held() (A), but
snd_soc_unregister_dai() doesn't have lockdep_assert_held() (B).

	void snd_soc_unregister_dai(...)
	{
(B)		dev_dbg(...);
		list_del(...);
	}

	struct snd_soc_dai *snd_soc_register_dai(...)
	{
		...
(A)		lockdep_assert_held(&client_mutex);
		...
	}

Both functions should be called with client_mutex lock.
Add missing lockdep_assert_held() at snd_soc_unregister_dai().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87jyx21nu4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-28 19:31:52 +00:00
Sheetal
9409d18bf7
ASoC: tegra: set reg_default_cb callback
Set reg_default_cb so REGCACHE_FLAT can supply zero defaults without
large reg_defaults tables, simplifying cache initialization for
zero-reset registers.

Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://patch.msgid.link/20260123095346.1258556-4-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-28 12:12:17 +00:00
Sheetal
0ba6286a71
ASoC: tegra: Add AHUB writeable_reg for RX holes
Add writeable_reg callbacks for Tegra210/186 AHUB RX registers so the
flat cache only treats valid RX locations as writable, avoiding holes
in the register map.

Fixes: 16e1bcc2ca ("ASoC: tegra: Add Tegra210 based AHUB driver")
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://patch.msgid.link/20260123095346.1258556-2-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-28 12:12:16 +00:00
Shengjiu Wang
ab3f4f0c7f
ASoC: wm8962: add .set_tdm_slot callback function
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-28 11:22:24 +00:00
Mark Brown
75ca86026b
ASoC: sophgo: add CV1800 I2S controllers support
Merge series from "Anton D. Stavinskii" <stavinsky@gmail.com>:

This patch series adds basic audio support for Sophgo CV1800B,
as used on boards such as the Milk-V Duo.
The series introduces the I2S controller driver,
the DAC and ADC codec drivers, corresponding DT bindings,
and DTS updates to wire the components together.

The implementation is based on vendor documentation
and testing on real hardware.  This series relies on
recent fixes in the DesignWare AXI DMA support;
in particular, correct operation depends on
the DMA changes discussed at:
https://lore.kernel.org/all/20251214224601.598358-1-inochiama@gmail.com/
The current driver implementation supports a fixed audio configuration
of 48 kHz sample rate and only I2S protocol which is used in codecs.
The series has been tested on the Milk-V Duo 256M board using
the Sophgo SG2002 SoC. The implementation is expected to also work on
Milk-V Duo and Milk-V Module boards based on the SG2000 SoC,
as the audio and DMA blocks are closely related.

Known hardware limitation:
On CV1800B / SG2002, the I2S2 output pins cannot be enabled via
pinctrl alone.  Due to SoC design constraints, the output path becomes
functional only after additional vendor-specific register programming.
This series makes the limitation explicit and does not attempt
to work around it implicitly via pinctrl or undocumented behavior.
2026-01-28 01:22:16 +00:00
Mark Brown
b4ee17729a
ASoC: capsuling struct snd_soc_dapm_context
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-28 00:37:54 +00:00
Mark Brown
1924bd68a0
ASoC: codec: Remove ak4641/pxa2xx-ac97 and convert to
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-28 00:37:49 +00:00
Mark Brown
ab2e3fa491
ASoC: fsl_audmix: Support the i.MX952 platform
Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>:

Enable AUDMIX on i.MX952 platform, update dt binding document and
driver.

SAI is connected to AUDMIX, and the AUDMIX can be bypassed, so
add 'fsl,sai-amix-mode' property in SAI binding document for this
case.
2026-01-28 00:37:45 +00:00
Anton D. Stavinskii
8cf19b19db
ASoC: sophgo: cv1800b: tidy Kconfig spacing
Restore the empty line that was accidentally removed earlier

Signed-off-by: Anton D. Stavinskii <stavinsky@gmail.com>
Link: https://patch.msgid.link/20260127-incremental-for-i2s-dvier-v2-2-5f66b841f63d@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 20:06:36 +00:00
Anton D. Stavinskii
a8e3e48829
ASoC: sophgo: cv1800b: document DAC overwrite handling
Add comments to cv1800b_dac_mute() and its caller to explain how the
overwrite mechanism works and why we force it off before playback.

Signed-off-by: Anton D. Stavinskii <stavinsky@gmail.com>
Link: https://patch.msgid.link/20260127-incremental-for-i2s-dvier-v2-1-5f66b841f63d@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 20:06:35 +00:00
Anton D. Stavinskii
b3eb755e2d
ASoC: sophgo: add CV1800B internal DAC codec driver
Codec DAI endpoint for TXDAC. The codec does only a few things
- set up decimation
- enable codec and I2S output
- ensures the driver doesn't have dac overwrite enabled. (unmute the
  output)

Signed-off-by: Anton D. Stavinskii <stavinsky@gmail.com>
Link: https://patch.msgid.link/20260120-cv1800b-i2s-driver-v4-5-6ef787dc6426@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 12:52:06 +00:00
Anton D. Stavinskii
4cf8752a03
ASoC: sophgo: add CV1800B internal ADC codec driver
Codec DAI endpoint for RXADC + basic controls.
THe codec have basic volume control. Which is
imlemented by lookup table for simplicity.
The codec expects set_sysclk callback to
adjust internal mclk divider.

Signed-off-by: Anton D. Stavinskii <stavinsky@gmail.com>
Link: https://patch.msgid.link/20260120-cv1800b-i2s-driver-v4-4-6ef787dc6426@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 12:52:05 +00:00
Anton D. Stavinskii
ea0fb91c02
ASoC: sophgo: add CV1800B I2S/TDM controller driver
The actual CPU DAI controller. The driver can be used with
simple-audio-card. It respects fixed clock configuration
from simple-audio-card. The card driver can request direction out,
this will be interpreted as mclk out, the clock which can be used
in other CPU or codecs. For example I2S3 generates clock for ADC.
I2S was tested in S24_32 and S16 dual channel formats.

Signed-off-by: Anton D. Stavinskii <stavinsky@gmail.com>
Link: https://patch.msgid.link/20260120-cv1800b-i2s-driver-v4-2-6ef787dc6426@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 12:52:03 +00:00
Chen Ni
74823db9ba
ASoC: sunxi: sun50i-dmic: Add missing check for devm_regmap_init_mmio
Add check for the return value of devm_regmap_init_mmio() and return the
error if it fails in order to catch the error.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://patch.msgid.link/20260127033250.2044608-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 12:46:04 +00:00
Chen Ni
8ef73c0fbd
ASoC: sun4i-spdif: Add missing check for devm_regmap_init_mmio
Add check for the return value of devm_regmap_init_mmio() and return the
error if it fails in order to catch the error.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://patch.msgid.link/20260127034025.2044669-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 12:46:03 +00:00
Peng Fan
c76d50b71e
ASoC: ac97: Convert to GPIO descriptors
of_gpio.h is deprecated, update the driver to use GPIO descriptors.
 - Use devm_gpiod_get to get GPIO descriptor, and set consumer
   name.

Since the driver still pass the reset_gpio to pxa27x_configure_ac97reset,
so use desc_to_gpio() to get it gpio id.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://patch.msgid.link/20260122-sound-cleanup-v1-4-0a91901609b8@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 12:45:57 +00:00
Peng Fan
be829277ef
ASoC: pxa2xx-ac97: Remove platform_data
Since commit d6df7df7ae ("ARM: pxa: remove unused board files"), there
has been no in-tree user to create the device with platform data. So remove
them.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Link: https://patch.msgid.link/20260122-sound-cleanup-v1-3-0a91901609b8@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 12:45:56 +00:00
Peng Fan
b094de7810
ASoC: codec: Remove pxa2xx-ac97.c
With commit ce79f3a1ad ("ARM: pxa: prune unused device support") and
commit 2548e6c76e ("ARM: pxa: pxa2xx-ac97-lib: use IRQ resource"), there
is no 'pxa2xx-ac97' platform device created by machine level code, so this
driver could be removed.

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-2-0a91901609b8@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 12:45:55 +00:00