]> git.ipfire.org Git - thirdparty/linux.git/log
thirdparty/linux.git
3 days agoALSA: hda: cix-ipbloq: Use modern PM ops
Nathan Chancellor [Thu, 11 Dec 2025 01:50:03 +0000 (10:50 +0900)] 
ALSA: hda: cix-ipbloq: Use modern PM ops

When building without CONFIG_PM_SLEEP, there are several warnings (or
errors with CONFIG_WERROR=y / W=e) from the cix-ipbloq driver:

  sound/hda/controllers/cix-ipbloq.c:378:12: error: 'cix_ipbloq_hda_runtime_resume' defined but not used [-Werror=unused-function]
    378 | static int cix_ipbloq_hda_runtime_resume(struct device *dev)
        |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  sound/hda/controllers/cix-ipbloq.c:362:12: error: 'cix_ipbloq_hda_runtime_suspend' defined but not used [-Werror=unused-function]
    362 | static int cix_ipbloq_hda_runtime_suspend(struct device *dev)
        |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  sound/hda/controllers/cix-ipbloq.c:349:12: error: 'cix_ipbloq_hda_resume' defined but not used [-Werror=unused-function]
    349 | static int cix_ipbloq_hda_resume(struct device *dev)
        |            ^~~~~~~~~~~~~~~~~~~~~
  sound/hda/controllers/cix-ipbloq.c:336:12: error: 'cix_ipbloq_hda_suspend' defined but not used [-Werror=unused-function]
    336 | static int cix_ipbloq_hda_suspend(struct device *dev)
        |            ^~~~~~~~~~~~~~~~~~~~~~

When CONFIG_PM and CONFIG_PM_SLEEP are unset, SET_SYSTEM_SLEEP_PM_OPS()
and SET_RUNTIME_PM_OPS() evaluate to nothing, so these functions appear
unused to the compiler in this configuration.

Use the modern SYSTEM_SLEEP_PM_OPS and RUNTIME_PM_OPS macros to resolve
these warnings, which is what they are intended to do. Additionally,
wrap &cix_ipbloq_hda_pm in pm_ptr() to ensure the compiler can drop the
entire structure when CONFIG_PM is unset.

Fixes: d91e9bd10125 ("ALSA: hda: add CIX IPBLOQ HDA controller support")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20251211-hda-cix-ipbloq-modern-pm-ops-v1-1-c7a5580af021@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 days agoMerge tag 'asoc-fix-v6.19-merge-window' of https://git.kernel.org/pub/scm/linux/kerne...
Takashi Iwai [Thu, 11 Dec 2025 08:34:00 +0000 (09:34 +0100)] 
Merge tag 'asoc-fix-v6.19-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.19

A small pile of fixes that came in during the merge window, it's all
fairly standard device specific stuff.

4 days agoALSA: hda: intel-dsp-config: Prefer legacy driver as fallback
Takashi Iwai [Wed, 10 Dec 2025 13:15:51 +0000 (14:15 +0100)] 
ALSA: hda: intel-dsp-config: Prefer legacy driver as fallback

When config table entries don't match with the device to be probed,
currently we fall back to SND_INTEL_DSP_DRIVER_ANY, which means to
allow any drivers to bind with it.

This was set so with the assumption (or hope) that all controller
drivers should cover the devices generally, but in practice, this
caused a problem as reported recently.  Namely, when a specific
kconfig for SOF isn't set for the modern Intel chips like Alderlake,
a wrong driver (AVS) got probed and failed.  This is because we have
entries like:

 #if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE)
 /* Alder Lake / Raptor Lake */
  {
  .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
  .device = PCI_DEVICE_ID_INTEL_HDA_ADL_S,
  },
 ....
 #endif

so this entry is effective only when CONFIG_SND_SOC_SOF_ALDERLAKE is
set.  If not set, there is no matching entry, hence it returns
SND_INTEL_DSP_DRIVER_ANY as fallback.  OTOH, if the kconfig is set, it
explicitly falls back to SND_INTEL_DSP_DRIVER_LEGACY when no DMIC or
SoundWire is found -- that was the working scenario.  That being said,
the current setup may be broken for modern Intel chips that are
supposed to work with either SOF or legacy driver when the
corresponding kconfig were missing.

For addressing the problem above, this patch changes the fallback
driver to the legacy driver, i.e. return SND_INTEL_DSP_DRIVER_LEGACY
type as much as possible.  When CONFIG_SND_HDA_INTEL is also disabled,
the fallback is set to SND_INTEL_DSP_DRIVER_ANY type, just to be sure.

Reported-by: Askar Safin <safinaskar@gmail.com>
Closes: https://lore.kernel.org/all/20251014034156.4480-1-safinaskar@gmail.com/
Tested-by: Askar Safin <safinaskar@gmail.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251210131553.184404-1-tiwai@suse.de
4 days agoASoC: amd: acp: update tdm channels for specific DAI
Hemalatha Pinnamreddy [Wed, 3 Dec 2025 12:01:34 +0000 (17:31 +0530)] 
ASoC: amd: acp: update tdm channels for specific DAI

TDM channel updates were applied to all DAIs, causing configurations
to overwrite for unrelated streams. The logic is modified to update
channels only for targeted DAI. This prevents corruption of other DAI
settings and resolves audio issues observed during system suspend and
resume cycles.

Fixes: 12229b7e50cf ("ASoC: amd: acp: Add TDM support for acp i2s stream")
Signed-off-by: Hemalatha Pinnamreddy <hemalatha.pinnamreddy2@amd.com>
Signed-off-by: Raghavendra Prasad Mallela <raghavendraprasad.mallela@amd.com>
Link: https://patch.msgid.link/20251203120136.2591395-1-raghavendraprasad.mallela@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 days agoASoC: cs35l56: Fix incorrect select SND_SOC_CS35L56_CAL_SYSFS_COMMON
Richard Fitzgerald [Tue, 9 Dec 2025 10:46:57 +0000 (10:46 +0000)] 
ASoC: cs35l56: Fix incorrect select SND_SOC_CS35L56_CAL_SYSFS_COMMON

KConfig SND_SOC_CS35L56_CAL_SET_CTRL must select
SND_SOC_CS35L56_CAL_DEBUGFS_COMMON.

It incorrectly selected SND_SOC_CS35L56_CAL_SYSFS_COMMON.

Fixes: 32172cf3cb54 ("ASoC: cs35l56: Allow restoring factory calibration through ALSA control")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/lkml/22b92ddf-6321-41b5-8073-f9c7064d3432@infradead.org/T/#u
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251209104657.485541-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 days agoALSA: firewire-motu: add bounds check in put_user loop for DSP events
Junrui Luo [Tue, 9 Dec 2025 05:16:41 +0000 (13:16 +0800)] 
ALSA: firewire-motu: add bounds check in put_user loop for DSP events

In the DSP event handling code, a put_user() loop copies event data.
When the user buffer size is not aligned to 4 bytes, it could overwrite
beyond the buffer boundary.

Fix by adding a bounds check before put_user().

Suggested-by: Takashi Iwai <tiwai@suse.de>
Fixes: 634ec0b2906e ("ALSA: firewire-motu: notify event for parameter change in register DSP model")
Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
Link: https://patch.msgid.link/SYBPR01MB788112C72AF8A1C8C448B4B8AFA3A@SYBPR01MB7881.ausprd01.prod.outlook.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 days agoASoC: cs35l41: Always return 0 when a subsystem ID is found
Eric Naim [Sat, 6 Dec 2025 19:38:12 +0000 (03:38 +0800)] 
ASoC: cs35l41: Always return 0 when a subsystem ID is found

When trying to get the system name in the _HID path, after successfully
retrieving the subsystem ID the return value isn't set to 0 but instead
still kept at -ENODATA, leading to a false negative:

[   12.382507] cs35l41 spi-VLV1776:00: Subsystem ID: VLV1776
[   12.382521] cs35l41 spi-VLV1776:00: probe with driver cs35l41 failed with error -61

Always return 0 when a subsystem ID is found to mitigate these false
negatives.

Link: https://github.com/CachyOS/CachyOS-Handheld/issues/83
Fixes: 46c8b4d2a693 ("ASoC: cs35l41: Fallback to reading Subsystem ID property if not ACPI")
Cc: stable@vger.kernel.org # 6.18
Signed-off-by: Eric Naim <dnaim@cachyos.org>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251206193813.56955-1-dnaim@cachyos.org
Signed-off-by: Mark Brown <broonie@kernel.org>
6 days agoALSA: uapi: Fix typo in asound.h comment
Andres J Rosa [Wed, 3 Dec 2025 16:25:01 +0000 (10:25 -0600)] 
ALSA: uapi: Fix typo in asound.h comment

Fix 'level-shit' to 'level-shift' in struct snd_cea_861_aud_if comment.

Fixes: 7ba1c40b536e ("ALSA: Add definitions for CEA-861 Audio InfoFrames")
Signed-off-by: Andres J Rosa <andyrosa@gmail.com>
Link: https://patch.msgid.link/20251203162509.1822-1-andyrosa@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 days agoALSA: Do not build obsolete API
David Heidelberg [Wed, 3 Dec 2025 22:34:10 +0000 (23:34 +0100)] 
ALSA: Do not build obsolete API

ALSA 0.9.0-rc3 is from 2002, 23 years old.

Signed-off-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Acked-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251203-old-alsa-v1-1-ac80704f52c3@ixit.cz
7 days agoALSA: hda: add CIX IPBLOQ HDA controller support
Joakim Zhang [Fri, 5 Dec 2025 15:46:21 +0000 (23:46 +0800)] 
ALSA: hda: add CIX IPBLOQ HDA controller support

Add CIX IPBLOQ HDA controller support, which is integrated into
CIX SKY1 audio subsystem. HDA controller supports 64bit, but the
audio subsystem can only 32bit transaction. Use jack polling mode
as there is a hardware issue, lead to interrupt strom if the RIRB
interrupt enabled. Host and hdac has different view of memory, so
need do dma address translation.

Signed-off-by: Joakim Zhang <joakim.zhang@cixtech.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251205154621.3019640-4-joakim.zhang@cixtech.com
7 days agoALSA: hda/core: add addr_offset field for bus address translation
Joakim Zhang [Fri, 5 Dec 2025 15:46:20 +0000 (23:46 +0800)] 
ALSA: hda/core: add addr_offset field for bus address translation

Add bus addr_offset field for dma address translation,
for some SoCs such as CIX SKY1 which is ARM64 Arch, HOST
and HDAC has different memory view, so need to do dma address
translation between HOST and HDAC.

Signed-off-by: Joakim Zhang <joakim.zhang@cixtech.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251205154621.3019640-3-joakim.zhang@cixtech.com
7 days agoALSA: hda: dt-bindings: add CIX IPBLOQ HDA controller support
Joakim Zhang [Fri, 5 Dec 2025 15:46:19 +0000 (23:46 +0800)] 
ALSA: hda: dt-bindings: add CIX IPBLOQ HDA controller support

Add CIX IPBLOQ HDA controller support, which is integrated into
CIX SKY1 audio subsystem. HDA controller supports 64bit, but the
audio subsystem can only 32bit transaction. Use jack polling mode
as there is a hardware issue, lead to interrupt strom if the RIRB
interrupt enabled. Host and hdac has different view of memory, so
need do dma address translation.

Signed-off-by: Joakim Zhang <joakim.zhang@cixtech.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251205154621.3019640-2-joakim.zhang@cixtech.com
7 days agoALSA: hda/realtek: Add support for ASUS UM3406GA
Stefan Binding [Fri, 5 Dec 2025 15:05:55 +0000 (15:05 +0000)] 
ALSA: hda/realtek: Add support for ASUS UM3406GA

Laptops use 2 CS35L41 Amps with HDA, using External boost, with I2C

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://patch.msgid.link/20251205150614.49590-3-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 days agoALSA: hda/realtek: Add support for HP Turbine Laptops
Stefan Binding [Fri, 5 Dec 2025 15:05:54 +0000 (15:05 +0000)] 
ALSA: hda/realtek: Add support for HP Turbine Laptops

Laptops use 2 CS35L41 Amps with HDA, using Internal boost, with I2C

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://patch.msgid.link/20251205150614.49590-2-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 days agoALSA: usb-audio: Initialize status1 to fix uninitialized symbol errors
HariKrishna Sagala [Thu, 4 Dec 2025 05:22:03 +0000 (10:52 +0530)] 
ALSA: usb-audio: Initialize status1 to fix uninitialized symbol errors

Initialize 'status1' with a default value to resolve the static analysis
smatch reported error "uninitialized symbol 'status1'".
The 'status1' variable is used to create a buff using "kmemdup".
So, ensure to initialize the value before it is read.

Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: HariKrishna Sagala <hariconscious@gmail.com>
Link: https://patch.msgid.link/20251204052201.16286-3-hariconscious@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 days agoALSA: firewire-motu: fix buffer overflow in hwdep read for DSP events
Junrui Luo [Wed, 3 Dec 2025 04:27:03 +0000 (12:27 +0800)] 
ALSA: firewire-motu: fix buffer overflow in hwdep read for DSP events

The DSP event handling code in hwdep_read() could write more bytes to
the user buffer than requested, when a user provides a buffer smaller
than the event header size (8 bytes).

Fix by using min_t() to clamp the copy size, This ensures we never copy
more than the user requested.

Reported-by: Yuhao Jiang <danisjiang@gmail.com>
Reported-by: Junrui Luo <moonafterrain@outlook.com>
Fixes: 634ec0b2906e ("ALSA: firewire-motu: notify event for parameter change in register DSP model")
Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
Link: https://patch.msgid.link/SYBPR01MB78810656377E79E58350D951AFD9A@SYBPR01MB7881.ausprd01.prod.outlook.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 days agoALSA: hda: cs35l41: Fix NULL pointer dereference in cs35l41_hda_read_acpi()
Denis Arefev [Tue, 2 Dec 2025 10:13:36 +0000 (13:13 +0300)] 
ALSA: hda: cs35l41: Fix NULL pointer dereference in cs35l41_hda_read_acpi()

The acpi_get_first_physical_node() function can return NULL, in which
case the get_device() function also returns NULL, but this value is
then dereferenced without checking,so add a check to prevent a crash.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 7b2f3eb492da ("ALSA: hda: cs35l41: Add support for CS35L41 in HDA systems")
Cc: stable@vger.kernel.org
Signed-off-by: Denis Arefev <arefev@swemel.ru>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251202101338.11437-1-arefev@swemel.ru
10 days agoASoC: cros_ec_codec: Remove unnecessary selection of CRYPTO
Eric Biggers [Thu, 4 Dec 2025 05:29:54 +0000 (21:29 -0800)] 
ASoC: cros_ec_codec: Remove unnecessary selection of CRYPTO

The only crypto-related functionality this codec uses is the sha256()
function, which is provided by CRYPTO_LIB_SHA256.  Originally
CRYPTO_LIB_SHA256 was visible only when CRYPTO; however, that was fixed
years ago and the libraries can now be selected on their own.

So, remove the unnecessary selection of CRYPTO.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Link: https://patch.msgid.link/20251204052954.488568-1-ebiggers@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 days agoASoC: codecs: wcd93xx: fix OF node leaks on probe
Mark Brown [Thu, 4 Dec 2025 11:38:34 +0000 (11:38 +0000)] 
ASoC: codecs: wcd93xx: fix OF node leaks on probe

Merge series from Johan Hovold <johan@kernel.org>:

The original wcd938x driver has a couple of OF node reference leaks
which have been reproduced in the two later added drivers.

10 days agoASoC: ak4458 & ak5558: disable regulator if error
Mark Brown [Thu, 4 Dec 2025 11:38:30 +0000 (11:38 +0000)] 
ASoC: ak4458 & ak5558: disable regulator if error

Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>:

Disable regulator when error happens to balance the reference count.

11 days agoASoc: qcom: q6afe: fix bad guard conversion
Johan Hovold [Wed, 3 Dec 2025 10:55:41 +0000 (11:55 +0100)] 
ASoc: qcom: q6afe: fix bad guard conversion

A recent spinlock guard conversion used the wrong guard so that
interrupts are no longer disabled while holding the port list lock.

Based on a cursory look this appears to be safe currently, but it could
cause a deadlock if one of these helpers are ever called in interrupt
context.

Fixes: 4b1edbb028fb ("ASoC: qcom: q6afe: Use guard() for spin locks")
Cc: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20251203105542.24765-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
11 days agoASoC: rockchip: Fix Wvoid-pointer-to-enum-cast warning (again)
Krzysztof Kozlowski [Wed, 3 Dec 2025 14:16:45 +0000 (15:16 +0100)] 
ASoC: rockchip: Fix Wvoid-pointer-to-enum-cast warning (again)

'version' is an enum, thus cast of pointer on 64-bit compile test with
clang W=1 causes:

  rockchip_pdm.c:583:17: error: cast to smaller integer type 'enum rk_pdm_version' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

This was already fixed in commit 49a4a8d12612 ("ASoC: rockchip: Fix
Wvoid-pointer-to-enum-cast warning") but then got bad in
commit 9958d85968ed ("ASoC: Use device_get_match_data()").

Discussion on LKML also pointed out that 'uintptr_t' is not the correct
type and either 'kernel_ulong_t' or 'unsigned long' should be used,
with several arguments towards the latter [1].

Link: https://lore.kernel.org/r/CAMuHMdX7t=mabqFE5O-Cii3REMuyaePHmqX+j_mqyrn6XXzsoA@mail.gmail.com/
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20251203141644.106459-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 days agoASoC: codecs: nau8325: Silence uninitialized variables warnings
Krzysztof Kozlowski [Wed, 3 Dec 2025 14:06:12 +0000 (15:06 +0100)] 
ASoC: codecs: nau8325: Silence uninitialized variables warnings

clang W=1 builds warn:

  nau8325.c:430:13: error: variable 'n2_max' is uninitialized when used here [-Werror,-Wuninitialized]

which are false positive, because the variables will be always
initialized when used (guarded by mclk_max!=0 check).  However
initializing them upfront makes the code more obvious and easier, plus
it silences the warning.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20251203140611.87191-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 days agoASoC: ak5558: Disable regulator when error happens
Shengjiu Wang [Wed, 3 Dec 2025 10:05:29 +0000 (18:05 +0800)] 
ASoC: ak5558: Disable regulator when error happens

Disable regulator in runtime resume when error happens to balance
the reference count of regulator.

Fixes: 2ff6d5a108c6 ("ASoC: ak5558: Add regulator support")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20251203100529.3841203-3-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 days agoASoC: ak4458: Disable regulator when error happens
Shengjiu Wang [Wed, 3 Dec 2025 10:05:28 +0000 (18:05 +0800)] 
ASoC: ak4458: Disable regulator when error happens

Disable regulator in runtime resume when error happens to balance
the reference count of regulator.

Fixes: 7e3096e8f823 ("ASoC: ak4458: Add regulator support")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20251203100529.3841203-2-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 days agoASoC: amd: acp: Audio is not resuming after s0ix
Hemalatha Pinnamreddy [Wed, 3 Dec 2025 06:46:48 +0000 (12:16 +0530)] 
ASoC: amd: acp: Audio is not resuming after s0ix

Audio fails to resume after system exits suspend mode
due to accessing incorrect ring buffer address during
resume. This patch resolves issue by selecting correct
address based on the ACP version.

Fixes: f6f7d25b11033 ("ASoC: amd: acp: Add pte configuration for ACP7.0 platform")
Signed-off-by: Hemalatha Pinnamreddy <hemalatha.pinnamreddy2@amd.com>
Signed-off-by: Raghavendra Prasad Mallela <raghavendraprasad.mallela@amd.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20251203064650.2554625-1-raghavendraprasad.mallela@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 days agoASoC: dt-bindings: cirrus,cs42xx8: Reference common DAI properties
Shengjiu Wang [Wed, 3 Dec 2025 10:28:36 +0000 (18:28 +0800)] 
ASoC: dt-bindings: cirrus,cs42xx8: Reference common DAI properties

Reference the dai-common.yaml schema to allow '#sound-dai-cells' and
"sound-name-prefix' to be used because cirrus,cs42xx8 is codec DAI.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20251203102836.3856471-1-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
11 days agoASoC: bcm: bcm63xx-pcm-whistler: Check return value of of_dma_configure()
Haotian Zhang [Tue, 2 Dec 2025 10:16:42 +0000 (18:16 +0800)] 
ASoC: bcm: bcm63xx-pcm-whistler: Check return value of of_dma_configure()

bcm63xx_soc_pcm_new() does not check the return value of
of_dma_configure(), which may fail with -EPROBE_DEFER or
other errors, allowing PCM setup to continue with incomplete
DMA configuration.

Add error checking for of_dma_configure() and return on failure.

Fixes: 88eb404ccc3e ("ASoC: brcm: Add DSL/PON SoC audio driver")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20251202101642.492-1-vulab@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
12 days agoALSA: hda/realtek: Add PCI SSIDs to HP ProBook quirks
Ilyas Gasanov [Tue, 2 Dec 2025 15:49:30 +0000 (19:49 +0400)] 
ALSA: hda/realtek: Add PCI SSIDs to HP ProBook quirks

According to HW probes, there exist upgraded variants of HP ProBook
440/450 G8 notebook PC hardware, with PCI SSIDs not yet covered:

 - https://linux-hardware.org/?id=pci:8086-a0c8-103c-8a76
   (HP ProBook 440 G8, SSID 103C:8A76, Tiger Lake HDA, ALC236)
 - https://linux-hardware.org/?id=pci:8086-a0c8-103c-8a77
   (HP ProBook 450 G8, SSID 103C:8A77, Tiger Lake HDA, ALC236)

The HDA GPIO indices for the mic mute (0x1) and speaker mute (0x2) LEDs
are virtually guaranteed to be identical for the HP ProBook 440/450 G8
variants with motherboard SSIDs 8A74/8A75 (BIOS T87) and 8A76/8A77 (BIOS
T88); especially since spare keyboard parts are interchangeable between
different revisions of the same notebook models, and thus necessarily
have the same slot pinouts.

Signed-off-by: Ilyas Gasanov <public@gsnoff.com>
Link: https://patch.msgid.link/20251202154930.74481-1-public@gsnoff.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 days agoASoC: cs-amp-lib: Revert use of __free(kfree) back to normal C cleanup
Richard Fitzgerald [Mon, 1 Dec 2025 11:14:29 +0000 (11:14 +0000)] 
ASoC: cs-amp-lib: Revert use of __free(kfree) back to normal C cleanup

Revert commit 6797540c8b76 ("ASoC: cs-amp-lib: Use __free(kfree) instead
of manual freeing").

Krzysztof Kozlowski pointed out that __free() can be dangerous.
It can introduce new cleanup bugs. These are more subtle and difficult to
spot than a missing goto in traditional cleanup, because they are triggered
by writing regular idiomatic C code instead of using C++ conventions. As
it's regular C style it's more likely to be missed because the code is as
would be expected for C. The traditional goto also more obviously flags
to anyone changing the code in the future that they must be careful about
the cleanup.

We can just revert the change. There was nothing wrong with the original
code and as Krzysztof noted: "it does not make the code simpler."

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 6797540c8b76 ("ASoC: cs-amp-lib: Use __free(kfree) instead of manual freeing")
Link: https://patch.msgid.link/20251201111429.43517-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 days agoASoC: codecs: wcd939x: fix OF node leaks on probe failure
Johan Hovold [Mon, 1 Dec 2025 09:34:19 +0000 (10:34 +0100)] 
ASoC: codecs: wcd939x: fix OF node leaks on probe failure

The component match entry release function will drop the references
taken while looking up the soundwire OF nodes when the platform device
is unbound.

Drop the additional references taken to avoid leaking them on probe
failure (e.g. probe deferral) and on driver unbind.

Fixes: 10f514bd172a ("ASoC: codecs: Add WCD939x Codec driver")
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20251201093419.24474-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 days agoASoC: codecs: wcd938x: fix OF node leaks on probe failure
Johan Hovold [Mon, 1 Dec 2025 09:34:18 +0000 (10:34 +0100)] 
ASoC: codecs: wcd938x: fix OF node leaks on probe failure

The component match entry release function will drop the references
taken while looking up the soundwire OF nodes when the platform device
is unbound.

Drop the additional references taken to avoid leaking them on probe
failure (e.g. probe deferral) and on driver unbind.

Fixes: 8d78602aa87a ("ASoC: codecs: wcd938x: add basic driver")
Cc: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20251201093419.24474-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 days agoASoC: codecs: wcd937x: fix OF node leaks on probe failure
Johan Hovold [Mon, 1 Dec 2025 09:34:17 +0000 (10:34 +0100)] 
ASoC: codecs: wcd937x: fix OF node leaks on probe failure

The component match entry release function will drop the references
taken while looking up the soundwire OF nodes when the platform device
is unbound.

Drop the additional references taken to avoid leaking them on probe
failure (e.g. probe deferral) and on driver unbind.

Fixes: 9be3ec196da4 ("ASoC: codecs: wcd937x: add wcd937x codec driver")
Cc: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Cc: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20251201093419.24474-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 days agoALSA: usb-audio: Simplify with usb_endpoint_max_periodic_payload()
Takashi Iwai [Tue, 2 Dec 2025 07:08:27 +0000 (08:08 +0100)] 
ALSA: usb-audio: Simplify with usb_endpoint_max_periodic_payload()

Recently we received a new helper function,
usb_endpoint_max_periodic_payload(), for calculating the max packet
size for periodic transfer.

Simplify the former open code with the new helper function.

Fixes: a748e1dbb2df ("ALSA: usb-audio: Fix max bytes-per-interval calculation")
Suggested-by: Michal Pecio <michal.pecio@gmail.com>
Link: https://lore.kernel.org/20251124210518.90054-1-dylan_robinson@motu.com
Link: https://patch.msgid.link/20251202070828.145656-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 days agoALSA: hda/realtek: fix mute/micmute LEDs don't work for more HP laptops
Chris Chiu [Tue, 2 Dec 2025 04:25:34 +0000 (04:25 +0000)] 
ALSA: hda/realtek: fix mute/micmute LEDs don't work for more HP laptops

More HP laptops with codec ALC3247 need the extra coefbit2 to make
mic-mute/audio-mute working.

Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Link: https://patch.msgid.link/20251202042534.174755-1-chris.chiu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 days agoMerge tag 'asoc-v6.19' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Tue, 2 Dec 2025 06:12:56 +0000 (07:12 +0100)] 
Merge tag 'asoc-v6.19' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v6.19

This is a very large set of updates, as well as some more extensive
cleanup work from Morimto-san we've also added a generic SCDA class
driver for SoundWire devices enabling us to support many chips with
no custom code.  There's also a batch of new drivers added for both
SoCs and CODECs.

 - Added a SoundWire SCDA generic class driver, pulling in a little
   regmap work to support it.
 - A *lot* of cleaup and API improvement work from Morimoto-san.
 - Lots of work on the existing Cirrus, Intel, Maxim and Qualcomm
   drivers.
 - Support for Allwinner A523, Mediatek MT8189, Qualcomm QCM2290,
   QRB2210 and SM6115, SpacemiT K1, and TI TAS2568, TAS5802, TAS5806,
   TAS5815, TAS5828 and TAS5830.

This also pulls in some gpiolib changes supporting shared GPIOs in the
core there so we can convert some of the ASoC drivers open coding
handling of that to the core functionality.

13 days agoALSA: rawmidi: Fix inconsistent indenting warning reported by smatch
HariKrishna Sagala [Mon, 1 Dec 2025 15:11:40 +0000 (20:41 +0530)] 
ALSA: rawmidi: Fix inconsistent indenting warning reported by smatch

Fix smatch reported inconsistent indenting warning in rawmidi.
sound/core/rawmidi.c:2115 alsa_rawmidi_init() warn: inconsistent
indenting.
No functional changes were introduced.

Signed-off-by: HariKrishna Sagala <hariconscious@gmail.com>
Link: https://patch.msgid.link/20251201151137.29536-4-hariconscious@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 days agoMerge branch 'for-linus' into for-next
Takashi Iwai [Mon, 1 Dec 2025 15:25:31 +0000 (16:25 +0100)] 
Merge branch 'for-linus' into for-next

Pull remaining 6.18-devel changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: dice: fix buffer overflow in detect_stream_formats()
Junrui Luo [Fri, 28 Nov 2025 04:06:31 +0000 (12:06 +0800)] 
ALSA: dice: fix buffer overflow in detect_stream_formats()

The function detect_stream_formats() reads the stream_count value directly
from a FireWire device without validating it. This can lead to
out-of-bounds writes when a malicious device provides a stream_count value
greater than MAX_STREAMS.

Fix by applying the same validation to both TX and RX stream counts in
detect_stream_formats().

Reported-by: Yuhao Jiang <danisjiang@gmail.com>
Reported-by: Junrui Luo <moonafterrain@outlook.com>
Fixes: 58579c056c1c ("ALSA: dice: use extended protocol to detect available stream formats")
Cc: stable@vger.kernel.org
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
Link: https://patch.msgid.link/SYBPR01MB7881B043FC68B4C0DA40B73DAFDCA@SYBPR01MB7881.ausprd01.prod.outlook.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoASoC: fsl_micfil: Set default quality and channel
Mark Brown [Sat, 29 Nov 2025 00:59:00 +0000 (00:59 +0000)] 
ASoC: fsl_micfil: Set default quality and channel

Merge series from Chancel Liu <chancel.liu@nxp.com>:

Add default quality for different platforms.
Set channel range control.

2 weeks agofirmware: cs_dsp: Remove need for clients to supply
Mark Brown [Sat, 29 Nov 2025 00:48:15 +0000 (00:48 +0000)] 
firmware: cs_dsp: Remove need for clients to supply

Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

Clients of cs_dsp can provide optional callback function pointers, in
a struct cs_dsp_client_ops. The client had to provide a pointer to a
struct even if it didn't implement any of the callbacks.

2 weeks agoASoC: codecs: Modify awinic amplifier dsp read and write functions
Weidong Wang [Fri, 28 Nov 2025 13:03:22 +0000 (21:03 +0800)] 
ASoC: codecs: Modify awinic amplifier dsp read and write functions

Modify the dsp read and write functions of the chip and normalize
the dsp read and write functions of all awinic amplifier

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://patch.msgid.link/20251128130323.628091-1-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: SDCA: Fixup some more Kconfig issues
Charles Keepax [Fri, 28 Nov 2025 10:28:41 +0000 (10:28 +0000)] 
ASoC: SDCA: Fixup some more Kconfig issues

As the class driver is manually selectable, it needs to depend on
SOUNDWIRE, which is obviously necessary. Also the depends on in
SND_SOC_SDCA_HID needs to be pulled into SND_SOC_SDCA_CLASS as well,
since HID is selected by the class driver.

Fixes: 2d877d0659cb ("ASoC: SDCA: Add basic SDCA class driver")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511281223.DDs12LiC-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202511280822.i2fveMpR-lkp@intel.com/
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251128102841.2930808-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: cs35l56: Log a message if firmware is missing
Richard Fitzgerald [Fri, 28 Nov 2025 11:25:20 +0000 (11:25 +0000)] 
ASoC: cs35l56: Log a message if firmware is missing

If the amp is still reporting FIRMWARE_MISSING after cs35l56_patch()
has completed it is helpful to log a warning.

After a complete firmware download the FIRMWARE_MISSING flag will be
clear. If this isn't the case, the driver should log a message to
report this.

The amp can produce basic audio output without firmware, as a fallback,
so this wasn't originally logged as a warning condition because the amp
is still in an operational state - just not with full functionality.
However, it was not at all obvious to an end user that anything is
unusual.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251128112520.40067-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: nau8325: Delete a stray tab
Dan Carpenter [Fri, 28 Nov 2025 07:20:27 +0000 (10:20 +0300)] 
ASoC: nau8325: Delete a stray tab

This line is indented too far.  Delete a tab.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/aSlNO0sqQr2A4vzG@stanley.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agofirmware: cs_dsp: Add test cases for client_ops == NULL
Richard Fitzgerald [Fri, 28 Nov 2025 10:21:32 +0000 (10:21 +0000)] 
firmware: cs_dsp: Add test cases for client_ops == NULL

Add test cases for the client not providing a pointer to a
struct cs_dsp_client_ops. This proves that it is safe for the client
to leave the client_ops pointer at NULL if it does not need to
implement any of the callbacks.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251128102132.1575177-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agofirmware: cs_dsp: Don't require client to provide a struct cs_dsp_client_ops
Richard Fitzgerald [Fri, 28 Nov 2025 10:21:31 +0000 (10:21 +0000)] 
firmware: cs_dsp: Don't require client to provide a struct cs_dsp_client_ops

A client of cs_dsp does not necessarily need to implement any of the
optional callbacks in struct cs_dsp_client_ops, so allow the client_ops
pointer to be NULL.

This has been done by pointing client_ops at a default empty
cs_dsp_client_ops. It keeps the code cleaner by avoiding having to add
double nested NULL checks everywhere one of these callbacks is called.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251128102132.1575177-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: fsl_micfil: Set channel range control
Chancel Liu [Thu, 27 Nov 2025 02:26:52 +0000 (11:26 +0900)] 
ASoC: fsl_micfil: Set channel range control

The range control register can't directly adjust volume gain according
to specification. It's the dynamic range of the CIC filter. The range
value should meet some conditions otherwise the channel data is not
reliable. Add an array in soc data to store const value in formula
with which range with all quality on different platforms can be
calculated. If the value set to range control exceeds the max range
there'll be warning logs.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://patch.msgid.link/20251127022652.674574-3-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: fsl_micfil: Add default quality for different platforms
Chancel Liu [Thu, 27 Nov 2025 02:26:51 +0000 (11:26 +0900)] 
ASoC: fsl_micfil: Add default quality for different platforms

Add a default quality flag in soc data. For i.MX8MP/93/943 platforms on
which range control is constrained, set medium quality by default to
achieve better audio performance and wider adjustable range control.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://patch.msgid.link/20251127022652.674574-2-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: Intel: catpt: Round of fixes and PM changes
Mark Brown [Thu, 27 Nov 2025 21:50:47 +0000 (21:50 +0000)] 
ASoC: Intel: catpt: Round of fixes and PM changes

Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

Set of changes addressing gaps in DRAM offset checks, error paths and
PM.

The first three patches are straight-forward, the last three relate to
the power management. The standing out PM change is removal of the
catpt-driver as a system-suspend (S3) blocker. This is a suggestion from
Andy as indeed, audio is not a critical component that should prevent
the system from going into S3. Whatever happens, the driver can recover
on a follow up resume (S3 -> S0).

2 weeks agoAdd support for cs42l45 into the Intel machine driver
Mark Brown [Thu, 27 Nov 2025 21:50:42 +0000 (21:50 +0000)] 
Add support for cs42l45 into the Intel machine driver

Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:

Now that the full class driver is in place we can add support to the
Intel machine driver for Cirrus's new SDCA audio CODEC the cs42l45. This
makes some minor tweaks to the machine driver itself to support SDCA
devices, and then adds the necessary tables etc. to define the device.

Note, this series shouldn't have any dependencies on the other series of
improvements to the class driver that is already on the list. So either
can be merged first.

2 weeks agoASoC: intel: sof_sdw: Add codec_info for cs42l45
Charles Keepax [Thu, 27 Nov 2025 16:34:26 +0000 (16:34 +0000)] 
ASoC: intel: sof_sdw: Add codec_info for cs42l45

Add support for the Cirrus Logic CS42L45 standalone using SoundWire.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127163426.2500633-8-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: sdw_utils: Add cs42l45 support functions
Charles Keepax [Thu, 27 Nov 2025 16:34:25 +0000 (16:34 +0000)] 
ASoC: sdw_utils: Add cs42l45 support functions

Add the helper functions into the machine driver for the cs42l45,
this will register a jack for jack detection and add things into
to the components string if they are needed.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127163426.2500633-7-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: intel: sof_sdw: Add ability to have auxiliary devices
Charles Keepax [Thu, 27 Nov 2025 16:34:24 +0000 (16:34 +0000)] 
ASoC: intel: sof_sdw: Add ability to have auxiliary devices

Currently the sof_sdw machine driver assumes that all devices involved
in the sound card are connected through a DAI link. However for SDCA
devices we still want the HID (Human Interface Device, used for jack
buttons) to be part of the sound card, but it contains no DAI links.

Add support into the machine driver to specify a list of auxiliary
devices to merged into the card.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127163426.2500633-6-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: sdw_utils: Move codec_name to dai info
Charles Keepax [Thu, 27 Nov 2025 16:34:23 +0000 (16:34 +0000)] 
ASoC: sdw_utils: Move codec_name to dai info

As SDCA devices will support each DAI link on a different child device,
move the codec name from codec_info to each dai_info. To allow the
appropriate function device to be bound to each DAI link.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127163426.2500633-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: sdw_utils: Add codec_conf for every DAI
Charles Keepax [Thu, 27 Nov 2025 16:34:22 +0000 (16:34 +0000)] 
ASoC: sdw_utils: Add codec_conf for every DAI

The assumption so far is that all the DAI links for a given audio part
would be on the same device. However, as SDCA implements each audio
function on a separate auxiliary driver this will no longer be true.
This means it is necessary to add additional codec_conf structures to
get the prefix for an audio part to apply to all the auxiliary drivers
that make up that part.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127163426.2500633-4-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: SDCA: Add terminal type into input/output widget name
Charles Keepax [Thu, 27 Nov 2025 16:34:21 +0000 (16:34 +0000)] 
ASoC: SDCA: Add terminal type into input/output widget name

There have been some complaints around the UCM files for SDCA
devices that the control system is quite hard to follow. This is
definitely true without the specification handy the naming can be
a little cryptic. However, as most of the information is parsed
from DisCo there are some limits to what the driver can safely do
to improve this.

However, one area that can be improved is the non-streaming
input/output terminals. These have a field (enum sdca_terminal_type)
that describes the usage of that terminal. These types can be
appended to the entity name to give the users a better clue as
to the purpose. For example "OT 43", would now become "OT 43
Headphone". This would follow through into the jack controls which
would change from "OT 43 Jack" to "OT 43 Headphone Jack", making the
purpose much more obvious to the user.

This provides slightly more readable controls without relying on
implicit knowledge that individual parts might not conform to.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127163426.2500633-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: SDCA: Align mute controls to ALSA expectations
Charles Keepax [Thu, 27 Nov 2025 16:34:20 +0000 (16:34 +0000)] 
ASoC: SDCA: Align mute controls to ALSA expectations

Currently mute controls will be called "FU xx Mute Switch" (note
the switch is added programmatically outside the coverage of this
patch) and the accompanying volume control would be called "FU xx
Channel Volume".  These names are taken from the SDCA specification,
however, this does not mesh well with the ALSA naming system. ALSA
generally expects enables rather than mutes and expects that mutes
and volumes have matching names.

Update the names and invert the mute controls to make them more
standard "FU XX Channel Switch", this does slightly deviate from
the SDCA specification but it makes the rest of the Linux ecosystem
a lot happier.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127163426.2500633-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: codecs: wcd939x: fix regmap leak on probe failure
Johan Hovold [Thu, 27 Nov 2025 13:50:57 +0000 (14:50 +0100)] 
ASoC: codecs: wcd939x: fix regmap leak on probe failure

The soundwire regmap that may be allocated during probe is not freed on
late probe failures.

Add the missing error handling.

Fixes: be2af391cea0 ("ASoC: codecs: Add WCD939x Soundwire devices driver")
Cc: stable@vger.kernel.org # 6.9
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20251127135057.2216-1-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: cs-amp-lib: Use __free(kfree) instead of manual freeing
Richard Fitzgerald [Thu, 27 Nov 2025 15:58:17 +0000 (15:58 +0000)] 
ASoC: cs-amp-lib: Use __free(kfree) instead of manual freeing

Use the __free(kfree) cleanup to replace instances of manually
calling kfree(). Also make some code path simplifications that this
allows.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127155817.1374079-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agofirmware: cs_dsp: Use kvzalloc() to allocate control caches
Richard Fitzgerald [Thu, 27 Nov 2025 10:39:47 +0000 (10:39 +0000)] 
firmware: cs_dsp: Use kvzalloc() to allocate control caches

Use kvzalloc() instead of kzalloc() to allocate memory to cache the
content of a firmware control.

Most firmware controls are only small, typically a few bytes. But on
some firmware there can be much larger controls for coefficient or
model data.

The overhead of kvzalloc() is negligible because most control allocs
can be satisfied by the normal kmalloc() that kvzalloc() will try first.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127103947.1094934-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agofirmware: cs_dsp: Take pwr_lock around reading controls debugfs
Richard Fitzgerald [Thu, 27 Nov 2025 11:32:38 +0000 (11:32 +0000)] 
firmware: cs_dsp: Take pwr_lock around reading controls debugfs

In cs_dsp_debugfs_read_controls_show() take the pwr_lock mutex
around the list walk. This protects against debugfs returning
a partial set of new controls if those controls are being added
to the list while it is being walked.

Controls are never deleted from this list, and are only added to
the end of the list. So there was never a danger of following a
stale pointer to garbage.

The worst case was that the printed list is truncated if it saw an
entry that was the list end just before a new entry was appended to
the list.

With the original code, the truncated list from the debugfs could
show only _some_ of the new entries. This could be confusing because
it appears that some new entries are missing.

Adding the mutex means that the debugfs read provides an atomic view.
Either it shows the old content before any of the new controls were
added; or it shows the new content after all the new controls are
added.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251127113238.1251352-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: Intel: catpt: Do not block the system from suspending
Cezary Rojewski [Wed, 26 Nov 2025 09:55:23 +0000 (10:55 +0100)] 
ASoC: Intel: catpt: Do not block the system from suspending

Even if something goes wrong when performing suspend on DSP, from the
system perspective the component is not critical enough to block the
suspend operation entirely. Leaving recovery to next resume() suffices.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20251126095523.3925364-7-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: Intel: catpt: Do not ignore errors on runtime resume
Cezary Rojewski [Wed, 26 Nov 2025 09:55:22 +0000 (10:55 +0100)] 
ASoC: Intel: catpt: Do not ignore errors on runtime resume

If pm_runtime_resume_and_get() fails, follow up pm_runtime_xxx()
operate on device in erroneous state.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20251126095523.3925364-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: Intel: catpt: Fix probing order of driver components
Cezary Rojewski [Wed, 26 Nov 2025 09:55:21 +0000 (10:55 +0100)] 
ASoC: Intel: catpt: Fix probing order of driver components

catpt_dai_pcm_new() is called during the bring up sequence of the
machine board device which is a different device to the parent (DSP)
device yet utilizes pm_runtime_xxx() against it in order to send IPCs.
If the parent's pm_runtime is not configured before that happens,
errors will occur.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20251126095523.3925364-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: Intel: catpt: Fix error path in hw_params()
Cezary Rojewski [Wed, 26 Nov 2025 09:55:20 +0000 (10:55 +0100)] 
ASoC: Intel: catpt: Fix error path in hw_params()

Do not leave any resources hanging on the DSP side if
applying user settings fails.

Fixes: 768a3a3b327d ("ASoC: Intel: catpt: Optimize applying user settings")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20251126095523.3925364-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: Intel: catpt: Switch to resource_xxx() API
Cezary Rojewski [Wed, 26 Nov 2025 09:55:19 +0000 (10:55 +0100)] 
ASoC: Intel: catpt: Switch to resource_xxx() API

There is a number of interfaces available for manipulating instances of
struct resource. To improve readability, move away from manual editing
in favor of the common interface.

While at it, adjust spacing so that both code blocks, while found in
separate functions, looks cohesive.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20251126095523.3925364-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: Intel: catpt: Fix offset checks
Cezary Rojewski [Wed, 26 Nov 2025 09:55:18 +0000 (10:55 +0100)] 
ASoC: Intel: catpt: Fix offset checks

Verify if the entire block is found within DRAM, not just
the start of it.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20251126095523.3925364-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoALSA: hda/realtek: fix mute/micmute LEDs don't work for HP 200 G2i
Dirk Su [Thu, 27 Nov 2025 02:56:39 +0000 (10:56 +0800)] 
ALSA: hda/realtek: fix mute/micmute LEDs don't work for HP 200 G2i

HP 200 G2i needs quirk to make mic-mute/audio-mute working.

Signed-off-by: Dirk Su <dirk.su@canonical.com>
Link: https://patch.msgid.link/20251127025651.13627-1-dirk.su@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoMerge tag 'asoc-fix-v6.18-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git...
Takashi Iwai [Thu, 27 Nov 2025 06:19:59 +0000 (07:19 +0100)] 
Merge tag 'asoc-fix-v6.18-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.18

A small pile of driver specific fixes that came in during the past few
weeks, none of them especially major.

2 weeks agoASoC: stm32: sai: fix device and OF node leaks on
Mark Brown [Wed, 26 Nov 2025 22:56:01 +0000 (22:56 +0000)] 
ASoC: stm32: sai: fix device and OF node leaks on

Merge series from Johan Hovold <johan@kernel.org>:

This series fixes device and OF node reference leaks during probe and
a clock prepare imbalance on probe failures.

Included is a related cleanup of an error path.

2 weeks agonau8325 build fixes
Mark Brown [Wed, 26 Nov 2025 19:13:03 +0000 (19:13 +0000)] 
nau8325 build fixes

Merge series from Jaroslav Kysela <perex@perex.cz>:

Add missing build configuration and fix the i2c probe function to follow
latest i2c core interface.

Jaroslav Kysela (2):
  ASoC: nau8325: use simple i2c probe function
  ASoC: nau8325: add missing build config

 sound/soc/codecs/Kconfig   | 5 +++++
 sound/soc/codecs/Makefile  | 2 ++
 sound/soc/codecs/nau8325.c | 3 +--
 3 files changed, 8 insertions(+), 2 deletions(-)

--
2.51.1

2 weeks agoASoC: mediatek: mt8189: remove unnecessary NULL check
Dan Carpenter [Wed, 26 Nov 2025 14:52:26 +0000 (17:52 +0300)] 
ASoC: mediatek: mt8189: remove unnecessary NULL check

Smatch complains that the call to snd_soc_component_get_drvdata(component)
will dereference "component" so this NULL check is too late.  The probe()
function will never be called with a NULL component pointer so just
delete the check.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/aScUKqCEhSIZoOmg@stanley.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agofirmware: cs_dsp: Remove redundant download buffer allocator
Richard Fitzgerald [Wed, 26 Nov 2025 13:15:01 +0000 (13:15 +0000)] 
firmware: cs_dsp: Remove redundant download buffer allocator

Now that cs_dsp uses regmap_raw_write() instead of regmap_raw_write_async()
it doesn't need to keep multiple DMA-safe buffers of every chunk of data
it wrote.

See commit fe08b7d5085a ("firmware: cs_dsp: Remove async regmap writes")

Only one write can be in progress at a time, so one DMA-safe buffer can be
re-used. The single DMA-safe buffer is reallocated if the next write chunk
is larger. Reallocation size is rounded up to reduce the amount of churn.
PAGE_SIZE is used as a convenient size multiple. Typically for .wmfw files
the first chunk is the largest.

A DMA-safe intermediate buffer is used because we can't assume that the
bus underlying regmap can accept non-DMA-safe buffers.

Note that a chunk from the firmware file cannot simply be split into
arbitrarily-sized chunks to avoid buffer reallocation. The data in the
firmware file is preformatted to be written directly to the device as one
block. It already takes account of alignment, write-bursts and write
length requirements of the target hardware, so that the cs_dsp driver can
treat it as an opaque blob.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251126131501.884188-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: fsl_xcvr: clear the channel status control memory
Shengjiu Wang [Wed, 26 Nov 2025 06:45:09 +0000 (14:45 +0800)] 
ASoC: fsl_xcvr: clear the channel status control memory

memset_io() writes memory byte by byte with __raw_writeb() on the arm
platform if the size is word. but XCVR data RAM memory can't be accessed
with byte address, so with memset_io() the channel status control memory
is not really cleared, use writel_relaxed() instead.

Fixes: 28564486866f ("ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20251126064509.1900974-1-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: tegra: remove Kconfig dependency on TEGRA20_APB_DMA
Francesco Lavra [Wed, 26 Nov 2025 11:29:26 +0000 (12:29 +0100)] 
ASoC: tegra: remove Kconfig dependency on TEGRA20_APB_DMA

The ALSA SoC driver for Tegra runs also on SoCs without the Tegra20 APB DMA
controller (e.g. Tegra234).

Signed-off-by: Francesco Lavra <flavra@baylibre.com>
Link: https://patch.msgid.link/20251126112926.4126757-1-flavra@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: nau8325: add missing build config
Jaroslav Kysela [Wed, 26 Nov 2025 09:16:35 +0000 (10:16 +0100)] 
ASoC: nau8325: add missing build config

This configuration was missing from the initial commit.

Found by Jiri Benc <jbenc@redhat.com>

Fixes: c0a3873b9938 ("ASoC: nau8325: new driver")
Cc: Seven Lee <wtli@nuvoton.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20251126091759.2490019-3-perex@perex.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: nau8325: use simple i2c probe function
Jaroslav Kysela [Wed, 26 Nov 2025 09:16:34 +0000 (10:16 +0100)] 
ASoC: nau8325: use simple i2c probe function

The i2c probe functions here don't use the id information provided in
their second argument, so the single-parameter i2c probe function
("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20251126091759.2490019-2-perex@perex.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoALSA: usb-audio: Implement jack detection for HP Thunderbolt Dock G2
Tasos Sahanidis [Wed, 26 Nov 2025 00:29:57 +0000 (02:29 +0200)] 
ALSA: usb-audio: Implement jack detection for HP Thunderbolt Dock G2

The HP Thunderbolt Dock G2 includes a headset jack with support for
jack detection. However, this being a UAC1 device, detection is
implemented via vendor-defined URB Controls.

Implement it in a similar way to the Dell WD15/19 docks, but with
different commands.

Signed-off-by: Tasos Sahanidis <tasos@tasossah.com>
Link: https://patch.msgid.link/20251126003805.2705503-3-tasos@tasossah.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: usb-audio: Modularize realtek_add_jack in mixer_quirks
Tasos Sahanidis [Wed, 26 Nov 2025 00:29:56 +0000 (02:29 +0200)] 
ALSA: usb-audio: Modularize realtek_add_jack in mixer_quirks

Modify the realtek_add_jack function used for the jack detection quirk
to allow passing the mixer unit id and an snd_kcontrol_new.

This allows adding additional devices that require the same quirk, but
implement jack detection with different commands.

Signed-off-by: Tasos Sahanidis <tasos@tasossah.com>
Link: https://patch.msgid.link/20251126003805.2705503-2-tasos@tasossah.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: hda/realtek - Enable Mute LED for HP ZBook X G2i platform
Kailang Yang [Wed, 26 Nov 2025 05:41:01 +0000 (13:41 +0800)] 
ALSA: hda/realtek - Enable Mute LED for HP ZBook X G2i platform

Enable SPK Mute Led and Mic Mute Led for HP ZBook X G2i platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://patch.msgid.link/ab5d4498f7454b25b245a3bad8fb95b3@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: hda/realtek: Add quirk for HP ProBook 450 G8
Ilyas Gasanov [Tue, 25 Nov 2025 23:54:41 +0000 (03:54 +0400)] 
ALSA: hda/realtek: Add quirk for HP ProBook 450 G8

My laptop, HP ProBook 450 G8 (32M40EA), has Realtek ALC236 codec on its
integrated sound card, and uses GPIO pins 0x2 and 0x1 for speaker mute
and mic mute LEDs correspondingly, as found out by me through hda-verb
invocations. This matches the GPIO masks used by the
alc236_fixup_hp_gpio_led() function.

PCI subsystem vendor and device IDs happen to be 0x103c and 0x8a75,
which has not been covered in the ALC2xx driver code yet.

Signed-off-by: Ilyas Gasanov <public@gsnoff.com>
Link: https://patch.msgid.link/20251125235441.53629-1-public@gsnoff.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoASoC: fsl_xcvr: use dev_err_probe() replacing dev_err() + return
Alexander Stein [Tue, 25 Nov 2025 10:13:33 +0000 (11:13 +0100)] 
ASoC: fsl_xcvr: use dev_err_probe() replacing dev_err() + return

Use dev_err_probe() to simplify the code. This also silences -517 errors.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://patch.msgid.link/20251125101334.1596381-1-alexander.stein@ew.tq-group.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: stm32: sai: clean up probe error path
Johan Hovold [Mon, 24 Nov 2025 10:49:08 +0000 (11:49 +0100)] 
ASoC: stm32: sai: clean up probe error path

Use an error label for deregistering also the PCM DMA for consistency.

Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: olivier moysan <olivier.moysan@foss.st.com>
Link: https://patch.msgid.link/20251124104908.15754-5-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: stm32: sai: fix OF node leak on probe
Johan Hovold [Mon, 24 Nov 2025 10:49:07 +0000 (11:49 +0100)] 
ASoC: stm32: sai: fix OF node leak on probe

The reference taken to the sync provider OF node when probing the
platform device is currently only dropped if the set_sync() callback
fails during DAI probe.

Make sure to drop the reference on platform probe failures (e.g. probe
deferral) and on driver unbind.

This also avoids a potential use-after-free in case the DAI is ever
reprobed without first rebinding the platform driver.

Fixes: 5914d285f6b7 ("ASoC: stm32: sai: Add synchronization support")
Fixes: d4180b4c02e7 ("ASoC: stm32: sai: fix set_sync service")
Cc: Olivier Moysan <olivier.moysan@st.com>
Cc: stable@vger.kernel.org # 4.16: d4180b4c02e7
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: olivier moysan <olivier.moysan@foss.st.com>
Link: https://patch.msgid.link/20251124104908.15754-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: stm32: sai: fix clk prepare imbalance on probe failure
Johan Hovold [Mon, 24 Nov 2025 10:49:06 +0000 (11:49 +0100)] 
ASoC: stm32: sai: fix clk prepare imbalance on probe failure

Make sure to unprepare the parent clock also on probe failures (e.g.
probe deferral).

Fixes: a14bf98c045b ("ASoC: stm32: sai: fix possible circular locking")
Cc: stable@vger.kernel.org # 5.5
Cc: Olivier Moysan <olivier.moysan@st.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: olivier moysan <olivier.moysan@foss.st.com>
Link: https://patch.msgid.link/20251124104908.15754-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: stm32: sai: fix device leak on probe
Johan Hovold [Mon, 24 Nov 2025 10:49:05 +0000 (11:49 +0100)] 
ASoC: stm32: sai: fix device leak on probe

Make sure to drop the reference taken when looking up the sync provider
device and its driver data during DAI probe on probe failures and on
unbind.

Note that holding a reference to a device does not prevent its driver
data from going away so there is no point in keeping the reference.

Fixes: 7dd0d835582f ("ASoC: stm32: sai: simplify sync modes management")
Fixes: 1c3816a19487 ("ASoC: stm32: sai: add missing put_device()")
Cc: stable@vger.kernel.org # 4.16: 1c3816a19487
Cc: olivier moysan <olivier.moysan@st.com>
Cc: Wen Yang <yellowriver2010@hotmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: olivier moysan <olivier.moysan@foss.st.com>
Link: https://patch.msgid.link/20251124104908.15754-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: SDCA: Fix NULL vs IS_ERR() bug in sdca_dev_register_functions()
Dan Carpenter [Tue, 25 Nov 2025 13:55:28 +0000 (16:55 +0300)] 
ASoC: SDCA: Fix NULL vs IS_ERR() bug in sdca_dev_register_functions()

The sdca_dev_register() function never returns NULL, it returns error
pointers on error.  Fix the error checking to match.

Fixes: 4496d1c65bad ("ASoC: SDCA: add function devices")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/aSW1UOgMCiQIaZG8@stanley.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoALSA: usb-audio: fix uac2 clock source at terminal parser
René Rebe [Tue, 25 Nov 2025 14:41:49 +0000 (15:41 +0100)] 
ALSA: usb-audio: fix uac2 clock source at terminal parser

Since 8b3a087f7f65 ("ALSA: usb-audio: Unify virtual type units type to
UAC3 values") usb-audio is using UAC3_CLOCK_SOURCE instead of
bDescriptorSubtype, later refactored with e0ccdef9265 ("ALSA: usb-audio:
Clean up check_input_term()") into parse_term_uac2_clock_source().

This breaks the clock source selection for at least my
1397:0003 BEHRINGER International GmbH FCA610 Pro.

Fix by using UAC2_CLOCK_SOURCE in parse_term_uac2_clock_source().

Fixes: 8b3a087f7f65 ("ALSA: usb-audio: Unify virtual type units type to UAC3 values")
Signed-off-by: René Rebe <rene@exactco.de>
Link: https://patch.msgid.link/20251125.154149.1121389544970412061.rene@exactco.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: ctxfi: Add support for Onkyo SE-300PCIE (OK0010)
Harin Lee [Mon, 24 Nov 2025 18:05:01 +0000 (03:05 +0900)] 
ALSA: ctxfi: Add support for Onkyo SE-300PCIE (OK0010)

Add support for the Onkyo SE-300PCIE, a Creative X-Fi CA20K2-based
sound card with a custom hardware implementation that differs
significantly from other CA20K2-based variants.

Changes:
 - PCI quirk entry for OK0010
 - Port 0x3 is utilized for dedicated RCA output (configured as I2S)
 - Modified GPIO pin mappings and states
 - 4-channel simultaneous ADC input support for line and microphone
   capture without input switching (similar to SB1270)
 - Simplified ADC initialization (no manual setup required)

Signed-off-by: Harin Lee <me@harin.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251124180501.2760421-7-me@harin.net
2 weeks agoALSA: ctxfi: Add support for dedicated RCA switching
Harin Lee [Mon, 24 Nov 2025 18:05:00 +0000 (03:05 +0900)] 
ALSA: ctxfi: Add support for dedicated RCA switching

Add feature to support switching between the dedicated RCA output and
the 7.1ch Front output. This is required for hardware that utilizes
separate DAC circuits for RCA and 7.1ch channels.

Changes:
 - Add dedicated_rca capability flag
 - Add "Analog Playback Route" mixer control
 - Implement logic to swap DAO inputs between RCA and Front ports

Signed-off-by: Harin Lee <me@harin.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251124180501.2760421-6-me@harin.net
2 weeks agoALSA: ctxfi: Refactor resource alloc for sparse mappings
Harin Lee [Mon, 24 Nov 2025 18:04:59 +0000 (03:04 +0900)] 
ALSA: ctxfi: Refactor resource alloc for sparse mappings

Refactor atc_get_resources(), atc_connect_resources(), and
atc_release_resources() to allocate resources based on maximum type
definitions.

This allows specific resources to be conditionally skipped based on
capabilities. This is necessary for hardware variants where resource
allocations do not follow a sequential order.

Signed-off-by: Harin Lee <me@harin.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251124180501.2760421-5-me@harin.net
2 weeks agoALSA: ctxfi: Use explicit output flag for DAIO resources
Harin Lee [Mon, 24 Nov 2025 18:04:58 +0000 (03:04 +0900)] 
ALSA: ctxfi: Use explicit output flag for DAIO resources

Replace the index-based type check with an explicit output flag in
struct daio and struct daio_desc.

This allows handling DAIO resource types correctly regardless of their
index. This is necessary for hardware variants where resource types do
not follow a sequential order.

Signed-off-by: Harin Lee <me@harin.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251124180501.2760421-4-me@harin.net
2 weeks agoALSA: ctxfi: Add ADC helper functions for GPIO
Harin Lee [Mon, 24 Nov 2025 18:04:57 +0000 (03:04 +0900)] 
ALSA: ctxfi: Add ADC helper functions for GPIO

Add helper functions hw_adc_stop(), hw_adc_start(), and hw_adc_reset()
to encapsulate ADC reset sequence operations. These functions reduce
duplication by centralizing the GPIO-based ADC control logic.

Signed-off-by: Harin Lee <me@harin.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251124180501.2760421-3-me@harin.net
2 weeks agoALSA: ctxfi: Add hw parameter to daio_mgr_dao_init()
Harin Lee [Mon, 24 Nov 2025 18:04:56 +0000 (03:04 +0900)] 
ALSA: ctxfi: Add hw parameter to daio_mgr_dao_init()

Add a hw parameter to the daio_mgr_dao_init() function to provide
access to model-specific information. This is necessary for proper
configuration of S/PDIF and I2S output ports on different hardware
variants.

Signed-off-by: Harin Lee <me@harin.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251124180501.2760421-2-me@harin.net
2 weeks agoALSA: usb-audio: Fix max bytes-per-interval calculation
Dylan Robinson [Mon, 24 Nov 2025 21:05:18 +0000 (16:05 -0500)] 
ALSA: usb-audio: Fix max bytes-per-interval calculation

The maxpacksize field in struct audioformat represents the maximum number
of bytes per isochronous interval. The current implementation only
special-cases high-speed endpoints and does not account for the different
computations required for SuperSpeed, SuperSpeedPlus, or eUSB2. As a
result, USB audio class devices operating at these speeds may fail to
stream correctly. The issue was observed on a MOTU 16A (2025) interface,
which requires more than 1024 bytes per interval at SuperSpeed.

This patch replaces the existing logic with a helper that computes the
correct maximum bytes-per-interval for all USB speeds, borrowing the logic
used in drivers/usb/core/urb.c.

Signed-off-by: Dylan Robinson <dylan_robinson@motu.com>
Link: https://patch.msgid.link/20251124210518.90054-1-dylan_robinson@motu.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoASoC: cs-amp-lib: Remove redundant calls to kunit_deactivate_static_stub()
Richard Fitzgerald [Mon, 24 Nov 2025 16:20:16 +0000 (16:20 +0000)] 
ASoC: cs-amp-lib: Remove redundant calls to kunit_deactivate_static_stub()

KUnit automatically deactivates stubs when a test case exits, so there
is no need to explicitly call kunit_deactivate_static_stub() in every
test function.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251124162016.30446-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agofirmware: cs_dsp: Store control length as 32-bit
Richard Fitzgerald [Mon, 24 Nov 2025 17:15:35 +0000 (17:15 +0000)] 
firmware: cs_dsp: Store control length as 32-bit

The architectures supported by this driver have a maximum of 32-bits
of address, so we don't need more than 32-bits to store the length of
control data. Change the length in struct cs_dsp_coeff_ctl to an
unsigned int instead of a size_t. Also make a corresponding trivial
change to wm_adsp.c to prevent a compiler warning.

Tested on x86_64 builds this saves at least 4 bytes per control
(another 4 bytes might be saved if the compiler was inserting padding
to align the size_t).

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251124171536.78962-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: tas2781: correct the wrong period
Shenghao Ding [Fri, 21 Nov 2025 23:44:27 +0000 (07:44 +0800)] 
ASoC: tas2781: correct the wrong period

A wrong preiod at the end of the sentence was reported by one of my
customers. Their thorough code review is greatly appreciated.

Fixes: 49e2e353fb0d ("ASoC: tas2781: Add Calibration Kcontrols for Chromebook")
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20251121234427.402-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: tas2781: Correct the wrong chip ID for reset variable check
Baojun Xu [Mon, 24 Nov 2025 03:15:42 +0000 (11:15 +0800)] 
ASoC: tas2781: Correct the wrong chip ID for reset variable check

The new variable of reset was added for TAS58XX on TAS5825 first.
And TAS5802/5815... was added later, so this reset variable check
should be changed to lowest chip of TAS58XX.

Fixes: 53a3c6e22283 ("ASoC: tas2781: Support more newly-released amplifiers tas58xx in the driver")
Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20251124031542.2793-1-baojun.xu@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>