54507 Commits

Author SHA1 Message Date
Shenghao Ding
46b8d0888f ALSA: hda/tas2781: Add newly-released HP laptop
HP released the new laptop with the subid 0x103C.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20260115124907.629-1-shenghao-ding@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-01-15 15:04:27 +01:00
Takashi Iwai
f2161d5f1a Merge tag 'asoc-fix-v6.19-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.19

A moderately large collection of fixes since I missed a week, plus a few
new device IDs and quirks.  It's all fairly minor, including a bunch of
work on the device tree bindings fixes which have no runtime effect.

There's one SoundWire change here exporting a symbol which was required
for a fix to the ASoC SoundWire code.
2026-01-15 15:01:32 +01:00
Zhang Heng
ab2be3af8c ALSA: hda/realtek: Add quirk for HP Pavilion x360 to enable mute LED
This quirk enables mute LED on HP Pavilion x360 2-in-1 Laptop 14-ek0xxx,
which use ALC245 codec.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=220220
Cc: <stable@vger.kernel.org>
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Link: https://patch.msgid.link/20260115015844.3129890-1-zhangheng@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-01-15 11:11:53 +01:00
Mark Brown
a57d5cc053 ASoC: tlv320adcx140: Merge fixes from Pengutronix
Merge patches that Pengutronix have been carrying in their tree for a
while and were upstreamed by Sascha Hauer together with some new
features that are going into the next release.
2026-01-14 22:16:56 +00:00
Mark Brown
1a75f24a7f ASoC: Fix sdw_utils calling wrong codec init callbacks
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

This series fixes a problem with soc_sdw_utils.c calling the wrong
codec init callbacks, because it assumed that the DAI name could be
used to uniquely identify the codec. This isn't the case, especially
on SDCA which is a generic driver for many parts.
The first patch is needed to add a missing export to SoundWire core.
2026-01-14 19:38:52 +00:00
Emil Svendsen
46378ab9fc ASoC: tlv320adcx140: fix word length
The word length is the physical width of the channel slots. So the
hw_params would misconfigure when format width and physical width
doesn't match. Like S24_LE which has data width of 24 bits but physical
width of 32 bits. So if using asymmetric formats you will get a lot of
noise.

Fixes: 689c7655b5 ("ASoC: tlv320adcx140: Add the tlv320adcx140 codec driver family")
Signed-off-by: Emil Svendsen <emas@bang-olufsen.dk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://patch.msgid.link/20260113-sound-soc-codecs-tvl320adcx140-v4-4-8f7ecec525c8@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-14 13:35:32 +00:00
Dimitrios Katsaros
d89aad92cf ASoC: tlv320adcx140: Propagate error codes during probe
When scanning for the reset pin, we could get an -EPROBE_DEFER.
The driver would assume that no reset pin had been defined,
which would mean that the chip would never be powered.

Now we both respect any error we get from devm_gpiod_get_optional.
We also now properly report the missing GPIO definition when
'gpio_reset' is NULL.

Signed-off-by: Dimitrios Katsaros <patcherwork@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://patch.msgid.link/20260113-sound-soc-codecs-tvl320adcx140-v4-3-8f7ecec525c8@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-14 13:35:31 +00:00
Emil Svendsen
be7664c81d ASoC: tlv320adcx140: fix null pointer
The "snd_soc_component" in "adcx140_priv" was only used once but never
set. It was only used for reaching "dev" which is already present in
"adcx140_priv".

Fixes: 4e82971f7b ("ASoC: tlv320adcx140: Add a new kcontrol")
Signed-off-by: Emil Svendsen <emas@bang-olufsen.dk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://patch.msgid.link/20260113-sound-soc-codecs-tvl320adcx140-v4-2-8f7ecec525c8@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-14 13:35:30 +00:00
Emil Svendsen
4130dc47ce ASoC: tlv320adcx140: invert DRE_ENABLE
Looking at section 8.6.1.1.69 in datasheets for both 5140 and 6140 (3140
doesn't support DRE). REG ADCX140_DSP_CFG1 BIT 3 field "DRE_AGC_SEL" it
select either DRE or AGC.
It states:
 * 0 = DRE
 * 1 = AGC

The control is called "DRE_ENABLE" and for it to be true it has to be
active low.

This commit will invert the control so "DRE_ENABLE" is active low.

Signed-off-by: Emil Svendsen <emas@bang-olufsen.dk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://patch.msgid.link/20260113-sound-soc-codecs-tvl320adcx140-v4-1-8f7ecec525c8@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-14 13:35:29 +00:00
Cole Leavitt
390caeed08 ASoC: sdw_utils: cs42l43: Enable Headphone pin for LINEOUT jack type
The CS42L43 codec's load detection can return different impedance values
that map to either HEADPHONE or LINEOUT jack types. However, the
soc_jack_pins array only maps SND_JACK_HEADPHONE to the "Headphone" DAPM
pin, not SND_JACK_LINEOUT.

When headphones are detected with an impedance that maps to LINEOUT
(such as impedance value 0x2), the driver reports SND_JACK_LINEOUT.
Since this doesn't match the jack pin mask, the "Headphone" DAPM pin
is not activated, and no audio is routed to the headphone outputs.

Fix by adding SND_JACK_LINEOUT to the Headphone pin mask, so that both
headphone and line-out detection properly enable the headphone output
path.

This fixes no audio output on devices like the Lenovo ThinkPad P16 Gen 3
where headphones are detected with LINEOUT impedance.

Fixes: d74bad3b74 ("ASoC: intel: sof_sdw_cs42l43: Create separate jacks for hp and mic")
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Cole Leavitt <cole@unwrap.rs>
Link: https://patch.msgid.link/20260114025518.28519-1-cole@unwrap.rs
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-14 13:35:24 +00:00
Richard Fitzgerald
5b027c74f3 ASoC: sdw_utils: Call init callbacks on the correct codec DAI
asoc_sdw_rtd_init() needs to call the rtd_init() callbacks for each
codec in a dailink. It was finding the codecs by looking for the
matching DAI name in codec_info_list[] but this isn't correct, because
the DAI name isn't guaranteed to be unique. Parts using the same codec
driver (so the same DAI names) might require different machine driver
setup.

Instead, get the struct sdw_slave and extract the SoundWire part ID.
Use this to lookup the entry in codec_info_list[]. This is the same
identity info that was used to find the entry when the machine driver
created the dailink.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: e377c94773 ("ASoC: intel/sdw_utils: move soundwire codec_info_list structure")
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260112140758.215799-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-14 13:35:18 +00:00
Edward Adam Davis
ef5749ef8b ALSA: usb-audio: Prevent excessive number of frames
In this case, the user constructed the parameters with maxpacksize 40
for rate 22050 / pps 1000, and packsize[0] 22 packsize[1] 23. The buffer
size for each data URB is maxpacksize * packets, which in this example
is 40 * 6 = 240; When the user performs a write operation to send audio
data into the ALSA PCM playback stream, the calculated number of frames
is packsize[0] * packets = 264, which exceeds the allocated URB buffer
size, triggering the out-of-bounds (OOB) issue reported by syzbot [1].

Added a check for the number of single data URB frames when calculating
the number of frames to prevent [1].

[1]
BUG: KASAN: slab-out-of-bounds in copy_to_urb+0x261/0x460 sound/usb/pcm.c:1487
Write of size 264 at addr ffff88804337e800 by task syz.0.17/5506
Call Trace:
 copy_to_urb+0x261/0x460 sound/usb/pcm.c:1487
 prepare_playback_urb+0x953/0x13d0 sound/usb/pcm.c:1611
 prepare_outbound_urb+0x377/0xc50 sound/usb/endpoint.c:333

Reported-by: syzbot+6db0415d6d5c635f72cb@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=6db0415d6d5c635f72cb
Tested-by: syzbot+6db0415d6d5c635f72cb@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Link: https://patch.msgid.link/tencent_9AECE6CD2C7A826D902D696C289724E8120A@qq.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-01-13 15:05:45 +01:00
Richard Fitzgerald
6a0243c402 ALSA: hda/cirrus_scodec_test: Fix test suite name
Change the test suite name string to "snd-hda-cirrus-scodec-test".

It was incorrectly named "snd-hda-scodec-cs35l56-test", a leftover
from when the code under test was actually in the cs35l56 driver.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 2144833e7b ("ALSA: hda: cirrus_scodec: Add KUnit test")
Link: https://patch.msgid.link/20260113134056.619051-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-01-13 14:51:26 +01:00
Richard Fitzgerald
c5e96e54ec ALSA: hda/cirrus_scodec_test: Fix incorrect setup of gpiochip
Set gpiochip parent to the struct device of the dummy GPIO driver
so that the software node will be associated with the GPIO chip.

The recent commit e5d527be7e ("gpio: swnode: don't use the
swnode's name as the key for GPIO lookup") broke cirrus_scodec_test,
because the software node no longer gets associated with the GPIO
driver by name.

Instead, setting struct gpio_chip.parent to the owning struct device
will find the node using a normal fwnode lookup.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 2144833e7b ("ALSA: hda: cirrus_scodec: Add KUnit test")
Link: https://patch.msgid.link/20260113130954.574670-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-01-13 14:13:59 +01:00
Aleksandrs Vinarskis
cbd46cbc54 ALSA: hda/realtek: Add quirk for Asus Zephyrus G14 2025 using CS35L56, fix speakers
Just like GA403U, this GA403W needs to remap woofers to DAC1. Similarly to
other Asus devices, headphones/headset MIC is not working, however the pin
config alone is not enough to fix it.

From Windows dump of GA403W:
  0x12, 0x90a60140 # Correctly set by codec out of the box
  0x13, 0x90a60550
  0x14, 0x90170510
  0x17, 0x90170120 # Correctly set by codec out of the box
  0x19, 0x03a11050 # Set by ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC
  0x1a, 0x411115F0
  0x1b, 0x03a11c30 # Set by ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC
  0x1d, 0x40663A45 # Correctly set by codec out of the box
  0x21, 0x03211430

Even with all the values set, MIC of the jack is not detected. Until a
complete solution is found, set ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC
for GA403W which fixes audio volume control for woofers. No need to
create new quirk with missing pin config just yet, since its not
making the situation better.

Signed-off-by: Aleksandrs Vinarskis <alex@vinarskis.com>
Link: https://patch.msgid.link/20260112-asus-rog-audio-v1-1-513957b4704e@vinarskis.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-01-13 13:23:01 +01:00
Radhi Bajahaw
8e29db1b08 ASoC: amd: yc: Fix microphone on ASUS M6500RE
Add DMI match for ASUSTeK COMPUTER INC. M6500RE to enable the
internal microphone.

Signed-off-by: Radhi Bajahaw <bajahawradhi@gmail.com>
Link: https://patch.msgid.link/20260112203814.155-1-bajahawradhi@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-13 11:55:23 +00:00
sheetal
f34b32745e ASoC: tegra: Revert fix for uninitialized flat cache warning in tegra210_ahub
Commit 4d4021b0bb ("ASoC: tegra: Fix uninitialized flat cache warning
in tegra210_ahub") attempted to fix the uninitialized flat cache warning
that is observed for the Tegra210 AHUB driver. However, the change broke
various audio tests because an -EBUSY error is returned when accessing
registers from cache before they are read from hardware. Revert this
change for now, until a proper fix is available.

Fixes: 4d4021b0bb ("ASoC: tegra: Fix uninitialized flat cache warning in tegra210_ahub")
Signed-off-by: sheetal <sheetal@nvidia.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://patch.msgid.link/20251217132524.2844499-1-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-12 20:32:03 +00:00
Kery Qi
5b577d214f ASoC: davinci-evm: Fix reference leak in davinci_evm_probe
The davinci_evm_probe() function calls of_parse_phandle() to acquire
device nodes for "ti,audio-codec" and "ti,mcasp-controller". These
functions return device nodes with incremented reference counts.

However, in several error paths (e.g., when the second of_parse_phandle(),
snd_soc_of_parse_card_name(), or devm_snd_soc_register_card() fails),
the function returns directly without releasing the acquired nodes,
leading to reference leaks.

This patch adds an error handling path 'err_put' to properly release
the device nodes using of_node_put() and clean up the pointers when
an error occurs.

Signed-off-by: Kery Qi <qikeyu2017@gmail.com>
Link: https://patch.msgid.link/20260107154836.1521-2-qikeyu2017@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-08 17:31:15 +00:00
Matthew Schwartz
b7e26c8bda ALSA: hda/tas2781: Skip UEFI calibration on ASUS ROG Xbox Ally X
There is currently an issue with UEFI calibration data parsing for some
TAS devices, like the ASUS ROG Xbox Ally X (RC73XA), that causes audio
quality issues such as gaps in playback. Until the issue is root caused
and fixed, add a quirk to skip using the UEFI calibration data and fall
back to using the calibration data provided by the DSP firmware, which
restores full speaker functionality on affected devices.

Cc: stable@vger.kernel.org # 6.18
Link: https://lore.kernel.org/all/160aef32646c4d5498cbfd624fd683cc@ti.com/
Closes: https://lore.kernel.org/all/0ba100d0-9b6f-4a3b-bffa-61abe1b46cd5@linux.dev/
Suggested-by: Baojun Xu <baojun.xu@ti.com>
Signed-off-by: Matthew Schwartz <matthew.schwartz@linux.dev>
Reviewed-by: Antheas Kapenekakis <lkml@antheas.dev>
Link: https://patch.msgid.link/20260108093650.1142176-1-matthew.schwartz@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-01-08 14:05:27 +01:00
Jaroslav Kysela
47c27c9c9c ALSA: pcm: Improve the fix for race of buffer access at PCM OSS layer
Handle the error code from snd_pcm_buffer_access_lock() in
snd_pcm_runtime_buffer_set_silence() function.

Found by Alexandros Panagiotou <apanagio@redhat.com>

Fixes: 93a81ca065 ("ALSA: pcm: Fix race of buffer access at PCM OSS layer")
Cc: stable@vger.kernel.org # 6.15
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://patch.msgid.link/20260107213642.332954-1-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-01-08 08:07:54 +01:00
Ben Dooks
2fa0eaf78c ASoC: ops: fix pointer types to be big-endian
If manipulating big-endian data, make the pointers be big-endian
instead of host-endian. This should stop the following sparse
warnigns about endian-conversion:

sound/soc/soc-ops.c:547:33: warning: invalid assignment: &=
sound/soc/soc-ops.c:547:33:    left side has type unsigned short
sound/soc/soc-ops.c:547:33:    right side has type restricted __be16
sound/soc/soc-ops.c:551:33: warning: invalid assignment: &=
sound/soc/soc-ops.c:551:33:    left side has type unsigned int
sound/soc/soc-ops.c:551:33:    right side has type restricted __be32

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Link: https://patch.msgid.link/20260106225846.83580-1-ben.dooks@codethink.co.uk
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-07 11:51:46 +00:00
Mark Brown
f33db67d91 ASoC: codecs: wsa88xx: fix codec initialisation
Merge series from Johan Hovold <johan@kernel.org>:

The soundwire update_status() callback may be called multiple times with
the same ATTACHED status but initialisation should only be done when
transitioning from UNATTACHED to ATTACHED.

This series fixes the Qualcomm wsa88xx codec drivers that do unnecessary
reinitialisation or potentially fail to initialise at all.

Included is also a related clean up suppressing a related codec variant
printk.
2026-01-06 18:02:05 +00:00
Shengjiu Wang
22a507d768 ASoC: simple-card-utils: Check device node before overwrite direction
Even the device node don't exist, the graph_util_parse_link_direction()
will overwrite the playback_only and capture_only to be zero. Which
cause the playback_only and capture_only are not correct, so check device
node exist or not before update the value.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20251229090432.3964848-1-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05 13:14:44 +00:00
Deep Harsora
12cacdfb02 ASoC: Intel: sof_sdw: Add new quirks for PTL on Dell with CS42L43
Add missing quirks for some new Dell laptops using cs42l43's speaker
outputs.

Signed-off-by: Deep Harsora <Deep_Harsora@dell.com>
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Link: https://patch.msgid.link/20260102152132.3053106-1-mstrozek@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05 13:14:43 +00:00
Johan Hovold
46a16d89d0 ASoC: codecs: wsa883x: suppress variant printk
Drivers should generally be silent on successful probe.

Demote the codec variant printk to debug level and instead add a warning
in case an unknown variant is ever encountered.

Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260102111413.9605-5-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05 13:14:36 +00:00
Johan Hovold
120f3e6ff7 ASoC: codecs: wsa884x: fix codec initialisation
The soundwire update_status() callback may be called multiple times with
the same ATTACHED status but initialisation should only be done when
transitioning from UNATTACHED to ATTACHED.

Fix the inverted hw_init flag which was set to false instead of true
after initialisation which defeats its purpose and may result in
repeated unnecessary initialisation.

Similarly, the initial state of the flag was also inverted so that the
codec would only be initialised and brought out of regmap cache only
mode if its status first transitions to UNATTACHED.

Fixes: aa21a7d4f6 ("ASoC: codecs: wsa884x: Add WSA884x family of speakers")
Cc: stable@vger.kernel.org	# 6.5
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260102111413.9605-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05 13:14:35 +00:00
Johan Hovold
29d71b8a5a ASoC: codecs: wsa881x: fix unnecessary initialisation
The soundwire update_status() callback may be called multiple times with
the same ATTACHED status but initialisation should only be done when
transitioning from UNATTACHED to ATTACHED.

Fixes: a0aab9e140 ("ASoC: codecs: add wsa881x amplifier support")
Cc: stable@vger.kernel.org	# 5.6
Cc: Srinivas Kandagatla <srini@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260102111413.9605-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05 13:14:34 +00:00
Johan Hovold
49aadf830e ASoC: codecs: wsa883x: fix unnecessary initialisation
The soundwire update_status() callback may be called multiple times with
the same ATTACHED status but initialisation should only be done when
transitioning from UNATTACHED to ATTACHED.

This avoids repeated initialisation of the codecs during boot of
machines like the Lenovo ThinkPad X13s:

[   11.614523] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2
[   11.618022] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2
[   11.621377] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2
[   11.624065] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2
[   11.631382] wsa883x-codec sdw:1:0:0217:0202:00:2: WSA883X Version 1_1, Variant: WSA8835_V2
[   11.634424] wsa883x-codec sdw:1:0:0217:0202:00:2: WSA883X Version 1_1, Variant: WSA8835_V2

Fixes: 43b8c7dc85 ("ASoC: codecs: add wsa883x amplifier support")
Cc: stable@vger.kernel.org	# 6.0
Cc: Srinivas Kandagatla <srini@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260102111413.9605-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-05 13:14:33 +00:00
Ruslan Krupitsa
9ed7a28225 ALSA: hda/realtek: add HP Laptop 15s-eq1xxx mute LED quirk
HP Laptop 15s-eq1xxx with ALC236 codec does not enable the
mute LED automatically. This patch adds a quirk entry for
subsystem ID 0x8706 using the ALC236_FIXUP_HP_MUTE_LED_COEFBIT2
fixup, enabling correct mute LED behavior.

Signed-off-by: Ruslan Krupitsa <krupitsarus@outlook.com>
Link: https://patch.msgid.link/AS8P194MB112895B8EC2D87D53A876085BBBAA@AS8P194MB1128.EURP194.PROD.OUTLOOK.COM
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-01-02 14:34:23 +01:00
Matouš Lánský
9be25402d8 ALSA: hda/realtek: Add quirk for Acer Nitro AN517-55
Add headset mic quirk for Acer Nitro AN517-55. This laptop uses
the same audio configuration as the AN515-58 model.

Signed-off-by: Matouš Lánský <matouslansky@post.cz>
Link: https://patch.msgid.link/20251231171207.76943-1-matouslansky@post.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-01-01 11:05:09 +01:00
Takashi Iwai
64d4fe6a4b Merge tag 'asoc-fix-v6.19-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.19

A small collection of driver speciifc fixes, mostly relatively minor,
plus an adjustment to the topology file naming for Intel systems with
Bluetooth required for disambiguation.
2025-12-31 16:44:28 +01:00
August Wikerfors
e340663bbf ALSA: hda/tas2781: properly initialize speaker_id for TAS2563
After speaker id retrieval was refactored to happen in tas2781_read_acpi,
devices that do not use a speaker id need a negative speaker_id value
instead of NULL, but no initialization was added to the TAS2563 code path.
This causes the driver to attempt to load a non-existent firmware file name
with a speaker id of 0 ("TAS2XXX38700.bin") instead of the correct file
name without a speaker id ("TAS2XXX3870.bin"), resulting in low volume and
these dmesg errors:

    tas2781-hda i2c-INT8866:00: Direct firmware load for TAS2XXX38700.bin failed with error -2
    tas2781-hda i2c-INT8866:00: tasdevice_dsp_parser: load TAS2XXX38700.bin error
    tas2781-hda i2c-INT8866:00: dspfw load TAS2XXX38700.bin error
    [...]
    tas2781-hda i2c-INT8866:00: tasdevice_prmg_load: Firmware is NULL

Fix this by setting speaker_id to -1 as is done for other models.

Fixes: 945865a0dd ("ALSA: hda/tas2781: fix speaker id retrieval for multiple probes")
Cc: stable@vger.kernel.org
Signed-off-by: August Wikerfors <git@augustwikerfors.se>
Link: https://patch.msgid.link/20251222194704.87232-1-git@augustwikerfors.se
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-23 10:49:43 +01:00
Haoxiang Li
830988b6cf ALSA: ac97: fix a double free in snd_ac97_controller_register()
If ac97_add_adapter() fails, put_device() is the correct way to drop
the device reference. kfree() is not required.
Add kfree() if idr_alloc() fails and in ac97_adapter_release() to do
the cleanup.

Found by code review.

Fixes: 74426fbff6 ("ALSA: ac97: add an ac97 bus")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Link: https://patch.msgid.link/20251219162845.657525-1-lihaoxiang@isrc.iscas.ac.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-23 10:43:43 +01:00
Mark Brown
3572ad8220 ASoC: drop bogus container_of() error handling
Merge series from Johan Hovold <johan@kernel.org>:

The dev_to_sdw_dev() helper uses container_of() to return the containing
soundwire device structure of its pointer argument and will never
return NULL.
2025-12-22 22:13:03 +00:00
Chen-Yu Tsai
6c11aa2b4c ASoC: sun4i-spdif: Add missing kerneldoc fields for sun4i_spdif_quirks
When sun4i_spdif_quirks was recently expanded, the kerneldoc covering
the structure was not expanded to match. This ends up causing a warning
when the documents are built.

Add the missing fields.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501311953.0Ox9CW5w-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202503060947.QKUUR62l-lkp@intel.com/
Fixes: 0a2319308d ("ASoC: sun4i-spdif: Add clock multiplier settings")
Fixes: 4a5ac6cd05 ("ASoC: sun4i-spdif: Support SPDIF output on A523 family")
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
Reviewed-by: Marcus Cooper <codekipper@gmail.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://patch.msgid.link/20251221035715.1722584-1-wens@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22 18:03:11 +00:00
Johan Hovold
97af54473f ASoC: codecs: pm4125: clean up bind() device reference handling
A recent change fixed a couple of device leaks on component bind failure
and on unbind but did so in a confusing way by adding misleading
initialisations at bind() and bogus NULL checks at unbind().

Cc: Ma Ke <make24@iscas.ac.cn>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20251219142412.19043-1-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22 18:03:10 +00:00
Johan Hovold
870b10f61d ASoC: soc_sdw_utils: drop bogus container_of() error handling
The dev_to_sdw_dev() helper uses container_of() to return the containing
soundwire device structure of its pointer argument and will never return
NULL.

Fixes: 4f8ef33dd4 ("ASoC: soc_sdw_utils: skip the endpoint that doesn't present")
Cc: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20251219142715.19254-4-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22 09:14:53 +00:00
Johan Hovold
61a50d6f58 ASoC: codecs: wcd937x: drop bogus container_of() error handling
The dev_to_sdw_dev() helper uses container_of() to return the containing
soundwire device structure of its pointer argument and will never return
NULL.

Fixes: 9be3ec196d ("ASoC: codecs: wcd937x: add wcd937x codec driver")
Cc: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20251219142715.19254-3-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22 09:14:52 +00:00
Johan Hovold
54fa71f5f9 ASoC: codecs: pm4125: drop bogus container_of() error handling
The dev_to_sdw_dev() helper uses container_of() to return the containing
soundwire device structure of its pointer argument and will never return
NULL.

Fixes: 8ad5294849 ("ASoC: codecs: add new pm4125 audio codec driver")
Cc: Alexey Klimov <alexey.klimov@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Alexey Klimov <alexey.klimov@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20251219142715.19254-2-johan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22 09:14:51 +00:00
Bard Liao
a0c8ee09f9 ASoC: SOF: Intel: add -bt tplg suffix if BT is present
We need to distinguish the topologies with and without BT PCM.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20251219034937.3630569-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22 09:00:36 +00:00
Mac Chiang
e4ca5ecc3c ASoC: Intel: sof_sdw: shift SSP BT mask bits.
The SSP BT mask bits overlapped with SOC_SDW_CODEC_SPKR,
SOC_SDW_SIDECAR_AMPS, and SOC_SDW_CODEC_MIC BIT[15–17] in
sdw_utils.h. Shift the SSP BT mask bits to a higher range to
eliminate the conflict.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20251219034902.3630537-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-22 09:00:35 +00:00
Chris Chiu
17753d1755 ALSA: hda/realtek: fix PCI SSID for one of the HP 200 G2i laptop
The PCI subsystem ID of the HP machine Abe A6U should be 0x8ee7
instead of 0x8eb7.

Fixes: a30fa81222 ("ALSA: hda/realtek: fix mute/micmute LEDs don't work for more HP laptops")
Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Link: https://patch.msgid.link/20251218062251.2039592-1-chris.chiu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-21 11:19:31 +01:00
Takashi Iwai
24f171c7e1 Merge tag 'asoc-fix-v6.19-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.19

We've been quite busy with fixes since the merge window, though not in
any particularly exciting ways - the standout thing is the fix for _SX
controls which were broken by a change to how we do clamping, otherwise
it's all fairly run of the mill fixes and quirks.
2025-12-21 11:11:11 +01:00
Mark Brown
56d953a8d0 ASoC: Intel: mtl-match: Add 6-amp matches for CS35L56
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

These two commits add support for 6 amps with feedback, primarily for
the CDB35L56-EIGHT-C and CDB35L63-CB8 and similar hardware.
2025-12-19 13:25:16 +00:00
Mark Brown
01ad27827c ASoC: fsl_easrc: Fix duplicate debufs entries
Merge series from Alexander Stein <alexander.stein@ew.tq-group.com>:

this series fixes the error regarding duplicate debugfs directory creation on
TQMa8MPxL (imx8mp) when easrc is enabled:
  debugfs: '30c90000.easrc' already exists in 'tqm-tlv320aic32'

This is caused because fsl_easrc adds two components which use the device name
as component name. Debugfs directories for each component is created, resulting
on name conflict. Fix this by adding the debugfs_prefix for both component
drivers.

Before:
$ ls /sys/kernel/debug/asoc/tqm-tlv320aic32/
30c30000.sai  30c90000.easrc  HiFi-ASRC-FE  dapm  dapm_pop_time
dma:30c30000.sai  tlv320aic32x4.1-0018

After:
$ ls /sys/kernel/debug/asoc/tqm-tlv320aic32/
30c30000.sai  HiFi-ASRC-FE  asrc:30c90000.easrc  dapm  dapm_pop_time
dma:30c30000.sai  easrc:30c90000.easrc  tlv320aic32x4.1-0018
2025-12-19 13:25:12 +00:00
Stefan Binding
095d621141 ASoC: ops: fix snd_soc_get_volsw for sx controls
SX controls are currently broken, since the clamp introduced in
commit a0ce874cfa ("ASoC: ops: improve snd_soc_get_volsw") does not
handle SX controls, for example where the min value in the clamp is
greater than the max value in the clamp.

Add clamp parameter to prevent clamping in SX controls.
The nature of SX controls mean that it wraps around 0, with a variable
number of bits, therefore clamping the value becomes complicated and
prone to error.

Fixes 35 kunit tests for soc_ops_test_access.

Fixes: a0ce874cfa ("ASoC: ops: improve snd_soc_get_volsw")

Co-developed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20251216134938.788625-1-sbinding@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-18 18:18:18 +00:00
Antheas Kapenekakis
f7cede182c ALSA: hda/realtek: Add Asus quirk for TAS amplifiers
By default, these devices use the quirk ALC294_FIXUP_ASUS_SPK. Not
using it causes the headphone jack to stop working. Therefore,
introduce a new quirk ALC287_FIXUP_TXNW2781_I2C_ASUS that binds
to the TAS amplifier while using that quirk.

Cc: stable@kernel.org
Fixes: 18a4895370 ("ALSA: hda/realtek: Add match for ASUS Xbox Ally projects")
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Link: https://patch.msgid.link/20251216211714.1116898-1-lkml@antheas.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-17 20:34:03 +01:00
Stefan Binding
26f637fa08 ASoC: Intel: soc-acpi-intel-mtl-match: Add 6 amp CS35L63 with feedback
Add match for 6x CS35L63, 3x on link 2 and 3x on link 3.

This is to support 6 amps on the CDB35L63-CB8 board.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251217163227.1186373-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-17 16:35:38 +00:00
Stefan Binding
e43aefb771 ASoC: Intel: soc-acpi-intel-mtl-match: Add 6 amp CS35L56 with feedback
Add a match for 6x CS35L56, 3x on link 0 and 3x on link 1.
To support the CDB35L56-EIGHT-C board using 6 amps.

This is the same as the existing 8-amp configuration
mtl_cs35l56_x8_link0_link1_fb, but reduced to 6 amps.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251217163227.1186373-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-17 16:35:37 +00:00
Chancel Liu
fa43ab13c5 ASoC: fsl-asoc-card: Use of_property_present() for non-boolean properties
The use of of_property_read_bool() for non-boolean properties is
deprecated in favor of of_property_present() when testing for property
presence.
Otherwise there'll be kernel warning:
[   29.018081] OF: /sound-wm8962: Read of boolean property 'hp-det-gpios' with a value.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20251216071656.648412-1-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-12-17 12:01:03 +00:00