Commit Graph

53043 Commits

Author SHA1 Message Date
Takashi Iwai
a725f6fa58 ALSA: serial-u16550: Use safer strscpy() instead of strcpy()
Use a safer function strscpy() instead of strcpy() for copying to
arrays.

Only idiomatic code replacement, and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250710100727.22653-11-tiwai@suse.de
2025-07-11 09:51:09 +02:00
Takashi Iwai
eb264bc529 ALSA: serial-generic: Use safer strscpy() instead of strcpy()
Use a safer function strscpy() instead of strcpy() for copying to
arrays.

Only idiomatic code replacement, and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250710100727.22653-10-tiwai@suse.de
2025-07-11 09:51:09 +02:00
Takashi Iwai
7ba740ecf5 ALSA: portman2x4: Use safer strscpy() instead of strcpy()
Use a safer function strscpy() instead of strcpy() for copying to
arrays.

Only idiomatic code replacement, and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250710100727.22653-9-tiwai@suse.de
2025-07-11 09:51:09 +02:00
Takashi Iwai
6d352251e9 ALSA: pcsp: Use safer strscpy() instead of strcpy()
Use a safer function strscpy() instead of strcpy() for copying to
arrays.

Only idiomatic code replacement, and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250710100727.22653-8-tiwai@suse.de
2025-07-11 09:51:09 +02:00
Takashi Iwai
0676ccf26f ALSA: opl4: Use safer strscpy() instead of strcpy()
Use a safer function strscpy() instead of strcpy() for copying to
arrays.

Only idiomatic code replacement, and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250710100727.22653-7-tiwai@suse.de
2025-07-11 09:51:08 +02:00
Takashi Iwai
bb246ab094 ALSA: opl3: Use safer strscpy() instead of strcpy()
Use a safer function strscpy() instead of strcpy() for copying to
arrays.

Only idiomatic code replacement, and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250710100727.22653-6-tiwai@suse.de
2025-07-11 09:51:08 +02:00
Takashi Iwai
59cea894bf ALSA: mpu401: Use safer strscpy() instead of strcpy()
Use a safer function strscpy() instead of strcpy() for copying to
arrays.

Only idiomatic code replacement, and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250710100727.22653-5-tiwai@suse.de
2025-07-11 09:51:08 +02:00
Takashi Iwai
7df6224dec ALSA: seq: Use safer strscpy() instead of strcpy()
Use a safer function strscpy() instead of strcpy() for copying to
arrays.

Only idiomatic code replacement, and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250710100727.22653-4-tiwai@suse.de
2025-07-11 09:51:08 +02:00
Takashi Iwai
d8cd23a0d2 ALSA: rawmidi: Use safer strscpy() instead of strcpy()
Use a safer function strscpy() instead of strcpy() for copying to
arrays.

Only idiomatic code replacement, and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250710100727.22653-3-tiwai@suse.de
2025-07-11 09:51:08 +02:00
Takashi Iwai
8bb0a5fcde ALSA: control: Use safer strscpy() instead of strcpy()
Use a safer function strscpy() instead of strcpy() for copying to
arrays.

Only idiomatic code replacement, and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250710100727.22653-2-tiwai@suse.de
2025-07-11 09:51:08 +02:00
Takashi Iwai
3829d81b69 Merge branch 'for-linus' into for-next
Back-merge 6.16 devel branch for large patch sets including string
cleanups and HD-audio reorganization

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-11 09:50:06 +02:00
Edip Hazuri
d9b99eb3d7 ALSA: hda/realtek - Fix mute LED for HP Victus 16-r0xxx
The mute led on this laptop is using ALC245 but requires a quirk to work
This patch enables the existing quirk for the device.

Tested on Victus 16-r0xxx Laptop. The LED behaviour works
as intended.

Cc: <stable@vger.kernel.org>
Signed-off-by: Edip Hazuri <edip@medip.dev>
Link: https://patch.msgid.link/20250710131812.27509-1-edip@medip.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-10 16:23:42 +02:00
Takashi Iwai
04f9196ba9 ASoC: Fixes for v6.16
Two patches here, one quirk for an AMD system and a fix for an issue on
 remove of the AVS driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmhvf0AACgkQJNaLcl1U
 h9BVfgf/VP/sVlMY+hiGvCT80Kj/nGsc/mdjWLLuCCHYpadyPUP8xJQTh/B/4w/x
 737pRbcQo1jlPVEani9/FDmtqtNRL/wg3g8mgSvyVaui5AXL3LZD8zxk7bobFTwz
 S+LhDQCZlN0tcn24qitsRe7U1uJcQ4WllApgHrlcsKWKONZydOjzKRv2d6wt5kY6
 mEOQTN8fY5Fvqia5psZxwA7WtZTYQyS7Q6o+83ncE2Rf00KM9X2bdoYtZ5ZsAtG0
 whve+VwXMq2MBpCzdEAb/CCATQ0SAXSlSKHyKAKi1C8lFuWeciNk4AAMmffaukn/
 kIPs75PvczIHuTIc7OBgxBiWNF1bMg==
 =dXN7
 -----END PGP SIGNATURE-----

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

ASoC: Fixes for v6.16

Two patches here, one quirk for an AMD system and a fix for an issue on
remove of the AVS driver.
2025-07-10 11:59:31 +02:00
Arnd Bergmann
19c4096ccd ALSA: compress_offload: tighten ioctl command number checks
The snd_compr_ioctl() ignores the upper 24 bits of the ioctl command
number and only compares the number of the ioctl command, which can
cause unintended behavior if an application tries to use an unsupprted
command that happens to have the same _IOC_NR() value.

Remove the truncation to the low bits and compare the entire ioctl
command code like every other driver does.

Fixes: b21c60a4ed ("ALSA: core: add support for compress_offload")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://patch.msgid.link/20250710063059.2683476-1-arnd@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-10 10:10:08 +02:00
Arnd Bergmann
ad4655653a
ASoC: SDCA: fix HID dependency
It is not possible to enable SND_SOC_SDCA_HID when SND_SOC_SDCA is built-in
but HID is in a loadable module, as that results in a link failure:

x86_64-linux-ld: sound/soc/sdca/sdca_functions.o: in function `find_sdca_entity_hide':
sdca_functions.c:(.text+0x25b): undefined reference to `sdca_add_hid_device'

Change SND_SOC_SDCA_HID into a 'bool' option that can only be enabled
if this results in a working build, and change the Makefile so this driver
is a loadable module if possible.

Fixes: ac558015df ("ASoC: SDCA: add a HID device for HIDE entity")
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20250709152430.1498427-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-09 16:42:22 +01:00
Mark Brown
f5b92c7449
ASoC: don't set dapm->bias_level directly
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

We have many set_bias_level functions, thus dapm->bias_level should be
handled by owner function, not by its callback functions.
2025-07-09 16:36:11 +01:00
Thorsten Blum
907e01b3ce ALSA: echoaudio: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead.

No functional changes intended.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250709124655.1195-1-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-09 16:03:29 +02:00
Peter Ujfalusi
c61da55412
ASoC: sdw_utils: Add missed component_name strings for speaker amps
Several speaker amp was missed when the compoennt_name was added, which
results missing " spk:" from the components string, confusing UCM.

Fixes: f792733e08 ("ASoC: sdw_utils: add component_name string to dai_info")
Cc: stable@vger.kernel.org
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250709025745.1285788-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-09 14:33:58 +01:00
Mark Brown
192595a60a
ASoC: Intel: add support for new devices
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

Add support for new devices on Intel platforms.
2025-07-09 12:37:01 +01:00
Geert Uytterhoeven
68e4dadacb
ASoC: img: Imagination Technologies sound should depend on MIPS
Before, all Imagination sound symbols were gated by the SND_SOC_IMG
symbol, offering the user a simple option to hide them all.  After the
removal of this gate symbol, all symbols are exposed to the user, even
when configuring a kernel for a non-Imagination platform.
Fix this by adding a dependency on MIPS, to prevent asking the user
about these drivers when configuring a kernel for a different
architecture.

Fixes: b13f7eef9f ("ASoC: img: Standardize ASoC menu")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/242832f225ae68018111648ea9934dc059741567.1751989463.git.geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-09 08:58:54 +01:00
Amadeusz Sławiński
a609bd74b8
ASoC: Intel: avs: Fix NULL ptr deref on rmmod
When uloading snd_soc_avs module there is NULL pointer dereference.
It happens, because codec was moved into pdata and
avs_component_hda_unregister_dais() was not updated.

Fixes: 1581d5c682 ("ASoC: Intel: avs: boards: Add Kconfig option for obsolete card names")
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20250708105009.1883627-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-08 14:54:40 +01:00
Mac Chiang
86ccd4d3e8
ASoC: Intel: soc-acpi-intel-lnl-match: add rt1320_l12_rt714_l0 support
This patch add acpi matching support for the rt1320 left and right
amplifiers on soundwire link 1 and 2, and the rt714 dmic on
soundwire link 0.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250708080030.1257790-5-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-08 09:49:58 +01:00
Mac Chiang
e149d87068
ASoC: Intel: soc-acpi-intel-ptl-match: add support ptl-rt721-l0
This patch adds support for rt721 on Soundwire Link 0.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250708080030.1257790-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-08 09:49:57 +01:00
Balamurugan C
fb00ab1f39
ASoC: Intel: soc-acpi: Add entry for HDMI_In capture support in PTL match table
Adding HDMI-In capture via I2S feature support in PTL platform.

Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250708080030.1257790-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-08 09:49:56 +01:00
Balamurugan C
2813f535b5
ASoC: Intel: soc-acpi: Add entry for sof_es8336 in PTL match table.
Adding ES83x6 I2S codec support for PTL platforms and entry in match table.

Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250708080030.1257790-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-08 09:49:56 +01:00
Kuninori Morimoto
67bdd67aed
ASoC: rt715: don't set dapm->bias_level
snd_soc_component_set_bias_level() (A) which will call .set_bias_level()
callback (B) will be called from snd_soc_dapm_force_bias_level() (C) only,
and it sets dapm->bias_level (D) inside. No need to set it by each driver.
Remove it.

(A)	int snd_soc_component_set_bias_level(...)
	{
		...
		if (component->driver->set_bias_level)
(B)			ret = component->driver->set_bias_level(...);
		...
	}

(C)	int snd_soc_dapm_force_bias_level(...)
	{
		...
		if (dapm->component)
(A)			ret = snd_soc_component_set_bias_level(...);

		if (ret == 0)
(D)			dapm->bias_level = level;
		...
	}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87plebmmax.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-08 09:49:52 +01:00
Kuninori Morimoto
a3c3e84fc4
ASoC: rt700: don't set dapm->bias_level
snd_soc_component_set_bias_level() (A) which will call .set_bias_level()
callback (B) will be called from snd_soc_dapm_force_bias_level() (C) only,
and it sets dapm->bias_level (D) inside. No need to set it by each driver.
Remove it.

(A)	int snd_soc_component_set_bias_level(...)
	{
		...
		if (component->driver->set_bias_level)
(B)			ret = component->driver->set_bias_level(...);
		...
	}

(C)	int snd_soc_dapm_force_bias_level(...)
	{
		...
		if (dapm->component)
(A)			ret = snd_soc_component_set_bias_level(...);

		if (ret == 0)
(D)			dapm->bias_level = level;
		...
	}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87qzyrmmb2.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-08 09:49:52 +01:00
Alexandru Andries
6f80be5485
ASoC: amd: yc: add DMI quirk for ASUS M6501RM
add DMI entry for ASUS Vivobook PRO 15X (M6501RM)
to make the internal microphone function

Signed-off-by: Alexandru Andries <alex.andries.aa@gmail.com>
Link: https://patch.msgid.link/20250707220730.361290-1-alex.andries.aa@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-07 23:41:09 +01:00
Mark Brown
bb96a315b4
ASoC: soc-dapm: cleanups
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

This is prepare to hiding snd_soc_dapm_context inside soc-dapm.c
2025-07-07 21:02:59 +01:00
Kuninori Morimoto
08dc0f5cc2
ASoC: soc-dapm: add prefix on soc_dapm_dev_attrs
soc_dapm_dev_attrs is global variable. Let's add snd_soc_ prefix.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87ikkchis6.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-07 16:13:09 +01:00
Kuninori Morimoto
9d33f9ca44
ASoC: soc-dapm: add prefix on dapm_xxx_event()
dapm_xxx_event() is global function. Let's add snd_soc_ prefix.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87jz4shisc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-07 16:13:08 +01:00
Kuninori Morimoto
805c019fbb
ASoC: soc-dapm: add prefix on dapm_mark_endpoints_dirty()
dapm_mark_endpoints_dirty() is global function. Let's add snd_soc_
prefix.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87ldp8hisj.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-07 16:13:07 +01:00
Kuninori Morimoto
1ac2365384
ASoC: soc-dapm: use common name for dapm
Let's use "dapm", instead of "d". This is prepare for dapm cleanup.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87ms9ohisp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-07 16:13:06 +01:00
Kuninori Morimoto
fbd09117a3
ASoC: soc-dapm: use component instead of cmpnt
Use normal "component" instead of short "cmpnt"

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87o6u4hisu.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-07 16:13:05 +01:00
Kuninori Morimoto
0d516af948
ASoC: soc-dapm: reordering function definitions
Because functions are defined randomly, it needs function name
definitions on top of soc-dapm.c. it is not needed if functions
are implemented in correct order.

This patch has big change from change-line point of view, but is
just reordering, nothing changed in meaning.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87qzz0hit6.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-07 16:13:03 +01:00
Kuninori Morimoto
d6f240031a
ASoC: soc-dapm: remove snd_soc_dapm_weak_routes()
No one is using snd_soc_dapm_weak_routes(), let's remove it.
Because snd_soc_dapm_weak_routes() was removed, path->weak is not
needed either. Remove it, too.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87sejghitd.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-07 16:13:02 +01:00
Kuninori Morimoto
2ec1067d1e
ASoC: soc-dapm: remove snd_soc_dapm_nc_pin[_unlocked]()
snd_soc_dapm_nc_pin() was added in commit 5817b52a29 ("ALSA: ASoC: Allow
machine drivers to mark pins as not connected") at 2008.
It is identical to snd_soc_dapm_disable_pin[_unlocked](). It was expected
to be updated, but were enough as-is for this 17 years.

We might update these, but renaming function name by define is enough
for now. We can re-create these if needed in the future. Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87tt3whitj.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-07 16:13:01 +01:00
Kuninori Morimoto
58baaea266
ASoC: soc-dapm: remove EXPORT_SYMBOL_GPL() for snd_soc_dapm_free()
snd_soc_dapm_free() is called from soc-dapm.c / soc-core.c only. All these
are compiled by snd-soc-core-y. So EXPORT_SYMBOL_GPL() is not needed. Remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87v7ochitp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-07 16:13:00 +01:00
Kuninori Morimoto
e199e85556
ASoC: soc-dapm: remove unnecessary definition
Below functions are already defined in soc-dapm.h, it is not necessary
in soc-dapm.c. Remove these

	snd_soc_dapm_new_control()
	snd_soc_dapm_new_control_unlocked()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87wm8shitv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-07 16:12:59 +01:00
Edson Juliano Drosdeck
d78f76457d ALSA: hda/realtek: Enable headset Mic on Positivo K116J
Positivo K116J is equipped with ALC269VC, and needs a fix to make
the headset mic to work.
Also must to limits the internal microphone boost.

Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
Link: https://patch.msgid.link/20250707114537.8291-1-edson.drosdeck@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-07 14:09:09 +02:00
Baojun Xu
85e323bdbe ALSA: hda/tas2781: Fix calibration data parser issue
We will copy calibration data from position behind to front.
We have created a variable (tmp_val) point on top of calibration data
buffer, and tmp_val[1] is max of node number in original calibration
data structure, it will be overwritten after first data copy,
so can't be used as max node number check in for loop.
So we create a new variable to save max of node number (tmp_val[1]),
used to check if max node number was reached in for loop.
And a point need to be increased to point at calibration data in node.
Data saved position also need to be increased one byte.

Fixes: 4fe2385134 ("ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib")
Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20250707090513.1462-1-baojun.xu@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-07 11:23:28 +02:00
Thorsten Blum
3263a554f3 ALSA: mts64: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead.

No functional changes intended.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250706160906.416270-1-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-07 09:57:09 +02:00
Sakari Ailus
fc2f0135a9 ALSA: hda: Remove redundant pm_runtime_mark_last_busy() calls
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://patch.msgid.link/20250704075455.3222438-1-sakari.ailus@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-06 10:25:31 +02:00
Sakari Ailus
5b32627c8e ALSA: intel_hdmi: Remove redundant pm_runtime_mark_last_busy() calls
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://patch.msgid.link/20250704075500.3222950-1-sakari.ailus@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-06 10:25:18 +02:00
GalaxySnail
6eda942950 ALSA: hda: add MODULE_FIRMWARE for cs35l41/cs35l56
add firmware information in the .modinfo section, so that userspace
tools can find out firmware required by cs35l41/cs35l56 kernel module

Signed-off-by: GalaxySnail <me@glxys.nl>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250624101716.2365302-2-me@glxys.nl
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-06 10:23:03 +02:00
Baojun Xu
a094f84627 ALSA: hda/tas2781: Add bus name in device name check
Device name start from bus name, as we use strstarts()
to do compare, need add it for TXNW2781 device.

Fixes: b2904df0a3 ("ALSA: hda/tas2781: Add compatible for hardware id TIAS2781 and TXNW2781")
Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20250705025333.24346-1-baojun.xu@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-06 10:21:34 +02:00
Mark Brown
12826a49f0
treewide: Remove redundant
Merge series from Sakari Ailus <sakari.ailus@linux.intel.com>:

Late last year I posted a set to switch to __pm_runtime_mark_last_busy()
and gradually get rid of explicit pm_runtime_mark_last_busy() calls in
drivers, embedding them in the appropriate pm_runtime_*autosuspend*()
calls. The overall feedback I got at the time was that this is an
unnecessary intermediate step, and removing the
pm_runtime_mark_last_busy() calls can be done after adding them to the
relevant Runtime PM autosuspend related functions.
2025-07-04 22:42:36 +01:00
Sakari Ailus
2bd9648d5a
ASoC: SOF: Remove redundant pm_runtime_mark_last_busy() calls
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250704075459.3222908-1-sakari.ailus@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-04 19:28:22 +01:00
Sakari Ailus
e879f14d88
ASoC: component: Remove redundant pm_runtime_mark_last_busy() calls
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://patch.msgid.link/20250704075458.3222817-1-sakari.ailus@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-04 19:28:21 +01:00
Sakari Ailus
077e700cd7
ASoC: Intel: Remove redundant pm_runtime_mark_last_busy() calls
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://patch.msgid.link/20250704075457.3222746-1-sakari.ailus@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-04 19:28:20 +01:00
Sakari Ailus
bbe5e3c433
ASoC: codecs: Remove redundant pm_runtime_mark_last_busy() calls
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://patch.msgid.link/20250704075456.3222642-1-sakari.ailus@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-04 19:28:19 +01:00
Sakari Ailus
9069141d1d
ASoC: atmel: Remove redundant pm_runtime_mark_last_busy() calls
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://patch.msgid.link/20250704075455.3222541-1-sakari.ailus@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-04 19:28:18 +01:00
Peng Fan
571defe0df
ASoC: codec: rockchip_sai: Remove including of_gpio.h
of_gpio.h is deprecated. And there is no user in this driver
using API in of_gpio.h, so remove it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Link: https://patch.msgid.link/20250704130906.1207134-1-peng.fan@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-04 19:27:23 +01:00
Takashi Iwai
4f5b1aa2e4 ASoC: Fixes for v6.16
An update for the MAINTAINERS file, plus a number of small driver
 specific fixes and device quirks.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmhn7fgACgkQJNaLcl1U
 h9ASmAf+J5Wo5QIvuO7FwvNZAId2f21FQSH2PuXC/Pq7RQz2t74u4WdTx19qCU7D
 PbduQwzizElKiYHrtvNBGeOHk0LZer1yyI74G5ziRE8gPwQUFK2gKLqGE8dbGhZp
 0YjXMK4Yps0br+zJt5UC6zAzPIddYcv43VHb/YJr0dFV3G3vjHQbvyrHHVCgla/u
 r1wCdHLqXsHF85OSoc/BIVSwgaDEztAs1bq4jXBw8upVbc0nmi8glJ7gYaRB4Ggv
 U5llRHFOgCRWor4yNBXCF8Os9m90khk1/DQqdVBMsXX4R2npbnmPhIu73NarQ49/
 F6mTSK4f7jfGBGxpZR16kPHkiwi2fQ==
 =ConA
 -----END PGP SIGNATURE-----

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

ASoC: Fixes for v6.16

An update for the MAINTAINERS file, plus a number of small driver
specific fixes and device quirks.
2025-07-04 17:53:03 +02:00
Rob Herring (Arm)
bc163baef5
ASoC: Use of_reserved_mem_region_to_resource() for "memory-region"
Use the newly added of_reserved_mem_region_to_resource() function to
handle "memory-region" properties.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Link: https://patch.msgid.link/20250703183523.2075276-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-04 13:09:47 +01:00
Takashi Iwai
0d3d3d0194 ALSA: hda: Add device entry for QEMU
QEMU HD-audio device (1af4:0021) is handled by the generic HD-audio
codec driver, hence it's better to have an explicit device ID listing,
so that we can avoid the superfluous vendor driver matching.

Link: https://patch.msgid.link/20250704071107.14626-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-04 09:11:47 +02:00
Thorsten Blum
a48d994ca3 ALSA: hda: Remove old commented out sanity check
The sanity check has been commented out for more than 12 years since
commit d5657ec9f4 ("ALSA: hda - Disable the sanity check in
snd_hda_add_pincfg()") - remove it.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250703225238.308359-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-04 09:08:45 +02:00
Thorsten Blum
72a600a27f ALSA: mtpav: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead.

No functional changes intended.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250703134255.3948-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-04 09:04:41 +02:00
Thorsten Blum
043faef334 ALSA: ad1816a: Fix potential NULL pointer deref in snd_card_ad1816a_pnp()
Use pr_warn() instead of dev_warn() when 'pdev' is NULL to avoid a
potential NULL pointer dereference.

Cc: stable@vger.kernel.org
Fixes: 20869176d7 ("ALSA: ad1816a: Use standard print API")
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250703200616.304309-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-04 09:04:12 +02:00
Shengjiu Wang
baee26a9d6
ASoC: fsl_mqs: rename system manager indices for i.MX95
The system manager indices names are different for each platform, rename
the indices for i.MX95 to differentiate with other platform.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Link: https://patch.msgid.link/20250620055229.965942-3-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-03 12:59:59 +01:00
Shengjiu Wang
9931d2899e
ASoC: fsl_mqs: Distinguish different modules by system manager indices
On i.MX94, the MQS2 also needs to be configured by SCMI interface, add
sm_index variable in struct fsl_mqs_soc_data to distinguish the MQS1 and
MQS2 on this platform.

Add the system manager indices for i.MX94 in the header file.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Link: https://patch.msgid.link/20250620055229.965942-2-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-03 12:59:58 +01:00
Richard Fitzgerald
3b3312f28e
ASoC: cs35l56: probe() should fail if the device ID is not recognized
Return an error from driver probe if the DEVID read from the chip is not
one supported by this driver.

In cs35l56_hw_init() there is a check for valid DEVID, but the invalid
case was returning the value of ret. At this point in the code ret == 0
so the caller would think that cs35l56_hw_init() was successful.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 84851aa055 ("ASoC: cs35l56: Move part of cs35l56_init() to shared library")
Link: https://patch.msgid.link/20250703102521.54204-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-03 12:22:27 +01:00
Peter Ujfalusi
db98ee5685 ALSA: hda/realtek: Add quirk for ASUS ExpertBook B9403CVAR
ASUS ExpertBook B9403CVAR needs the ALC294_FIXUP_ASUS_HPE for the
headphones to work.

Closes: https://github.com/thesofproject/linux/issues/5472
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Tested-by: Anton Khirnov <anton@khirnov.net>
Link: https://patch.msgid.link/20250701133411.25275-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-02 16:28:36 +02:00
Thorsten Blum
30cd599619 ALSA: pcmtest: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead.

No functional changes intended.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250701120525.185831-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-07-02 16:27:49 +02:00
Mark Brown
b27a58ecdf
Add sound card support for QCS8275
Merge series from Prasad Kumpatla <quic_pkumpatl@quicinc.com>:

This patchset adds support for sound card on Qualcomm QCS8275 boards.
2025-07-02 14:38:08 +01:00
Simon Trimmer
f7690d0581
ASoC: Intel: sof_sdw: Add quirks for Lenovo P1 and P16
These Lenovo Laptops have the DMICs connected to the host instead of the
CS42L43 and so need the SOC_SDW_CODEC_MIC quirk.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/20250702112235.377479-1-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-02 12:29:09 +01:00
Prasad Kumpatla
34d340d48e
ASoC: qcom: sc8280xp: Add support for QCS8275
Add compatible for sound card on Qualcomm QCS8275 boards.

Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
Link: https://patch.msgid.link/20250701102915.4016108-3-quic_pkumpatl@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-02 11:26:22 +01:00
Venkata Prasad Potturu
0c0ef1d909
ASoC: amd: acp: Enable acp7.2 platform based DMIC support in machine driver
Enable acp7.2 platform based DMIC support in machine driver.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20250702094425.155185-4-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-02 11:26:15 +01:00
Venkata Prasad Potturu
3549725e0f
ASoC: amd: acp: Enable I2S support for acp7.2 based platforms
Enable I2S dai driver support for acp7.2 based platforms.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20250702094425.155185-3-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-02 11:26:14 +01:00
Venkata Prasad Potturu
a3b0e80428
ASoC: amd: acp: Add legacy driver support acp7.2 based platforms
Add pci revision id 0x72 in pci and platform driver to support
acp7.2 based platforms.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20250702094425.155185-2-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-07-02 11:26:13 +01:00
Greg Kroah-Hartman
e78f70bad2 time/timecounter: Fix the lie that struct cyclecounter is const
In both the read callback for struct cyclecounter, and in struct
timecounter, struct cyclecounter is declared as a const pointer.

Unfortunatly, a number of users of this pointer treat it as a non-const
pointer as it is burried in a larger structure that is heavily modified by
the callback function when accessed.  This lie had been hidden by the fact
that container_of() "casts away" a const attribute of a pointer without any
compiler warning happening at all.

Fix this all up by removing the const attribute in the needed places so
that everyone can see that the structure really isn't const, but can,
and is, modified by the users of it.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/2025070124-backyard-hurt-783a@gregkh
2025-07-01 15:38:25 +02:00
Mark Brown
c1d10f4c8e
ASoC: Add SDCA IRQ support and some misc fixups
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:

Add a maintainers entry for SDCA, do a couple of small fixups for
previous chains, and then adding the beginnings of the SDCA IRQ
handling. This is based around a regmap IRQ chip and a few helper
functions that can be called from the client drivers to setup the
IRQs.
2025-07-01 14:01:53 +01:00
Charles Keepax
b9ab3b6182
ASoC: SDCA: Add some initial IRQ handlers
Add basic IRQ handlers for the function status and jack detection
interrupts.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250624122844.2761627-8-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-30 16:04:18 +01:00
Maciej Strozek
b126394d9e
ASoC: SDCA: Generic interrupt support
Add a library supporting usage of SDCA interrupts, using regmap irq
framework. The library adds functions for parsing ACPI for
interrupt-related information, configuring irq chip and requesting
individual irqs. Calling code (SDCA function code) is expected to also
substitute the library's base irq handler for its own, appropriate
callback.

Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250624122844.2761627-7-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-30 16:04:17 +01:00
Charles Keepax
775f5729b4
ASoC: SDCA: Add flag for unused IRQs
Zero is a valid SDCA IRQ interrupt position so add a special value to
indicate that the IRQ is not used.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250624122844.2761627-6-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-30 16:04:16 +01:00
Charles Keepax
37d2aa6213
ASoC: SDCA: Minor selected/detected mode control fixups
Make the names a slightly better match for the specification and add
some constants for the values rather than hard coding.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250624122844.2761627-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-30 16:04:15 +01:00
Charles Keepax
b4515fd87c
ASoC: SDCA: Fixup some kernel doc errors
Correct some typos and omissions in the kernel doc for the ASoC SDCA
code.

Fixes: 2c8b3a8e6a ("ASoC: SDCA: Create DAPM widgets and routes from DisCo")
Reported-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250624122844.2761627-4-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-30 16:04:14 +01:00
Charles Keepax
2ed526bf04
ASoC: SDCA: Add missing default in switch in entity_pde_event()
The current code should be safe as the PDE widget only registers for the
two events handled in the switch statement. However, it is causing a
smatch warning and also is a little fragile to future code changes, add
a default case to avoid the warning and make the code more robust.

Fixes: 2c8b3a8e6a ("ASoC: SDCA: Create DAPM widgets and routes from DisCo")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250624122844.2761627-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-30 16:04:13 +01:00
Thorsten Blum
66b338d006 ALSA: dummy: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead.

No functional changes intended.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250630110945.2225-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-30 14:08:32 +02:00
Thorsten Blum
24ffcf7f27 ALSA: hrtimer: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead.

No functional changes intended.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250630105723.1703-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-30 14:08:07 +02:00
Thorsten Blum
90c8c31e19 ALSA: timer: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead.

No functional changes intended.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250630105420.1448-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-30 14:07:42 +02:00
Alexander Tsoy
05f254a636 ALSA: usb-audio: Improve filtering of sample rates on Focusrite devices
Previously we were filtering out only upper unsupported sampling rates.
This patch adds filtering of the lower unsupported sampling rates. As a
result there is 1:1 mapping between altsetting and supported rates.

The issue was found on a Scarlett 3rd Gen card (see linked bug), but the
same filtering is likely needed for the Scarlett 1st and 2nd Gen as well
as the older Clarett cards which lacks Valid Alternate Setting Control.

Patch was not tested on a real hardware.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=214493
Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
Link: https://patch.msgid.link/20250630013357.1327420-1-alexander@tsoy.me
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-30 09:11:39 +02:00
Weidong Wang
29ddce17e9
ASoC: codecs: Add calibration function to aw88399 chip
Add calibration functionality to the aw88399 chip.
When the chip is in calibration condition, calibration
can be achieved by configuring the chip's internal DSP
and save the calibration values in cali_re.

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
Link: https://patch.msgid.link/20250627110306.23488-1-wangweidong.a@awinic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-29 22:12:12 +01:00
Charles Keepax
a7528e9bea
ASoC: Intel: soc-acpi: arl: Correct order of cs42l43 matches
Matches should go from more specific to less specific, correct the
ordering of two cs42l43 entries.

Fixes: c052406765 ("ASoC: Intel: soc-acpi: arl: Add match entries for new cs42l43 laptops")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250626141841.77780-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-29 22:10:28 +01:00
Arun Raghavan
dc78f7e591
ASoC: fsl_sai: Force a software reset when starting in consumer mode
On an imx8mm platform with an external clock provider, when running the
receiver (arecord) and triggering an xrun with xrun_injection, we see a
channel swap/offset. This happens sometimes when running only the
receiver, but occurs reliably if a transmitter (aplay) is also
concurrently running.

It seems that the SAI loses track of frame sync during the trigger stop
-> trigger start cycle that occurs during an xrun. Doing just a FIFO
reset in this case does not suffice, and only a software reset seems to
get it back on track.

This looks like the same h/w bug that is already handled for the
producer case, so we now do the reset unconditionally on config disable.

Signed-off-by: Arun Raghavan <arun@asymptotic.io>
Reported-by: Pieterjan Camerlynck <p.camerlynck@televic.com>
Fixes: 3e3f8bd569 ("ASoC: fsl_sai: fix no frame clk in master mode")
Cc: stable@vger.kernel.org
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://patch.msgid.link/20250626130858.163825-1-arun@arunraghavan.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-29 22:10:26 +01:00
Bard Liao
960aed31ee
ASoC: Intel: SND_SOC_INTEL_SOF_BOARD_HELPERS select SND_SOC_ACPI_INTEL_MATCH
The helpers that are provided by SND_SOC_ACPI_INTEL_MATCH
(soc-acpi-intel-ssp-common) are used in SND_SOC_INTEL_SOF_BOARD_HELPERS
(sof_board_helpers).
SND_SOC_ACPI_INTEL_MATCH is selected by machine drivers. When
skl_hda_dsp_generic uses the board helpers, it select
SND_SOC_INTEL_SOF_BOARD_HELPERS only but not SND_SOC_ACPI_INTEL_MATCH
which initroduce the undefined symbol errors. However, it makes more
sense that SND_SOC_INTEL_SOF_BOARD_HELPERS select
SND_SOC_ACPI_INTEL_MATCH itself.

Fixes: b28b23dea3 ("ASoC: Intel: skl_hda_dsp_generic: use common module for DAI links")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506141543.dN0JJyZC-lkp@intel.com/
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://patch.msgid.link/20250626064420.450334-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-29 22:10:25 +01:00
Shengjiu Wang
cbe8761216
ASoC: fsl_asrc: use internal measured ratio for non-ideal ratio mode
When USRC=0, there is underrun issue for the non-ideal ratio mode;
according to the reference mannual, the internal measured ratio can be
used with USRC=1 and IDRC=0.

Fixes: d0250cf4f2 ("ASoC: fsl_asrc: Add an option to select internal ratio mode")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://patch.msgid.link/20250625020504.2728161-1-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-29 22:10:24 +01:00
Edip Hazuri
ce174b48ae ALSA: hda/realtek - Add mute LED support for HP Victus 15-fb2xxx
The mute led on this laptop is using ALC245 but requires a quirk to work
This patch enables the existing quirk for the device.

Tested on my friend's Victus 15-fb2xxx Laptop. The LED behaviour works
as intended.

Cc: <stable@vger.kernel.org>
Signed-off-by: Edip Hazuri <edip@medip.dev>
Link: https://patch.msgid.link/20250627203415.56785-2-edip@medip.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-29 11:17:02 +02:00
Daniel Dadap
e0a911ac86 ALSA: hda: Add missing NVIDIA HDA codec IDs
Add codec IDs for several NVIDIA products with HDA controllers to the
snd_hda_id_hdmi[] patch table.

Signed-off-by: Daniel Dadap <ddadap@nvidia.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/aF24rqwMKFWoHu12@ddadap-lakeline.nvidia.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-29 11:16:29 +02:00
Salvatore Bonaccorso
7ab6847a03 ALSA: hda/realtek: Fix built-in mic on ASUS VivoBook X507UAR
The built-in mic of ASUS VivoBook X507UAR is broken recently by the fix
of the pin sort. The fixup ALC256_FIXUP_ASUS_MIC_NO_PRESENCE is working
for addressing the regression, too.

Fixes: 3b4309546b ("ALSA: hda: Fix headset detection failure due to unstable sort")
Reported-by: Igor Tamara <igor.tamara@gmail.com>
Closes: https://bugs.debian.org/1108069
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Link: https://lore.kernel.org/CADdHDco7_o=4h_epjEAb92Dj-vUz_PoTC2-W9g5ncT2E0NzfeQ@mail.gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-26 08:02:44 +02:00
Takashi Iwai
346bd8a977 ASoC: Fixes for v6.16
A small collection of fixes, the main one being a fix for resume from
 hibernation on AMD systems, plus a few new quirk entries for AMD
 systems.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmhcREYACgkQJNaLcl1U
 h9BAQgf/aFcfxXvHtTgX1B45bFC8KiztVWvpxRpdAAss+ugAt/zvaVnlt7xisgrV
 m3+NNL4s0c7b4EGpb3oyNkW6CyYQepusXaBqmoJtzFVPVE6Z3PvD1yDtEB8HuOiX
 tceZGjuBZ6lDY8kMKgWjBkORuMJ/n4IikV//Gj28FXn6WB2l/3/S0R2sNWwbPoH8
 61Y9mLnPiBX633BpjTtBzriv0ePZ/+k+19RXGqQ4cy2ZnGgMRI/oBJua+DcCdB9I
 ZKQXrTDUJ5y+645ImMGFKyj9qDeC3xhwlk9DMpqiMBNEpS+rKCrXQchwUBFtr2NP
 GIZfjqXNXa3Z1cLItv2zmJ7vkuhGqw==
 =v8PL
 -----END PGP SIGNATURE-----

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

ASoC: Fixes for v6.16

A small collection of fixes, the main one being a fix for resume from
hibernation on AMD systems, plus a few new quirk entries for AMD
systems.
2025-06-26 07:59:33 +02:00
Mark Brown
086d0960d8
ASoC: sdw_utils: generate combined spk components
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

The series adds support for combined speaker components with one "spk:"
tag in the card->components string. This is a UCM request.
2025-06-25 17:23:15 +01:00
Mark Brown
51c18d4d88
ASoC: Standardize ASoC menu
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu, like below

	--- ALSA for SoC audio support
	      Analog Devices  --->
	      AMD  --->
	      Apple  --->
	      Atmel  --->
	      Au1x  ----
	      Broadcom  --->
	      Cirrus Logic  --->
	      DesignWare  --->
	      Freescale  --->
	      Google  --->
	      Hisilicon  --->
	      ...

One concern is *vender folder* alphabetical order vs *vender name*
alphabetical order were different. For example "sunxi" menu is
"Allwinner".

Link: https://lore.kernel.org/r/8734c8bf3l.wl-kuninori.morimoto.gx@renesas.com
2025-06-25 16:27:47 +01:00
Mark Brown
b28ecd8606
Add SoundWire machines for ACP7.0/ACP7.1 sof stack
Merge series from Vijendar Mukunda <Vijendar.Mukunda@amd.com>:

Add SoundWire machines as alternate machines for ACP7.0 & ACP7.1
platforms with the below machine configuration.
Link 0: RT722 codec with three endpoints: Headset, Speaker, and DMIC.
2025-06-25 15:36:29 +01:00
Mark Brown
9d330278c9
ASoC: codecs: wcd93xx: Drop enums for chipid values
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Minor cleanup while preparing for adding WCD9378 support: do not use
enum for values which are not an enumeration.
2025-06-25 15:36:25 +01:00
Bard Liao
0f60ecffbf
ASoC: sdw_utils: generate combined spk components string
The suggestion from UCM for 2 speaker components is using 1 "spk" tag
with 2 component names. Like "spk:rt722+rt1320". The commit removes the
creation of the "spk" components in each rtd_init callback and creat the
string in asoc_sdw_rtd_init().

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20250625140430.311865-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-25 15:13:46 +01:00
Bard Liao
f792733e08
ASoC: sdw_utils: add component_name string to dai_info
Currently the sdw machine driver uses different way to get the
component name from the DAI name for different codecs in the rtd_init
callback. It means that we need to rely on the rtd_init callback to get
the component name. Add an optional component string to the
asoc_sdw_dai_info struct allows the machine driver to get the component
name directly.
The commit adds the component names for the AMP dais for the preparation
to set card->components string for combined speaker configs.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20250625140430.311865-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-25 15:13:45 +01:00
Pei Xiao
5e9571750c ALSA: usb: qcom: fix NULL pointer dereference in qmi_stop_session
The find_substream() call may return NULL, but the error path
dereferenced 'subs' unconditionally via dev_err(&subs->dev->dev, ...),
causing a NULL pointer dereference when subs is NULL.

Fix by switching to &uadev[idx].udev->dev which is always valid
in this context.

Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
Link: https://patch.msgid.link/86ac2939273ac853535049e60391c09d7688714e.1750755508.git.xiaopei01@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-25 08:28:16 +02:00
Tamura Dai
6c038b58a2
ASoC: SOF: Intel: hda: Use devm_kstrdup() to avoid memleak.
sof_pdata->tplg_filename can have address allocated by kstrdup()
and can be overwritten. Memory leak was detected with kmemleak:

unreferenced object 0xffff88812391ff60 (size 16):
  comm "kworker/4:1", pid 161, jiffies 4294802931
  hex dump (first 16 bytes):
    73 6f 66 2d 68 64 61 2d 67 65 6e 65 72 69 63 00  sof-hda-generic.
  backtrace (crc 4bf1675c):
    __kmalloc_node_track_caller_noprof+0x49c/0x6b0
    kstrdup+0x46/0xc0
    hda_machine_select.cold+0x1de/0x12cf [snd_sof_intel_hda_generic]
    sof_init_environment+0x16f/0xb50 [snd_sof]
    sof_probe_continue+0x45/0x7c0 [snd_sof]
    sof_probe_work+0x1e/0x40 [snd_sof]
    process_one_work+0x894/0x14b0
    worker_thread+0x5e5/0xfb0
    kthread+0x39d/0x760
    ret_from_fork+0x31/0x70
    ret_from_fork_asm+0x1a/0x30

Signed-off-by: Tamura Dai <kirinode0@gmail.com>
Link: https://patch.msgid.link/20250615235548.8591-1-kirinode0@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 16:39:42 +01:00
Jack Yu
ff21a6ec0f
ASoC: rt721-sdca: fix boost gain calculation error
Fix the boost gain calculation error in rt721_sdca_set_gain_get.
This patch is specific for "FU33 Boost Volume".

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://patch.msgid.link/1b18fcde41c64d6fa85451d523c0434a@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 13:55:18 +01:00
Harshit Mogalapalli
b272f42547 ALSA: qc_audio_offload: Fix missing error code in prepare_qmi_response()
When snd_soc_usb_find_priv_data() fails, return failure instead of
success. While we are at it also use direct returns at first few error
paths where there is no additional cleanup needed.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/Z_40qL4JnyjR4j0O@stanley.mountain/
Fixes: 326bbc3482 ("ALSA: usb-audio: qcom: Introduce QC USB SND offloading support")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://patch.msgid.link/20250623142639.2938056-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-24 10:11:02 +02:00
Kuninori Morimoto
68fbc70ece
ASoC: hisilicon: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87ldpxybq9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:43 +01:00
Kuninori Morimoto
ac131c4148
ASoC: uniphier: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Link: https://patch.msgid.link/87msadybqf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:42 +01:00
Kuninori Morimoto
acc317e525
ASoC: starfive: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87o6utybqk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:41 +01:00
Kuninori Morimoto
cae3cc435d
ASoC: rockchip: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87plf9ybqp.wl-kuninori.morimoto.gx@renesas.com
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:40 +01:00
Kuninori Morimoto
05016f7e48
ASoC: mediatek: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://patch.msgid.link/87qzzpybqu.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:40 +01:00
Kuninori Morimoto
9c0169922d
ASoC: loongson: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87sek5ybr0.wl-kuninori.morimoto.gx@renesas.com
Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:39 +01:00
Kuninori Morimoto
9fad9eb037
ASoC: kirkwood: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87tt4lybr6.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:38 +01:00
Kuninori Morimoto
0fa7adb638
ASoC: samsung: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87v7p1ybrb.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:37 +01:00
Kuninori Morimoto
acc84d15e4
ASoC: generic: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87wm9hybrf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:36 +01:00
Kuninori Morimoto
a549459a05
ASoC: renesas: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87y0txybrk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:35 +01:00
Kuninori Morimoto
41d88bb754
ASoC: xtensa: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87zfedybrp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:34 +01:00
Kuninori Morimoto
69fa5909b3
ASoC: xilinx: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/871prpzqca.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:33 +01:00
Kuninori Morimoto
099ae845c6
ASoC: jz4740: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/8734c5zqcg.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:32 +01:00
Kuninori Morimoto
c6ddacab37
ASoC: google: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/874iwlzqck.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:31 +01:00
Kuninori Morimoto
8a40e95a13
ASoC: cirrus: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Link: https://patch.msgid.link/875xh1zqcp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:30 +01:00
Kuninori Morimoto
5b8b93e695
ASoC: ux500: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/877c1hzqcv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:29 +01:00
Kuninori Morimoto
41b94a6f2d
ASoC: tegra: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://patch.msgid.link/878qlxzqd0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:28 +01:00
Kuninori Morimoto
c0262c187a
ASoC: sunxi: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Link: https://patch.msgid.link/87a56dzqd4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:27 +01:00
Kuninori Morimoto
7798775a03
ASoC: spear: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87bjqtzqd9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:27 +01:00
Kuninori Morimoto
c153c508e5
ASoC: intel: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87cyb9zqde.wl-kuninori.morimoto.gx@renesas.com
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:26 +01:00
Kuninori Morimoto
4f30f84feb
ASoC: atmel: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87ecvpzqdi.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:25 +01:00
Kuninori Morimoto
68a8fd461a
ASoC: apple: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87frg5zqdo.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:24 +01:00
Kuninori Morimoto
58e490935f
ASoC: meson: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87h60lzqds.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:23 +01:00
Kuninori Morimoto
8ada023e99
ASoC: qcom: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87ikl1zqdx.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:22 +01:00
Kuninori Morimoto
1d9ac30a8d
ASoC: sprd: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87jz5hzqe1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:21 +01:00
Kuninori Morimoto
36e6420440
ASoC: sdca: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87ldpxzqe5.wl-kuninori.morimoto.gx@renesas.com
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:20 +01:00
Kuninori Morimoto
335c898312
ASoC: au1x: Standardize ASoC menu
use "ASoC support for xxxx" menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87msadzqea.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:19 +01:00
Kuninori Morimoto
3b2a8a3c57
ASoC: sof: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87o6utzqef.wl-kuninori.morimoto.gx@renesas.com
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:18 +01:00
Kuninori Morimoto
53696514d7
ASoC: stm: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87plf9zqek.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:17 +01:00
Kuninori Morimoto
afd1bff53b
ASoC: sti: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87qzzpzqep.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:16 +01:00
Kuninori Morimoto
bcd02da372
ASoC: pxa: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87sek5zqeu.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:15 +01:00
Kuninori Morimoto
01f7d179a7
ASoC: mxs: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87tt4lzqez.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:15 +01:00
Kuninori Morimoto
b13f7eef9f
ASoC: img: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87v7p1zqf4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:14 +01:00
Kuninori Morimoto
71951375b0
ASoC: fsl: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87wm9hzqf9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:13 +01:00
Kuninori Morimoto
bb0b882052
ASoC: dwc: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87y0txzqfe.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:12 +01:00
Kuninori Morimoto
da65de5415
ASoC: bcm: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87zfedzqfj.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:11 +01:00
Kuninori Morimoto
6895deb5f2
ASoC: amd: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/871prp20t3.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:10 +01:00
Kuninori Morimoto
652dd81c7a
ASoC: adi: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/8734c520t9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:09 +01:00
Kuninori Morimoto
6469fb5c8b
ASoC: ti: Standardize ASoC menu
Current Kconfig menu at [ALSA for SoC audio support] has no rules.
So, some venders are using menu style, some venders are listed each drivers
on top page, etc. It is difficult to find target vender and/or drivers
because it is very random.

Let's standardize ASoC menu

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/874iwl20th.wl-kuninori.morimoto.gx@renesas.com
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-24 01:01:08 +01:00
Shengjiu Wang
17cc308b18
ASoC: wm8524: enable constraints when sysclk is configured.
In some cases, the sysclk won't be configured on init, and sysclk can be
changed in hw_params() according to different sample rate, for example,
for 44kHz sample rate, the sysclk is 11.2896MHz, for 48kHz sample rate,
the sysclk is 12.288MHz.

In order to support the above case, only enable constraints when sysclk
is configured, and check the rate in hw_params.

So overall there are three cases that need to be considered:
- call set_sysclk() on init, then constraints will be initialized.
- don't call set_sysclk() on init, but call it after startup(), then
  constraints will be configured, the constraints can be cleared with
  call set_sysclk() again in shutdown().
- don't call set_sysclk() in the whole flow, then there are no any
  constraints. The clocks depend on cpu dai.

Enlarge the WM8524_NUM_RATES to 12, as the supported rate range is 8kHz
to 192kHz.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250620021403.624303-1-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-23 17:12:54 +01:00
Takashi Iwai
5f7e54b23e ALSA: hda: Handle the jack polling always via a work
We used to call directly hda_jackpoll_work() from a couple of places
for updating the jack and notify to user-space, but this makes rather
the code flow fragile.  Namely, because of those direct calls,
hda_jackpoll_work() uses snd_hda_power_up_pm() and *_down_pm() calls
instead of the standard snd_hda_power_up() and *_down() calls.  The
latter pair assures the runtime PM resume sync, so it can avoid the
race against the PM callbacks gracefully, while the former pair may
continue if called concurrently, hence it may race (by design).

In this patch, we change the call pattern of hda_jackpoll_work(); now
all callers are replaced with the standard snd_hda_jack_report_sync()
and the additional schedule_delayed_work().

Since hda_jackpoll_work() is called only from the associated work,
it's always outside the PM code path, and we can safely use
snd_hda_power_up() and *_down() there instead.  This allows us to
remove the racy check of power-state in hda_jackpoll_work(), as well
as the tricky cancel_delayed_work() and rescheduling at
hda_codec_runtime_suspend().

Reported-by: Joakim Zhang <joakim.zhang@cixtech.com>
Closes: https://lore.kernel.org/20250619020844.2974160-1-joakim.zhang@cixtech.com
Tested-by: Joakim Zhang <joakim.zhang@cixtech.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250623131437.10670-4-tiwai@suse.de
2025-06-23 17:21:16 +02:00
Takashi Iwai
507cd1216a ALSA: hda: Disable codec runtime PM when jack polling is enabled
When the jack polling is triggered quite frequently, it makes little
sense to perform the runtime PM at each time; since we do almost full
configuration at each runtime resume for HD-audio, the merit by power
saving would be lost.  Hence, it'd be more reasonable to disable the
runtime PM when the jack polling is enabled.

This patch introduces the runtime PM idle callback and disables the
runtime PM when the jack polling is enabled.  This also serves as the
preliminary change for the further jack poll cleanup.

The exception is the case where codec->bus->jackpoll_in_suspend flag
is set by the driver (currently set by HD-audio Tegra driver).  This
flag indicates that the polling is infrequent, hence there is still
benefit to perform the runtime PM.  The idle callback checks this flag
and allows the runtime PM when set.

Link: https://lore.kernel.org/20250619020844.2974160-1-joakim.zhang@cixtech.com
Tested-by: Joakim Zhang <joakim.zhang@cixtech.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250623131437.10670-3-tiwai@suse.de
2025-06-23 17:21:16 +02:00
Takashi Iwai
1adcbdf54f ALSA: hda: Disable jack polling at shutdown
Although the jack polling is canceled at shutdown in
snd_hda_codec_shutdown(), it might be still re-triggered when the work
is being processed at cancel_delayed_work_sync() call.  This may
result in the unexpected hardware access that should have been already
disabled.

For assuring to stop the jack polling, clear codec->jackpoll_interval
at shutdown.

Reported-by: Joakim Zhang <joakim.zhang@cixtech.com>
Closes: https://lore.kernel.org/20250619020844.2974160-4-joakim.zhang@cixtech.com
Tested-by: Joakim Zhang <joakim.zhang@cixtech.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250623131437.10670-2-tiwai@suse.de
2025-06-23 17:21:16 +02:00
Takashi Iwai
41c66461cb ALSA: hda/realtek: Add mic-mute LED setup for ASUS UM5606
ASUS UM5606* models use the quirk to set up the bass speakers, but it
missed the mic-mute LED configuration.  Other similar models have the
AMD ACP dmic, and the mic-mute is set up for that, but those models
don't have AMD ACP but rather built-in mics of Realtek codec, hence
the Realtek driver should set it up, instead.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=220125
Link: https://patch.msgid.link/20250623151841.28810-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-23 17:20:49 +02:00
Thorsten Blum
d536352204 ALSA: mixer_oss: Remove deprecated strcpy() function calls
Remove the deprecated strcpy() function calls and assign the strings
directly to a 'char *' instead.

Use 'if/else if' instead of two separate if statements.

No functional changes intended.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250623113855.37031-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-23 17:10:32 +02:00
Youngjun Lee
fb4e2a6e8f ALSA: usb-audio: Fix out-of-bounds read in snd_usb_get_audioformat_uac3()
In snd_usb_get_audioformat_uac3(), the length value returned from
snd_usb_ctl_msg() is used directly for memory allocation without
validation. This length is controlled by the USB device.

The allocated buffer is cast to a uac3_cluster_header_descriptor
and its fields are accessed without verifying that the buffer
is large enough. If the device returns a smaller than expected
length, this leads to an out-of-bounds read.

Add a length check to ensure the buffer is large enough for
uac3_cluster_header_descriptor.

Signed-off-by: Youngjun Lee <yjjuny.lee@samsung.com>
Fixes: 9a2fe9b801 ("ALSA: usb: initial USB Audio Device Class 3.0 support")
Link: https://patch.msgid.link/20250623-uac3-oob-fix-v1-1-527303eaf40a@samsung.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-23 17:08:56 +02:00
Chris Chiu
9a07ca9a40 ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook 6 G1a
HP EliteBook 6 G1a laptops use ALC236 codec and need the fixup
ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF to make the mic/micmute LEDs
work.

Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Link: https://patch.msgid.link/20250623063023.374920-1-chris.chiu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-23 17:07:26 +02:00
Vijendar Mukunda
dc6458ed95
ASoC: amd: ps: fix for soundwire failures during hibernation exit sequence
During the hibernate entry sequence, ACP registers will be reset to
default values and acp ip will be completely powered off including acp
SoundWire pads. During resume sequence, if acp SoundWire pad keeper enable
register is not restored along with pad pulldown control register value,
then SoundWire manager links won't be powered on correctly results in
peripheral register access failures and completely audio function is
broken.

Add code to store the acp SoundWire pad keeper enable register and acp pad
pulldown ctrl register values before entering into suspend state and
restore the register values during resume sequence based on condition check
for acp SoundWire pad keeper enable register for ACP6.3, ACP7.0 & ACP7.1
platforms.

Fixes: 4916283880 ("ASoC: amd: ps: add callback functions for acp pci driver pm ops")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250623084630.3100279-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-23 14:20:29 +01:00
Vijendar Mukunda
59566923d9
ASoC: SOF: amd: add alternate machines for ACP7.0 and ACP7.1 platforms
Add SoundWire machines as alternate machines for ACP7.0 and ACP7.1
platforms.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250620120942.1168827-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-23 13:12:15 +01:00
Vijendar Mukunda
8b04b76671
ASoC: amd: acp: add soundwire machine for ACP7.0 and ACP7.1 sof stack
Add SoundWire machine with RT722 multi functional codec support for ACP7.0
and ACP7.1 platforms at sdw link0 for sof stack.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250620120942.1168827-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-23 13:12:14 +01:00
Mark Brown
c4ca928a6d
ASoC: hdac_hdmi: Rate limit logging on connection and disconnection
We currently log parse failures for ELD data and some disconnection events
as errors without rate limiting. These log messages can be triggered very
frequently in some situations, especially ELD parsing when there is nothing
connected to a HDMI port which will generate:

hdmi-audio-codec hdmi-audio-codec.1.auto: HDMI: Unknown ELD version 0

While there's doubtless work that could be done on reducing the number of
connection notification callbacks it's possible these may be legitimately
generated by poor quality physical connections so let's use rate limiting
to mitigate the log spam for the parse errors and lower the severity for
disconnect logging to debug level.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20250613-asoc-hdmi-eld-logging-v1-1-76d64154d969@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-23 00:26:54 +01:00
Shuming Fan
ac558015df
ASoC: SDCA: add a HID device for HIDE entity
This patch supports to add a HID device for SDCA HIDE entity.
The codec driver could call 'hid_input_report' to report events.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250616114929.855496-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-23 00:26:53 +01:00
Krzysztof Kozlowski
a48352921f
ASoC: codecs: wcd939x: Add defines for major/minor version decoding
Replace hard-coded register values with defines for checking major and
minor versions of device.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250616-asoc-wcd93xx-enum-v1-4-a20a1b538509@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-23 00:26:41 +01:00
Krzysztof Kozlowski
5d3ccd356e
ASoC: codecs: wcd939x: Use simple defines for chipid register value
The value used to identify chip variant is not an enumeration, but raw
value used to compare registers with.  The 'enum' is not used in the
code at all, so simplify and make it a raw hex value define, so
intention will be explicit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250616-asoc-wcd93xx-enum-v1-3-a20a1b538509@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-23 00:26:40 +01:00
Krzysztof Kozlowski
100877df34
ASoC: codecs: wcd938x: Use simple defines for chipid register value
The value used to identify chip variant is not an enumeration, but raw
value used to compare registers with.  The 'enum' is not used in the
code at all, so simplify and make it a raw hex value define, so
intention will be explicit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250616-asoc-wcd93xx-enum-v1-2-a20a1b538509@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-23 00:26:39 +01:00
Krzysztof Kozlowski
2f6ff1e615
ASoC: codecs: wcd937x: Use simple defines for chipid register value
The value used to identify chip variant is not an enumeration, but raw
value used to compare registers with.  The 'enum' is not used in the
code at all, so simplify and make it a raw hex value define, so
intention will be explicit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250616-asoc-wcd93xx-enum-v1-1-a20a1b538509@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-23 00:26:38 +01:00
Oliver Schramm
bf39286adc
ASoC: amd: yc: Add DMI quirk for Lenovo IdeaPad Slim 5 15
It's smaller brother has already received the patch to enable the microphone,
now add it too to the DMI quirk table.

Cc: stable@vger.kernel.org
Signed-off-by: Oliver Schramm <oliver.schramm97@gmail.com>
Link: https://patch.msgid.link/20250621223000.11817-2-oliver.schramm97@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-23 00:26:27 +01:00
Yuzuru10
7186b81807
ASoC: amd: yc: add quirk for Acer Nitro ANV15-41 internal mic
This patch adds DMI-based quirk for the Acer Nitro ANV15-41,
allowing the internal microphone to be detected correctly on
machines with "RB" as board vendor.

Signed-off-by: Yuzuru <yuzuru_10@proton.me>
Link: https://patch.msgid.link/20250622225754.20856-1-yuzuru_10@proton.me
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-23 00:26:26 +01:00
Luca Weiss
999fb9d51f
ASoC: qcom: sm8250: Fix possibly undefined reference
With CONFIG_SND_SOC_SM8250=y and CONFIG_SND_SOC_QCOM_OFFLOAD_UTILS=m
selected in kconfig, the build will fail due to trying to link against a
symbol only found in the module.

  aarch64-linux-gnu-ld: sound/soc/qcom/sm8250.o: in function `sm8250_snd_exit':
  sound/soc/qcom/sm8250.c:52:(.text+0x210): undefined reference to `qcom_snd_usb_offload_jack_remove'

Fix this by declaring the dependency that forces CONFIG_SND_SOC_SM8250=m
when CONFIG_SND_SOC_QCOM_OFFLOAD_UTILS is =m.

Reported-by: Matthew Croughan <matthew.croughan@nix.how>
Fixes: 1b8d0d87b9 ("ASoC: qcom: qdsp6: Add headphone jack for offload connection status")
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://patch.msgid.link/20250617-snd-sm8250-dep-fix-v1-1-879af8906ec4@fairphone.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-23 00:26:25 +01:00
Yasmin Fitzgerald
68cc9d3c8e ALSA: hda/realtek - Enable mute LED on HP Pavilion Laptop 15-eg100
The HP Pavilion Laptop 15-eg100 has Realtek HDA codec ALC287.
It needs the ALC287_FIXUP_HP_GPIO_LED quirk to enable the mute LED.

Signed-off-by: Yasmin Fitzgerald <sunoflife1.git@gmail.com>
Link: https://patch.msgid.link/20250621053832.52950-1-sunoflife1.git@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-22 11:31:28 +02:00
Alok Tiwari
87aafc8580 ALSA: intel8x0: Fix incorrect codec index usage in mixer for ICH4
code mistakenly used a hardcoded index (codec[1]) instead of
iterating, over the codec array using the loop variable i.
Use codec[i] instead of codec[1] to match the loop iteration.

Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Link: https://patch.msgid.link/20250621185233.4081094-1-alok.a.tiwari@oracle.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-22 11:28:12 +02:00
Tim Crawford
e41687b511 ALSA: hda/realtek: Add quirks for some Clevo laptops
Add audio quirks to fix speaker output and headset detection on the
following Clevo models:

- V350ENC
- V350WNPQ
- V540TU
- X560WNR
- X580WNS

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Link: https://patch.msgid.link/20250620204329.35878-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-22 11:24:43 +02:00
Shuming Fan
13ef21dffe
ASoC: SDCA: add support for HIDE entity properties and HID descriptor/report
Add support for parsing the HIDE entity descriptor and HID descriptor/report

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250616114820.855401-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-20 11:52:05 +01:00
Mark Brown
f186a1a985
ASoC: SOF: ipc4-pcm: Harmonize set pipeline state dbg
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

The series harmonizes the debug prints for pipeline state changes.

Currently we only print readable state change for single pipeline
changes but when multiple pipeline's state is changed, it is omitted.

Use human readable information in both cases in a harmonized way to aid
debugging.
2025-06-20 11:33:05 +01:00
Mark Brown
07651feeee
ASoC: SOF: ipc4/Intel: Support for partial context
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

The firmware will be able to only save and restore the context related to
library management.
This means that even without a full context save, the libraries do not
need to be re-loaded to the firmware after second or consecutive boots.

This is reported via the FW_READY notification, where BIT(15) indicates:
0 - the library restore is not done
1 - library restore is done

This bit is only valid if full context save is not enabled, full context
save is by definition saves and restores the library related book-keeping
as well.

Add a new flag to tell the platform code if the libraries have been
restored, no need to reload them after boot.
2025-06-20 11:33:01 +01:00
Mark Brown
820e04cb8c
ASoC: core/topology/Intel:
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

There are devices where the iDisp HDA codec for HDMI is disconnected
and it is not present on the HDA bus.
This usually happens on systems with dGPU, but not limited to them.

How SOF tried to deal with this is to drop in a dummy codec in place of
the iDisp to allow the topology to be loaded, but these PCM devices are
unusable, they fail when user tries to use them.
PA/PW is probing the PCM devices on probe and that causes the kernel log
to fill up with errors, which is harmless but disturbing.

This series will use the filter function to prevent the creation of the
HDMI PCM devices in the first place (like HDA legacy stack will not
present HDMI devices if the codec is not visible).
The topology still loads, we still use dummy codec to satisfy it, but
there will be no dummy PCM devices created.

The first two patch handles the same issue that was discovered by the
ignored link: a NULL dereference.
I'm not sure if both is needed, but I felt that fixing it in one place
and leaving the other open might not be future proof.
If I would to pick one, I would likely go with the patch for the
soc-core.
2025-06-20 11:32:57 +01:00
Thorsten Blum
962297a7cd ALSA: aloop: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead.

No functional changes intended.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250618223844.1458-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-20 10:06:27 +02:00
Edson Juliano Drosdeck
33bdee1282 ALSA: hda/realtek: Enable headset Mic on Positivo P15X
Positivo P15X is equipped with ALC269VC, and needs a fix to make
the headset mic to work.
Also must to limits the internal microphone boost.

Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
Link: https://patch.msgid.link/20250619191215.17203-1-edson.drosdeck@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-20 10:05:46 +02:00
Thorsten Blum
bec7ac4700 ALSA: emu10k1: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead.

No functional changes intended.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250619174057.175676-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-20 10:03:31 +02:00
wangdicheng
bb0d147c9c ALSA: hda/realtek: Fixup ft alc257 rename alc3328
Audio ALC3328 recognized as ALC257, updated PCI ID 0x10EC12F0 to
rename it to 3328.

Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Link: https://patch.msgid.link/20250619071745.149299-1-wangdich9700@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-20 10:03:31 +02:00
Takashi Iwai
7213851924 ASoC: Fixes for v6.16
A relatively large collection of fixes and updates that came in since
 the merge window.  Of note are a couple of Cirrus ones which change the
 firmware naming for some newly added devices, and a fix from Laurentiu
 for issues booting firmwares on the DSPs on i.MX8 SoCs.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmhUnx0ACgkQJNaLcl1U
 h9DKOAf/a73xsodyviWnmovKP9wMXbgQB0u7ubMDdkJm7HX91UEfIeh2kmfRhJtL
 Hc/C0gHjOK15s+TgFR4zuO5Oeb63Ok+nY+YF7TlFQ0OPR/BvAIALpQUwlW/EgVgC
 l+O9HJBysjNBtVf2aQTRvbs59kpoV1q31Ys5pGRN0nrUAvnrtosMtO3Py8UyS4Oy
 4XcMUxnu67+8LVinOXV2X8lmztCm2dsX2Z9pnsxvncCFkxWJpDcr0EhUo24LOR1E
 vDl7rAuI6fetUU8kHM7Noe7nyxa/4yiL6i5W/LWAfpCZiBkEdNU4WOVPRjBqXcY2
 GfRYJkEbi7JoWWhMhdmLxYnobFKCiA==
 =RZgv
 -----END PGP SIGNATURE-----

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

ASoC: Fixes for v6.16

A relatively large collection of fixes and updates that came in since
the merge window.  Of note are a couple of Cirrus ones which change the
firmware naming for some newly added devices, and a fix from Laurentiu
for issues booting firmwares on the DSPs on i.MX8 SoCs.
2025-06-20 09:58:57 +02:00
Peter Ujfalusi
a1d203d390
ASoC: SOF: ipc4-pcm: Enable delay reporting for ChainDMA streams
All streams (currently) which is configured to use ChainDMA can only work
on Link/host DMA pairs where the link side position can be access via host
registers (like HDA on CAVS 2.5 platforms).

Since the firmware does not provide time_info for ChainDMA, unlike for HDA
stream, the kernel should calculate the start and end offsets that is
needed for the delay calculation.

With this small change we can report accurate delays when the stream is
configured to use ChainDMA.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20250619102848.12389-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-20 00:21:19 +01:00
Peter Ujfalusi
ce4b269c26
ASoC: SOF: Intel: hda: Do not probe Soundwire in nocodec mode
Soundwire is not needed for nocodec mode, skip probing it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://patch.msgid.link/20250619102548.11928-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-20 00:21:18 +01:00
Seppo Ingalsuo
f9c7c09379
ASoC: SOF: ipc4-topology: Add load of ASRC component
This patch adds to IPC4 topology parsing the support for the
asynchronous sample rate converter (ASRC) SOF component. It
is applied for the DAPM widget type SND_SOC_TPLG_DAPM_ASRC.

The parsed SOF tokens for ASRC are SOF_TKN_ASRC_RATE_OUT and
SOF_TKN_ASRC_OPERATION_MODE.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250619104735.26161-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-20 00:21:17 +01:00
Peter Ujfalusi
3d77763c9a
ASoC: SOF: pcm: Reverse check for prepared stream in sof_pcm_hw_params()
Reduce the number of checks needed with the simple and most common audio
sequence when the stream is started then stopped.

If the stream has not been prepared there is no need to check if we have
pcm_ops and pcm_ops->hw_free() callback as it does not matter.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20250619104551.25912-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-20 00:21:16 +01:00
Peter Ujfalusi
6b3cb7f434
ASoC: SOF: topology: Parse the dapm_widget_tokens in case of DSPless mode
Parsing the dapm_widget_tokens is also needed for DSPless mode as it is
setting the snd_soc_dapm_widget.no_wname_in_kcontrol_name flag for the
kcontrol creation from DAPM widgets.
Without that flag set, the following warnings might appear because of long
control names:
ALSA: Control name 'eqiir.2.1 Post Mixer Analog Playback IIR Eq bytes' truncated to 'eqiir.2.1 Post Mixer Analog Playback IIR Eq'
ALSA: Control name 'eqfir.2.1 Post Mixer Analog Playback FIR Eq bytes' truncated to 'eqfir.2.1 Post Mixer Analog Playback FIR Eq'
ALSA: Control name 'drc.2.1 Post Mixer Analog Playback DRC bytes' truncated to 'drc.2.1 Post Mixer Analog Playback DRC byte'
ALSA: Control name 'drc.2.1 Post Mixer Analog Playback DRC switch' truncated to 'drc.2.1 Post Mixer Analog Playback DRC swit'
ALSA: Control name 'gain.15.1 Pre Mixer Deepbuffer HDA Analog Volume' truncated to 'gain.15.1 Pre Mixer Deepbuffer HDA Analog V'

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20250619102640.12068-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-20 00:21:15 +01:00
Peter Ujfalusi
2710204bf1
ASoC: SOF: pcm: Remove local create_page_table() wrapper function
The create_page_table() can be dropped and replaced with a direct call to
snd_sof_create_page_table().

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20250619104608.25947-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-20 00:21:14 +01:00
Peter Ujfalusi
8a07944a77
ASoC: SOF: ipc4-pcm: Look for best matching hw_config for SSP
Instead of just looking for a hw_config with matching rate only it sounds
better to try to find the best matching configuration.

If we have multiple hw_configurations with the same rate, but each with
different format for example then we have been picking the first config
with the matching rate, which can be a problem and it wil depend on how
the configs are ordered.

Instead we should be trying to find the best match out of the configs
1. rate + format + channels are matching
2. rate + format are matching
3. rate matching

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20250619102657.12109-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-20 00:21:13 +01:00
Peter Ujfalusi
16ea4666bb
ASoC: Intel: sof-function-topology-lib: Print out the unsupported dmic count
It is better to print out the non supported num_dmics than printing that
it is not matching with 2 or 4.

Fixes: 2fbeff3338 ("ASoC: Intel: add sof_sdw_get_tplg_files ops")
Cc: stable@vger.kernel.org
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250619104705.26057-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-19 15:44:42 +01:00
Jyri Sarha
2756b7f08f
ASoC: SOF: ipc4-pcm: Harmonize sof_ipc4_set_pipeline_state() dbg print
Harmonize sof_ipc4_set_pipeline_state() dbg print with the new print
in sof_ipc4_set_multi_pipeline_state().

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250619121121.25241-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-19 13:19:55 +01:00
Jyri Sarha
0e57fa2067
ASoC: SOF: ipc4-pcm: Pipe instances to dev_dbg in multi_pipeline_state()
Add a dev_dbg to sof_ipc4_set_multi_pipeline_state(). The debug print
lists the pipeline instance numbers that are included in the
SOF_IPC4_GLB_SET_PIPELINE_STATE message. Without this log its very
hard to tell what pipelines are affected. This print is very helpful
when analyzing SOF logs automatically.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250619121121.25241-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-19 13:19:54 +01:00
Jyri Sarha
ecd41e0e25
ASoC: SOF: ipc4: Add sof_ipc4_pipeline_state_str() for debugging
Add sof_ipc4_pipeline_state_str() to translate enum
sof_ipc4_pipeline_state into human readable form.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250619121121.25241-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-19 13:19:53 +01:00
Peter Ujfalusi
ace9b3daf2
ASoC: SOF: ipc4/Intel: Add support for library restore firmware functionality
The firmware will be able to only save and restore the context related to
library management.
This means that even without a full context save, the libraries do not
need to be re-loaded to the firmware after second or consecutive boots.

This is reported via the FW_READY notification, where BIT(15) indicates:
0 - the library restore is not done
1 - library restore is done

This bit is only valid if full context save is not enabled, full context
save is by definition saves and restores the library related book-keeping
as well.

Add a new flag to tell the platform code if the libraries have been
restored, no need to reload them after boot.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://patch.msgid.link/20250619105623.4546-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-19 13:19:35 +01:00
Peter Ujfalusi
cec49fa47b
ASoC: SOF: ipc4-priv: Add kernel doc for fw_context_save of sof_ipc4_fw_data
The kernel documentation is missing entry for the fw_context_save.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://patch.msgid.link/20250619105623.4546-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-19 13:19:34 +01:00
Peter Ujfalusi
bb48117b79
ASoC: Intel: sof_sdw: Implement add_dai_link to filter HDMI PCMs
If the system does not have iDisp codec then mark the HDMI PCM link as
ignore.
This ensures that HDMI PCMs will not be created when there is no iDisp
codec available.

When iDisp codec is not present and the HDMI PCMs were created they were
not operational, all operations would fail on them.

With this patch it is possible to load the topology with HDMI links, but
gives the ability to ignore them and thus prevent the creation of the
nonworking PCM devices.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://patch.msgid.link/20250619084222.559-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-19 13:19:16 +01:00
Peter Ujfalusi
8659190752
ASoC: Intel: skl_hda_dsp_generic: Implement add_dai_link to filter HDMI PCMs
If the system does not have iDisp codec then mark the HDMI PCM link as
ignore.
This ensures that HDMI PCMs will not be created when there is no iDisp
codec available.

When iDisp codec is not present and the HDMI PCMs were created they were
not operational, all operations would fail on them.

With this patch it is possible to load the topology with HDMI links, but
gives the ability to ignore them and thus prevent the creation of the
nonworking PCM devices.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://patch.msgid.link/20250619084222.559-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-19 13:19:15 +01:00
Peter Ujfalusi
2d91cb261c
ASoC: core: Check for rtd == NULL in snd_soc_remove_pcm_runtime()
snd_soc_remove_pcm_runtime() might be called with rtd == NULL which will
leads to null pointer dereference.
This was reproduced with topology loading and marking a link as ignore
due to missing hardware component on the system.
On module removal the soc_tplg_remove_link() would call
snd_soc_remove_pcm_runtime() with rtd == NULL since the link was ignored,
no runtime was created.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://patch.msgid.link/20250619084222.559-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-19 13:19:14 +01:00
Peter Ujfalusi
cbf4e0fac3
ASoC: topology: Do not call snd_soc_remove_pcm_runtime() for ignored links
If a link has been ignored then it is not even added.
The snd_soc_get_pcm_runtime() will return NULL as the runtime will does
not exist.
We can just skip this step to avoid performing a lookup to do nothing.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://patch.msgid.link/20250619084222.559-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-19 13:19:13 +01:00
wangdicheng
7f4c540e08 ALSA: hda/conexant: Renaming the codec with device ID 0x1f86 and 0x1f87
Due to changes in the manufacturer's plan, all 0x14f11f86 will be
named CX11880, and 0x14f11f87 will be named SN6140

Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Link: https://patch.msgid.link/20250616074331.581309-1-wangdich9700@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-18 10:16:50 +02:00
Chen Ni
d9f38d9824
ASoC: tegra: AHUB: Remove unneeded semicolon
Remove unnecessary semicolons reported by Coccinelle/coccicheck and the
semantic patch at scripts/coccinelle/misc/semicolon.cocci.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://patch.msgid.link/20250617032103.1725040-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-17 12:50:23 +01:00
Sachin Mokashi
47972c1c33
ASoC: Intel: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated, use strscpy() instead.
As strcpy() performs no bounds checking on the destination buffer. This
could result in buffer overflow. The safe replacement is strscpy().

Link: https://github.com/KSPP/linux/issues/88

Signed-off-by: Sachin Mokashi <sachin.mokashi@intel.com>
Link: https://patch.msgid.link/20250613163530.1165690-1-sachin.mokashi@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-16 13:26:45 +01:00
Laurentiu Mihalcea
b081d8564e
ASoC: SOF: imx8: add core shutdown operation for imx8/imx8x
Currently, the DSP core from i.MX8QM/i.MX8QXP is able to operate while the
firmware image is being loaded. Because of this, the DSP may change the
content of the firmware data just after it was loaded, thus leading to the
data having unexpected values when the DSP is reset (via run()).

Fix this by implementing the core_shutdown() operation that will put the
DSP in stall during suspend(). The stall will be removed during the run()
opertion, thus guaranteeing that the DSP core will not be able to run
while the firmware image is being loaded.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://patch.msgid.link/20250613194310.1128733-1-laurentiumihalcea111@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-16 13:26:13 +01:00
Baojun Xu
b2904df0a3 ALSA: hda/tas2781: Add compatible for hardware id TIAS2781 and TXNW2781
TIAS2781 is unofficial hardware id in ACPI for tas2781 in HDA,
has been used for several projects. TXNW is the official hardware
id for TI, will be used in new projects, including device on SPI bus,
which was enumerated by drivers/acpi/scan.c, and probed by smi_probe()
in drivers/platform/x86/serial-multi-instantiate.c.
This patch will support both TIAS2781 and TXNW2781 in ACPI with
tas2781 under HDA.
As our I2C driver will handle all of slaver devices, so we probe
first device only: "TXNW2781:00-tas2781-hda.0"

Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20250616035607.2569-1-baojun.xu@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-16 08:30:37 +02:00
Christophe Leroy
8629eea901 ALSA: pcm: Convert snd_pcm_sync_ptr() to user_access_begin/user_access_end()
Now that snd_pcm_sync_ptr_get_user() and snd_pcm_sync_ptr_put_user()
are converted to user_access_begin/user_access_end(),
snd_pcm_sync_ptr_get_user() is more efficient than a raw get_user()
followed by a copy_from_user(). And because copy_{to/from}_user() are
generic functions focussed on transfer of big data blocks to/from user,
snd_pcm_sync_ptr_put_user() is also more efficient for small amont of
data.

So use snd_pcm_sync_ptr_get_user() and snd_pcm_sync_ptr_put_user() in
snd_pcm_sync_ptr() too.

snd_pcm_ioctl_sync_ptr_buggy() is left as it is because the conversion
wouldn't be straigh-forward due to the workaround it provides.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/6ce6bc4da498ea7ea2be5f279b374370b1613b13.1749883041.git.christophe.leroy@csgroup.eu
2025-06-16 08:25:32 +02:00
Christophe Leroy
c72fad73ba ALSA: pcm: Replace [audio_]tstamp_[n]sec by struct __snd_timespec in struct snd_pcm_mmap_status32
To match struct __snd_pcm_mmap_status and enable reuse of
snd_pcm_sync_ptr_get_user() and snd_pcm_sync_ptr_put_user() by
snd_pcm_sync_ptr() replace tstamp_sec and tstamp_nsec fields by
a struct __snd_timespec in struct snd_pcm_mmap_status32.
Do the same with audio_tstamp_sec and audio_tstamp_nsec.

This is possible because struct snd_pcm_mmap_status32 is packed
and __SND_STRUCT_TIME64 is always defined for kernel which means
struct __snd_timespec is always defined as:

	struct __snd_timespec {
		__s32 tv_sec;
		__s32 tv_nsec;
	};

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/df8ea1a9aff61c3e358759b1f495bdb9fb8a3e6a.1749883041.git.christophe.leroy@csgroup.eu
2025-06-16 08:25:27 +02:00
Christophe Leroy
a9b49bf8ad ALSA: pcm: Convert SNDRV_PCM_IOCTL_SYNC_PTR to user_access_begin/user_access_end()
With user access protection (Called SMAP on x86 or KUAP on powerpc)
each and every call to get_user() or put_user() performs heavy
operations to unlock and lock kernel access to userspace.

SNDRV_PCM_IOCTL_SYNC_PTR is a hot path which is called really often
and needs to run as fast as possible.

To improve performance, perform user accesses by blocks using
user_access_begin/user_access_end() and unsafe_get_user()/
unsafe_put_user().

Before the patch the 9 calls to put_user() at the end of
snd_pcm_ioctl_sync_ptr_compat() imply the following set of
instructions about 9 times (access_ok - enable user - write - disable
user):
    0.00 :   c057f858:       3d 20 7f ff     lis     r9,32767
    0.29 :   c057f85c:       39 5e 00 14     addi    r10,r30,20
    0.77 :   c057f860:       61 29 ff fc     ori     r9,r9,65532
    0.32 :   c057f864:       7c 0a 48 40     cmplw   r10,r9
    0.36 :   c057f868:       41 a1 fb 58     bgt     c057f3c0 <snd_pcm_ioctl+0xbb0>
    0.30 :   c057f86c:       3d 20 dc 00     lis     r9,-9216
    1.95 :   c057f870:       7d 3a c3 a6     mtspr   794,r9
    0.33 :   c057f874:       92 8a 00 00     stw     r20,0(r10)
    0.27 :   c057f878:       3d 20 de 00     lis     r9,-8704
    0.28 :   c057f87c:       7d 3a c3 a6     mtspr   794,r9
...

A perf profile shows that in total the 9 put_user() represent 36% of
the time spent in snd_pcm_ioctl() and about 80 instructions.

With this patch everything is done in 13 instructions and represent
only 15% of the time spent in snd_pcm_ioctl():

    0.57 :   c057f5dc:       3d 20 dc 00     lis     r9,-9216
    0.98 :   c057f5e0:       7d 3a c3 a6     mtspr   794,r9
    0.16 :   c057f5e4:       92 7f 00 04     stw     r19,4(r31)
    0.63 :   c057f5e8:       93 df 00 0c     stw     r30,12(r31)
    0.16 :   c057f5ec:       93 9f 00 10     stw     r28,16(r31)
    4.95 :   c057f5f0:       92 9f 00 14     stw     r20,20(r31)
    0.19 :   c057f5f4:       92 5f 00 18     stw     r18,24(r31)
    0.49 :   c057f5f8:       92 bf 00 1c     stw     r21,28(r31)
    0.27 :   c057f5fc:       93 7f 00 20     stw     r27,32(r31)
    5.88 :   c057f600:       93 36 00 00     stw     r25,0(r22)
    0.11 :   c057f604:       93 17 00 00     stw     r24,0(r23)
    0.00 :   c057f608:       3d 20 de 00     lis     r9,-8704
    0.79 :   c057f60c:       7d 3a c3 a6     mtspr   794,r9

Note that here the access_ok() in user_write_access_begin() is skipped
because the exact same verification has already been performed at the
beginning of the fonction with the call to user_read_access_begin().

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/eccd047f2dfeb550129a1d60035e2233c4401d0c.1749883041.git.christophe.leroy@csgroup.eu
2025-06-14 13:40:14 +02:00
Christophe Leroy
2acd83beb4 ALSA: pcm: refactor copy from/to user in SNDRV_PCM_IOCTL_SYNC_PTR
In an effort of optimising SNDRV_PCM_IOCTL_SYNC_PTR ioctl which
is a hot path, lets first refactor the copy from and to user
with macros.

This is done with macros and not static inline fonctions because
types differs between the different versions of snd_pcm_sync_ptr()
like functions.

First step is to refactor only snd_pcm_ioctl_sync_ptr_compat() and
snd_pcm_ioctl_sync_ptr_x32() as it would be a performance
regression for snd_pcm_sync_ptr() and snd_pcm_ioctl_sync_ptr_buggy()
for now. They may be refactored after next patch.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/f8b77932bb9ce96148ae5c3953e7ee44fa2359f8.1749883041.git.christophe.leroy@csgroup.eu
2025-06-14 13:40:14 +02:00
Simon Trimmer
60599e4f8a ALSA: hda/realtek: Add quirk for Asus GA605K
The GA605K has similar audio hardware to the GA403U so apply the
same quirk.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Tested-by: Timofey Titovets <nefelim4ag@gmail.com>
Link: https://github.com/alsa-project/alsa-ucm-conf/issues/578
Link: https://patch.msgid.link/20250613145251.397500-1-simont@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-14 13:37:48 +02:00
Jonathan Lane
efa6bdf1bc ALSA: hda/realtek: enable headset mic on Latitude 5420 Rugged
Like many Dell laptops, the 3.5mm port by default can not detect a
combined headphones+mic headset or even a pure microphone.  This
change enables the port's functionality.

Signed-off-by: Jonathan Lane <jon@borg.moe>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20250611193124.26141-2-jon@borg.moe
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-14 10:06:21 +02:00
Raven Black
13b86ea92e
ASoC: amd: yc: update quirk data for HP Victus
Make the internal microphone work on HP Victus laptops.

Signed-off-by: Raven Black <ravenblack@gmail.com>
Link: https://patch.msgid.link/20250613-support-hp-victus-microphone-v1-1-bebc4c3a2041@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-13 18:14:19 +01:00
Mark Brown
dc8b60918f
ASoC: cs35l56: Change firmware filenames for SoundWire
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

Change the firmware filename format on SoundWire systems to
directly tie it to the physical amp it applies to. This is mainly
to decouple it from the ALSA prefix strings to avoid complications
when the SoundWire machine driver starts creating dailinks based on
SDCA Disco info instead of hardcoded match tables. It also avoids
errors from having to rename firmware files from a hardware-address
to a ALSA-prefix naming for Linux publication. There are already
published firmware files for the L56 B0 silicon so that has a fallback
scheme for backward compatibility which has been separated into its
own patch on top of the main change.

We'd like to get this into 6.16 so that the L63 support starts "clean"
with this new naming and we don't have to support one kernel version
with L63 using the old naming. Unfortunately we didn't manage to get
these patches through internal review and testing before the merge
window opened.
2025-06-13 18:12:49 +01:00
Mark Brown
000d8b9420
ASoC: mediatek: use reserved memory or enable
Merge series from Chen-Yu Tsai <wenst@chromium.org>:

Angelo requested that these platforms use reserved memory regions if
possible, and fall back to pre-allocated buffers only if that fails,
to align with other MediaTek SoCs / platforms that already use reserved
memory. The series covers MediaTek's MT8173, MT8183, MT8186, and MT8192
SoCs.

There are three parts to the series:

- Part one (patches 1 through 5) update the DT bindings to allow having
  a memory region. The text binding for the MT8173 was converted to YAML
  and also aligned with current usage by addition of a power domain.

  Note that the MT8183 text binding was _not_ converted. It is
  drastically different from what was landed in the device trees. Some
  time is needed to work out the differences. I might try to recombine
  the audio clocks (which are actually part of the same hardware block)
  as well.

- Part two (patches 6 through 9) update the audio frontend drivers for
  the various platforms covered in this series.

  - Patch 6 is the evolution of version 1, now defaulting to reserved
    memory if possible.

  - Patch 7 adds support for >32 bit DMA addresses to the MT8183 driver.
    This was missing, and prevents the memory regions, which are
    allocated from the top end of main memory by default, from working.

  - Patch 8 and 9 are just some minor cleanups to reduce the number of
    "&pdev->dev" style dereferences. They are placed after the other
    changes to make it easier for the fixes to be backported.

- Part three (patches 10 through 13) add a reserved memory region for
  the audio frontend on the various platforms. (This part is queued up
  and therefore not included in v3.)

  For the MT8173, the change covers the whole platform. In practice
  there are only ChromeOS devices.

  For the other platforms, only the ChromeOS devices are covered. These
  are what I have available for testing.

Please have a look. I assume the DT binding and driver changes will go
through the ASoC tree, while the device tree changes will go through the
MediaTek tree.
2025-06-13 17:52:51 +01:00
Terry Cheong
5eb8a0d773
ASoC: hdmi-codec: use SND_JACK_AVOUT as jack status
Use SND_JACK_AVOUT as the mask to align with hdac_hdmi driver so that we
can determine HDMI/DP devices from event type.

Most drivers that uses hdmi-codec driver will not be affected since they
are creating jacks with SND_JACK_LINEOUT mask. They will still report
SND_JACK_LINEOUT when the jack status is updated with
snd_soc_jack_report.

Signed-off-by: Terry Cheong <htcheong@chromium.org>
Link: https://patch.msgid.link/20250613-hdmi-v1-1-665ba7ecd5e7@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-13 12:23:56 +01:00
Kuninori Morimoto
dae29b678b
ASoC: soc-ops-test: dynamically allocate struct snd_ctl_elem_value
This structure is really too larget to be allocated on the stack:

	linux/sound/soc/soc-ops-test.c:520:1: error: the frame size of\
	1304 bytes is larger than 1280 bytes
	[-Werror=frame-larger-than=]

Change the function to dynamically allocate it instead.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87sek489l8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-13 12:23:55 +01:00
Sven Peter
f594279328
ASoC: apple: mca: Drop default ARCH_APPLE in Kconfig
When the first driver for Apple Silicon was upstreamed we accidentally
included `default ARCH_APPLE` in its Kconfig which then spread to almost
every subsequent driver. As soon as ARCH_APPLE is set to y this will
pull in many drivers as built-ins which is not what we want.
Thus, drop `default ARCH_APPLE` from Kconfig.

Signed-off-by: Sven Peter <sven@kernel.org>
Reviewed-by: Janne Grunau <j@jannau.net>
Link: https://patch.msgid.link/20250612-apple-kconfig-defconfig-v1-10-0e6f9cb512c1@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-13 12:12:26 +01:00
Takashi Iwai
d0630a0b80 ALSA: usb-audio: Fix build with CONFIG_INPUT=n
The recent addition of DualSense mixer quirk relies on the input
device handle, and the build can fail if CONFIG_INPUT isn't set.
Put (rather ugly) workarounds to wrap with IS_REACHABLE() for avoiding
the build error.

Fixes: 79d561c4ec ("ALSA: usb-audio: Add mixer quirk for Sony DualSense PS5")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506130733.gnPKw2l3-lkp@intel.com/
Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://patch.msgid.link/20250613081543.7404-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-13 11:52:43 +02:00
Stefan Binding
84fc8896f0 ALSA: hda/realtek: Add support for ASUS NUC using CS35L41 HDA
Add support for ASUS NUC14LNS.

This NUC uses a single CS35L41 Amp in using Internal Boost with SPI.
To support the Single Amp, a new quirk is required.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://patch.msgid.link/20250612160029.848104-3-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-13 10:19:43 +02:00
Stefan Binding
dfce24f003 ALSA: hda: cs35l41: Add support for center channel in CS35L41 HDA
Currently only left and right channels are supported for each amp.
Support is needed for a center channel, using both left and right
channel audio.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://patch.msgid.link/20250612160029.848104-2-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-13 10:19:34 +02:00
wangdicheng
93adf20ff4 ALSA: usb-audio: Rename ALSA kcontrol PCM and PCM1 for the KTMicro sound card
PCM1 not in Pulseaudio's control list; standardize control to
"Speaker" and "Headphone".

Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20250613063636.239683-1-wangdich9700@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-13 10:18:10 +02:00
Chen-Yu Tsai
bb8d8ba471
ASoC: mediatek: mt8183-afe-pcm: use local dev pointer in driver callbacks
The probe and remove functions in the mt8183-afe-pcm driver repeatedly uses
`&pdev->dev` for |struct device *|, but then assigns this value to
`afe->dev` and uses that in other places in the same function.

Store `&pdev->dev` in a local pointer and use that exclusively to avoid
the numerous dereferences and to make the code more consistent. Lines
are reflowed where it makes sense.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://patch.msgid.link/20250612074901.4023253-10-wenst@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12 13:45:38 +01:00
Chen-Yu Tsai
b2c090c9f6
ASoC: mediatek: mt8173-afe-pcm: use local dev pointer in driver callbacks
The probe and remove functions in the mt8183-afe-pcm driver repeatedly uses
`&pdev->dev` for |struct device *|, but then assigns this value to
`afe->dev` and uses that in other places in the same function.

Store `&pdev->dev` in a local pointer and use that exclusively to avoid
the numerous dereferences and to make the code more consistent. Lines
are reflowed where it makes sense.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://patch.msgid.link/20250612074901.4023253-9-wenst@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12 13:45:37 +01:00
Chen-Yu Tsai
9e7bc5cb8d
ASoC: mediatek: mt8183-afe-pcm: Support >32 bit DMA addresses
The AFE DMA hardware supports up to 34 bits for DMA addresses. This is
missing from the driver and prevents reserved memory regions from
working properly when the allocated region is above the 4GB line.

Fill in the related register offsets for each DAI, and also set the
DMA mask. Also fill in the LSB end register offsets for completeness.

Fixes: a94aec035a ("ASoC: mediatek: mt8183: add platform driver")
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://patch.msgid.link/20250612074901.4023253-8-wenst@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12 13:45:36 +01:00
Chen-Yu Tsai
ec4a10ca4a
ASoC: mediatek: use reserved memory or enable buffer pre-allocation
In commit 32c9c06adb ("ASoC: mediatek: disable buffer pre-allocation")
buffer pre-allocation was disabled to accommodate newer platforms that
have a limited reserved memory region for the audio frontend.

Turns out disabling pre-allocation across the board impacts platforms
that don't have this reserved memory region. Buffer allocation failures
have been observed on MT8173 and MT8183 based Chromebooks under low
memory conditions, which results in no audio playback for the user.

Since some MediaTek platforms already have dedicated reserved memory
pools for the audio frontend, the plan is to enable this for all of
them. This requires device tree changes. As a fallback, reinstate the
original policy of pre-allocating audio buffers at probe time of the
reserved memory pool cannot be found or used.

This patch covers the MT8173, MT8183, MT8186 and MT8192 platforms for
now, the reason being that existing MediaTek platform drivers that
supported reserved memory were all platforms that mainly supported
ChromeOS, and is also the set of devices that I can verify.

Fixes: 32c9c06adb ("ASoC: mediatek: disable buffer pre-allocation")
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://patch.msgid.link/20250612074901.4023253-7-wenst@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12 13:45:35 +01:00
Gabriel Santese
ba06528ad5
ASoC: amd: yc: Add quirk for MSI Bravo 17 D7VF internal mic
MSI Bravo 17 (D7VF), like other laptops from the family,
has broken ACPI tables and needs a quirk for internal mic
to work properly.

Signed-off-by: Gabriel Santese <santesegabriel@gmail.com>
Link: https://patch.msgid.link/20250530005444.23398-1-santesegabriel@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12 13:30:20 +01:00
Shenghao Ding
8a5a5cecb7
ASoC: tas2781: Move the "include linux/debugfs.h" into tas2781.h
Move the include linux/debugfs.h into tas2781.h for code clean.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20250612044252.1025-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12 13:22:05 +01:00
Richard Fitzgerald
e5d5b3aebd
ASoC: cs35l56: Use SoundWire address as alternate firmware suffix on L56 B0
Use the SoundWire link number and device unique ID as the firmware file
qualifier suffix on CS35L56 B0 if .bin files are not found with the older
suffix. Some changes in wm_adsp needed to support this have been included
in this patch because they are trivial.

The allows future products with CS35L56 B0 silicon to use the same firmware
file naming as CS35L57 and cs35L63, while retaining backward compatibility
for firmware that has already been published with the old naming scheme.

The old suffix is searched first, partly because there are already many
files using that naming scheme, but also because they are a smaller subset
of all the possible fallback name options offered by wm_adsp so we know
that it will either find the qualified files or fail. All the firmware
files already published have the wmfw qualified with only the ACPI SSID and
the bin files qualified with both SSID and the suffix.

Originally, the firmware file names indicated which amplifier instance they
were for by appending the ALSA prefix string. This is the standard ASoC way
of distinguishing different instances of the same device. However, on
SoundWire systems the SoundWire physical unique address is available as a
unique identifier for each amp, and this address is hardwired by the
address pin on the amp.

The firmware files are specific for each physical amp so they must be
applied to that amp. Using the ALSA prefix for the filename qualifier means
that to name a firmware file it must be determined what prefix string the
machine driver will assign to each device and then use that to name the
firmware file correctly. This is straightforward in traditional ASoC
systems where the machine driver is specific to a particular piece of
hardware. But on SoundWire the machine driver is generic and can handle a
very wide range of hardware. It is more difficult to determine exactly what
the prefix will be on any particular production device, and more prone to
mistakes. Also, when the machine driver switches to generating this
automatically from SDCA properties in ACPI, there is an additional layer of
complexity in determining the mapping. This uncertainty is unnecessary
because the firmware is built for a specific amp. with known address, so we
can use that directly instead of introducing a redundant intermediate
alias. This ensures the firmware is applied to the amp it was intended for.

There are already many published firmware for CS35L56 B0 silicon so this
first looks for the original name suffix, to keep backward compatibility.
If this doesn't find .bin files it will switch to using the new name suffix
so that future products using CS35L56 B0 can start to use the new suffix.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250612121428.1667-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12 13:21:44 +01:00
Richard Fitzgerald
d1fc768795
ASoC: cs35l56: Use SoundWire address as firmware name suffix for new silicon
Use the SoundWire link number and device unique ID as the firmware file
qualifier suffix on CS35L57, CS35L63 and revisions of CS35L56 after B0. The
change in wm_adsp needed to support this has been included in this patch
because it is fairly trivial.

Originally, the firmware file names indicated which amplifier instance they
were for by appending the ALSA prefix string. This is the standard ASoC way
of distinguishing different instances of the same device. However, on
SoundWire systems the SoundWire physical unique address is available as a
unique identifier for each amp, and this address is hardwired by a pin on
the amp.

The firmware files are specific for each physical amp so they must be
applied to that amp. Using the ALSA prefix for the filename qualifier means
that to name a firmware file it must be determined what prefix string the
machine driver will assign to each device and then use that to name the
firmware file correctly. This is straightforward in traditional ASoC
systems where the machine driver is specific to a particular piece of
hardware. But on SoundWire the machine driver is generic and can handle a
very wide range of hardware. It is more difficult to determine exactly what
the prefix will be on any particular production device, and more prone to
mistakes. Also, when the machine driver switches to generating this
automatically from SDCA properties in ACPI, there is an additional layer of
complexity in determining the mapping. This uncertainty is unnecessary
because the firmware is built for a specific amp. with known address, so we
can use that directly instead of introducing the redundant intermediate
alias. This ensures the firmware is applied to the amp it was intended for.

There have not been any firmwares published for CS35L57 or CS35L63, so
these can safely be switched to using the SoundWire unique address as the
suffix string. Also note that the machine driver in older kernel version
only has match entries for the CS35L56 Soundwire identity so any future
product with a cs35L57 or CS35L63 would require a new kernel anyway.

There are already many published firmware for CS35L56 B0 silicon so this
keeps the original naming scheme on those, to preserve backward
compatibility.

Note that although sdw_slave.id contains a unique_id field, this cannot
be trusted because the SoundWire core code also puts magic values into it
that it uses as a flag. So the unique ID is read from the chip register.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250612121428.1667-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12 13:21:43 +01:00
Takashi Iwai
30f85eddbd ALSA: hda/ca0132: Use const char * for strings
Some static strings have been stored in fixed char arrays although
they could be gracefully "const char *" instead.  Also, a few other
definitions use the raw "char *" without const.

Converting those to "const char *" will save some memory and give more
safety, in addition to a side-effect to address the bogus compiler
warning with snprintf().

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506121025.G9uunMlx-lkp@intel.com/
Link: https://patch.msgid.link/20250612064802.1170-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-12 08:53:00 +02:00
Chen Ni
9ca30a1b00 ALSA: usb-audio: Convert comma to semicolon
Replace comma between expressions with semicolons.

Using a ',' in place of a ';' can have unintended side effects.
Although that is not the case here, it is seems best to use ';'
unless ',' is intended.

Found by inspection.
No functional change intended.
Compile tested only.

Fixes: 79d561c4ec ("ALSA: usb-audio: Add mixer quirk for Sony DualSense PS5")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://patch.msgid.link/20250612060228.1518028-1-nichen@iscas.ac.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-12 08:51:42 +02:00
Lucy Thrun
a409c60111 ALSA: hda/ca0132: Fix buffer overflow in add_tuning_control
The 'sprintf' call in 'add_tuning_control' may exceed the 44-byte
buffer if either string argument is too long. This triggers a compiler
warning.
Replaced 'sprintf' with 'snprintf' to limit string lengths to prevent
overflow.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506100642.95jpuMY1-lkp@intel.com/
Signed-off-by: Lucy Thrun <lucy.thrun@digital-rabbithole.de>
Link: https://patch.msgid.link/20250610175012.918-3-lucy.thrun@digital-rabbithole.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-10 20:24:02 +02:00
Lucy Thrun
165bb5b154 ALSA: hda/ca0132: Fix using plain integer as NULL pointer in add_tuning_control
The 'add_tuning_control' function initializes two pointers using the
integer 0 instead of the NULL pointer, triggering sparse warnings.
Replaced both instaces of '0' with 'NULL' to resolve the type mismatch
and suppress the sparse warnings.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506100842.d8lwwdwU-lkp@intel.com/
Signed-off-by: Lucy Thrun <lucy.thrun@digital-rabbithole.de>
Link: https://patch.msgid.link/20250610175012.918-2-lucy.thrun@digital-rabbithole.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-10 20:23:45 +02:00
Thorsten Blum
d6e2c062e5 ALSA: mips/sgio2audio: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead.

No functional changes intended.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250610121835.2908-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-10 17:53:42 +02:00
Arnd Bergmann
7e10d7242e
ASoC: ops: dynamically allocate struct snd_ctl_elem_value
This structure is really too larget to be allocated on the stack:

sound/soc/soc-ops.c:435:5: error: stack frame size (1296) exceeds limit (1280) in 'snd_soc_limit_volume' [-Werror,-Wframe-larger-than]

Change the function to dynamically allocate it instead.

There is probably a better way to do it since only two integer fields
inside of that structure are actually used, but this is the simplest
rework for the moment.

Fixes: 783db6851c ("ASoC: ops: Enforce platform maximum on initial value")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20250610093057.2643233-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-10 12:46:33 +01:00
Thorsten Blum
6325766d69
ASoC: sdw_utils: Fix potential NULL pointer deref in is_sdca_endpoint_present()
Check the return value of kzalloc() and exit early to avoid a potential
NULL pointer dereference.

Cc: stable@vger.kernel.org
Fixes: 4f8ef33dd4 ("ASoC: soc_sdw_utils: skip the endpoint that doesn't present")
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250610103225.1475-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-10 12:46:16 +01:00
Takashi Iwai
4c267ae2ef ALSA: sb: Force to disable DMAs once when DMA mode is changed
When the DMA mode is changed on the (still real!) SB AWE32 after
playing a stream and closing, the previous DMA setup was still
silently kept, and it can confuse the hardware, resulting in the
unexpected noises.  As a workaround, enforce the disablement of DMA
setups when the DMA setup is changed by the kcontrol.

https://bugzilla.kernel.org/show_bug.cgi?id=218185
Link: https://patch.msgid.link/20250610064322.26787-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-10 08:45:43 +02:00
Takashi Iwai
ed29e073ba ALSA: sb: Don't allow changing the DMA mode during operations
When a PCM stream is already running, one shouldn't change the DMA
mode via kcontrol, which may screw up the hardware.  Return -EBUSY
instead.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=218185
Link: https://patch.msgid.link/20250610064322.26787-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-10 08:45:33 +02:00
Richard Fitzgerald
7b23887a0c ALSA: hda/realtek: Add quirk for Asus GU605C
The GU605C has similar audio hardware to the GU605M so apply the
same quirk.

Note that in the linked bugzilla there are two separate problems
with the GU605C. This patch fixes one of the problems, so I haven't
added a Closes: tag.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reported-by: Nick Karaolidis <nick@karaolidis.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=220152
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20250609102125.63196-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-10 08:32:44 +02:00
Chris Chiu
c6451a7325 ALSA: hda/realtek: Fix built-in mic on ASUS VivoBook X513EA
The built-in mic of ASUS VivoBook X513EA is broken recently by the
fix of the pin sort. The fixup ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
is working for addressing the regression, too.

Fixes: 3b4309546b ("ALSA: hda: Fix headset detection failure due to unstable sort")
Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20250610035607.690771-1-chris.chiu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-10 08:32:34 +02:00
Mark Brown
2ccb770828
ASoC: codecs: More const and unused member cleanups
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Make static data const for code safety and drop some unused fields in
structs.
2025-06-09 17:36:20 +01:00
Charles Keepax
0cbce868ff ASoC: cs42l43: Remove unnecessary work functions
Now the SoundWire IRQ lock has been changed in the core, it is no longer
necessary to use a bunch of work functions to dodge mutex inversions.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20250609143041.495049-4-ckeepax@opensource.cirrus.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2025-06-09 21:36:07 +05:30
Mark Brown
d1f2fa7ca1
Add DisplayPort sound support for Fairphone 5
Merge series from Luca Weiss <luca.weiss@fairphone.com>:

Add the necessary sound card bits and some dts additions to enable sound
over DisplayPort-over-USB-C, e.g. to a connected TV or monitor.

The UCM files can be found here:
https://gitlab.postmarketos.org/postmarketOS/pmaports/-/tree/master/device/testing/device-fairphone-fp5/ucm

This series - in spirit - depends on the series enabling DisplayPort in
the first place, but can land pretty independently, especially the ASoC
bits:
https://lore.kernel.org/linux-arm-msm/20250312-fp5-pmic-glink-dp-v2-0-a55927749d77@fairphone.com/
2025-06-09 16:44:33 +01:00
Mark Brown
5f4f86d5e0
ASoC: Add Richtek RTQ9124 support
Merge series from cy_huang@richtek.com:

This patch series adds Richtek RTQ9124 1x30W audio amplifier support.
2025-06-09 16:44:29 +01:00
Mark Brown
28d3d1830d
Cleanup in rockchip_sai.c
Merge series from Pei Xiao <xiaopei01@kylinos.cn>:

1.Simplify the condition logic in
2.Use helper function devm_clk_get_enabled()
2025-06-09 16:44:25 +01:00
Mark Brown
d3de848588
ASoC: remove component->id
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

snd_soc_component has "id", but no one is using it except Qcom. It is
initialized at snd_soc_component_initialize(), but Qcom overwrites it.

According to Srinivas, unfortunately, current Qcom lpass is broken.
But we can update it and then, avoid to use component->id.
Let's do it, and remove it.
2025-06-09 16:44:21 +01:00
Mark Brown
23d3f6ecaf
ASoC: tas571x: add support for tas5753
Merge series from Bram Vlerick <bram.vlerick@openpixelsystems.org>:

Add support for the ti,tas5753 to tas571x driver.
2025-06-09 16:44:17 +01:00
Mark Brown
d0bdcfcab3
Use helper function for_each_child_of_node_scoped()
Merge series from Ai Chao <aichao@kylinos.cn>:

This patch series introduces wrapper functions for_each_child_of_node_scoped().

The for_each_child_of_node_scoped() helper provides a scope-based clean-up
functionality to put the device_node automatically, and as such, there is
no need to call of_node_put() directly.
2025-06-09 16:44:13 +01:00
Mark Brown
4388f5d214
ASoC: Intel: avs: Add rt5640 board support
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

Small set of patches intoducing two low-impact improvements to rt5640
codec driver and then avs_rt5640 machine board driver. The board
behavior is based on existing boards such as avs_rt274.

In regard to the retry-device-verification change, there is number of
similar "fixes" found in the Realtek code in sound/soc/codecs. What I
provide here is verified with tests, the delay is not mentioned in the
spec I have access to.
2025-06-09 16:44:08 +01:00
Mark Brown
65613ac1b4
ASoC: codecs: wcd93xx: Few simplifications of code and
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Make the WCD93xx codec drivers simpler using
devm_regulator_bulk_get_enable() and obtain missing VDD_PX supply on
wcd939x.

Context depends on fixes:
https://lore.kernel.org/r/20250526-b4-b4-asoc-wcd9395-vdd-px-fixes-v1-0-0b8a2993b7d3@linaro.org
2025-06-09 16:44:04 +01:00
Geert Uytterhoeven
6ba68e5aa9
ASoC: renesas: msiof: Convert to <linux/spi/sh_msiof.h>
Convert the MSIOF I2S driver to reuse the MSIOF register and register
bit definitions in the header file shared by the MSIOF SPI driver.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/754ed54057e54effd06143e71d6cd305c3334eca.1747401908.git.geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-09 13:57:36 +01:00
Venkata Prasad Potturu
0779c0ad2a
ASoC: amd: acp: Fix pointer assignments for snd_soc_acpi_mach structures
This patch modifies the assignment of machine structure pointers in the
acp_pci_probe function. Previously, the machine pointers were assigned
using the address-of operator (&), which caused incompatibility issues
in type assignments.

Additionally, the declarations of the machine arrays in amd.h have been
updated to reflect that they are indeed arrays (`[]`). The code is
further cleaned up by declaring the codec structures in
amd-acpi-mach.c as static, reflecting their intended usage.

error: symbol 'amp_rt1019' was not declared. Should it be static?
error: symbol 'amp_max' was not declared. Should it be static?
error: symbol 'snd_soc_acpi_amd_acp_machines' was not declared. Should it be static?
error: symbol 'snd_soc_acpi_amd_rmb_acp_machines' was not declared. Should it be static?
error: symbol 'snd_soc_acpi_amd_acp63_acp_machines' was not declared. Should it be static?
error: symbol 'snd_soc_acpi_amd_acp70_acp_machines' was not declared. Should it be static?

Fixes: 9c2c0ef640 ("ASoC: amd: acp: Fix snd_soc_acpi_mach id's duplicate symbol error")

Link: https://github.com/thesofproject/linux/issues/5438
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20250609121251.639080-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-09 13:57:35 +01:00
ChiYuan Huang
1f5cdb6ab4
ASoC: codecs: Add support for Richtek RTQ9124
Add codecs driver for Richtek RTQ9124.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Link: https://patch.msgid.link/aca49d1912bfd1b90e82146df6393760a731810c.1749454717.git.cy_huang@richtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-09 12:48:16 +01:00
Edip Hazuri
a0914bf56e ALSA: hda/realtek - Add mute LED support for HP Victus 16-s1xxx and HP Victus 15-fa1xxx
The mute led on those laptops is using ALC245 but requires a quirk to work
This patch enables the existing quirk for the devices.

Tested on my Victus 16-s1011nt Laptop and my friend's Victus
15-fa1xxx. The LED behaviour works as intended.

Cc: <stable@vger.kernel.org>
Signed-off-by: Edip Hazuri <edip@medip.dev>
Link: https://patch.msgid.link/20250609075943.13934-2-edip@medip.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-09 10:11:32 +02:00
Brahmajit Das
f00de8e82c ALSA: ctxfi: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead. Use strscpy() to copy the
long name because there's no string to format with sprintf().

No functional changes intended.

Link: https://github.com/KSPP/linux/issues/88

Signed-off-by: Brahmajit Das <listout@listout.xyz>
Link: https://patch.msgid.link/20250606204000.8156-1-listout@listout.xyz
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-09 09:53:30 +02:00
Christophe Leroy
92f59aeb13 ALSA: pcm: Rewrite recalculate_boundary() to avoid costly loop
At the time being recalculate_boundary() is implemented with a
loop which shows up as costly in a perf profile, as depicted by
the annotate below:

    0.00 :   c057e934:       3d 40 7f ff     lis     r10,32767
    0.03 :   c057e938:       61 4a ff ff     ori     r10,r10,65535
    0.21 :   c057e93c:       7d 49 50 50     subf    r10,r9,r10
    5.39 :   c057e940:       7d 3c 4b 78     mr      r28,r9
    2.11 :   c057e944:       55 29 08 3c     slwi    r9,r9,1
    3.04 :   c057e948:       7c 09 50 40     cmplw   r9,r10
    2.47 :   c057e94c:       40 81 ff f4     ble     c057e940 <snd_pcm_ioctl+0xee0>

Total: 13.2% on that simple loop.

But what the loop does is to multiply the boundary by 2 until it is
over the wanted border. This can be avoided by using fls() to get the
boundary value order and shift it by the appropriate number of bits at
once.

This change provides the following profile:

    0.04 :   c057f6e8:       3d 20 7f ff     lis     r9,32767
    0.02 :   c057f6ec:       61 29 ff ff     ori     r9,r9,65535
    0.34 :   c057f6f0:       7d 5a 48 50     subf    r10,r26,r9
    0.23 :   c057f6f4:       7c 1a 50 40     cmplw   r26,r10
    0.02 :   c057f6f8:       41 81 00 20     bgt     c057f718 <snd_pcm_ioctl+0xf08>
    0.26 :   c057f6fc:       7f 47 00 34     cntlzw  r7,r26
    0.09 :   c057f700:       7d 48 00 34     cntlzw  r8,r10
    0.22 :   c057f704:       7d 08 38 50     subf    r8,r8,r7
    0.04 :   c057f708:       7f 5a 40 30     slw     r26,r26,r8
    0.35 :   c057f70c:       7c 0a d0 40     cmplw   r10,r26
    0.13 :   c057f710:       40 80 05 f8     bge     c057fd08 <snd_pcm_ioctl+0x14f8>
    0.00 :   c057f714:       57 5a f8 7e     srwi    r26,r26,1

Total: 1.7% with that loopless alternative.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://patch.msgid.link/4836e2cde653eebaf2709ebe30eec736bb8c67fd.1749202237.git.christophe.leroy@csgroup.eu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-09 09:51:47 +02:00
Lucy Thrun
ed57a3d5a3 ALSA: hda/ca0132: Enable hardware band EQ for Sound Blaster Core3D
This patch enables the Hardware DSP-based 10-band hardware equalizer on
Sound Blaster Core3D (CA0132) based cards for example the soundblaster
z and soundblaster x-ae5, allowing fine-grained audio tuning via
hardware registers.

Tested on Sound Blaster X-AE5. No regressions observed.

Signed-off-by: Lucy Thrun <lucy.thrun@digital-rabbithole.de>
Link: https://patch.msgid.link/20250603125304.507-1-lucy.thrun@digital-rabbithole.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-09 09:50:49 +02:00
Baojun Xu
9955ea2e36 ALSA: hda/tas2781: Add missed brace and hardware id re-order
This patch is do code clean and prepare for next patch,
which is relative with hardware id.

Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20250602015809.20344-1-baojun.xu@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-09 09:50:10 +02:00
Cristian Ciocaltea
79d561c4ec ALSA: usb-audio: Add mixer quirk for Sony DualSense PS5
The Sony DualSense wireless controller (PS5) features an internal mono
speaker, but it also provides a 3.5mm jack socket for headphone output
and headset microphone input.

Since this is a UAC1 device, it doesn't advertise any jack detection
capability.  However, the controller is able to report HP & MIC insert
events via HID, i.e. through a dedicated input device managed by the
hid-playstation driver.

Add a quirk to create the jack controls for headphone and headset mic,
respectively, and setup an input handler for each of them in order to
intercept the related hotplug events.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250526-dualsense-alsa-jack-v1-9-1a821463b632@collabora.com
2025-06-09 09:48:51 +02:00
Cristian Ciocaltea
9cea742559 ALSA: usb-audio: Remove unneeded wmb() in mixer_quirks
Adding a memory barrier before wake_up() in
snd_usb_soundblaster_remote_complete() is supposed to ensure the write
to mixer->rc_code is visible in wait_event_interruptible() from
snd_usb_sbrc_hwdep_read().

However, this is not really necessary, since wake_up() is just a wrapper
over __wake_up() which already executes a full memory barrier before
accessing the state of the task to be waken up.

Drop the redundant call to wmb() and implicitly fix the checkpatch
complaint:

  WARNING: memory barrier without comment

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250526-dualsense-alsa-jack-v1-8-1a821463b632@collabora.com
2025-06-09 09:48:51 +02:00
Cristian Ciocaltea
f2d6d660e8 ALSA: usb-audio: Simplify NULL comparison in mixer_quirks
Handle report from checkpatch.pl:

  CHECK: Comparison to NULL could be written "t->name"

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250526-dualsense-alsa-jack-v1-7-1a821463b632@collabora.com
2025-06-09 09:48:51 +02:00
Cristian Ciocaltea
03ddd3bdb9 ALSA: usb-audio: Avoid multiple assignments in mixer_quirks
Handle report from checkpatch.pl:

  CHECK: multiple assignments should be avoided

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250526-dualsense-alsa-jack-v1-6-1a821463b632@collabora.com
2025-06-09 09:48:51 +02:00
Cristian Ciocaltea
c0495cef8b ALSA: usb-audio: Drop unnecessary parentheses in mixer_quirks
Fix multiple 'CHECK: Unnecessary parentheses around ...' reports from
checkpatch.pl.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250526-dualsense-alsa-jack-v1-5-1a821463b632@collabora.com
2025-06-09 09:48:51 +02:00
Cristian Ciocaltea
231225d8a2 ALSA: usb-audio: Fix block comments in mixer_quirks
Address a couple of comment formatting issues indicated by
checkpatch.pl:

  WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250526-dualsense-alsa-jack-v1-4-1a821463b632@collabora.com
2025-06-09 09:48:51 +02:00
Cristian Ciocaltea
fd3ab72e42 ALSA: usb-audio: Avoid precedence issues in mixer_quirks macros
Fix all macro related issues identified by checkpatch.pl:

  CHECK: Macro argument 'x' may be better as '(x)' to avoid precedence issues

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250526-dualsense-alsa-jack-v1-3-1a821463b632@collabora.com
2025-06-09 09:48:51 +02:00
Cristian Ciocaltea
df6b4dcf2e ALSA: usb-audio: Fix whitespace & blank line issues in mixer_quirks
Address all whitespace & blank line(s) related issues reported by
checkpatch.pl:

  ERROR: trailing whitespace
  ERROR: space required after that ',' (ctx:VxV)
  WARNING: Missing a blank line after declarations
  CHECK: Please use a blank line after function/struct/union/enum declarations
  CHECK: Please don't use multiple blank lines

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250526-dualsense-alsa-jack-v1-2-1a821463b632@collabora.com
2025-06-09 09:48:51 +02:00
Cristian Ciocaltea
bca638aa73 ALSA: usb-audio: Fix code alignment in mixer_quirks
Format code to fix all alignment issues reported by checkpatch.pl:

  CHECK: Alignment should match open parenthesis

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250526-dualsense-alsa-jack-v1-1-1a821463b632@collabora.com
2025-06-09 09:48:51 +02:00
Takashi Iwai
c987a390f1 ALSA: hda/intel: Add Thinkpad E15 to PM deny list
Lenovo Thinkpad E15 with Conexant CX8070 codec seems causing ugly
noises after runtime-PM suspend.  Disable the codec runtime PM as a
workaround.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=220210
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20250608091415.21170-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-09 09:46:20 +02:00
Shenghao Ding
ac209bde01
ASoC: tas2781: Drop the unnecessary symbol imply
The unnecessary symbols for imply are SND_SOC_TAS2781_COMLIB,
SND_SOC_TAS2781_COMLIB_I2C, and SND_SOC_TAS2781_FMWLIB. They all used for
library compiling. All the symbols in the imply are used for codec driver
compiling.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20250523131111.1884-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:34:52 +01:00
Kuninori Morimoto
f4c77d5af0
ASoC: soc-dai: tidyup return value of snd_soc_xlate_tdm_slot_mask()
commit 7f1186a8d7 ("ASoC: soc-dai: check return value at
snd_soc_dai_set_tdm_slot()") checks return value of
xlate_tdm_slot_mask() (A1)(A2).

	/*
	 * ...
(Y)	 * TDM mode can be disabled by passing 0 for @slots. In this case @tx_mask,
	 * @rx_mask and @slot_width will be ignored.
	 * ...
	 */
	int snd_soc_dai_set_tdm_slot(...)
	{
		...
		if (...)
(A1)			ret = dai->driver->ops->xlate_tdm_slot_mask(...);
		else
(A2)			ret = snd_soc_xlate_tdm_slot_mask(...);
		if (ret)
			goto err;
		...
	}

snd_soc_xlate_tdm_slot_mask() (A2) will return -EINVAL if slots was 0 (X),
but snd_soc_dai_set_tdm_slot() allow to use it (Y).

(A)	static int snd_soc_xlate_tdm_slot_mask(...)
	{
		...
		if (!slots)
(X)			return -EINVAL;
		...
	}

Call xlate_tdm_slot_mask() only if slots was non zero.

Reported-by: Giedrius Trainavičius <giedrius@blokas.io>
Closes: https://lore.kernel.org/r/CAMONXLtSL7iKyvH6w=CzPTxQdBECf++hn8RKL6Y4=M_ou2YHow@mail.gmail.com
Fixes: 7f1186a8d7 ("ASoC: soc-dai: check return value at snd_soc_dai_set_tdm_slot()")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/8734cdfx59.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:34:50 +01:00
Kuninori Morimoto
039de8f598
ASoC: hdac_hdmi: remove hdac_hdmi_jack[_port]_init()
No one is using hdac_hdmi_jack[_port]_init(). Remove it and its
related functions.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87o6v3j73q.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:34:49 +01:00
Krzysztof Kozlowski
bb4a0f497b
ASoC: codecs: lpass: Drop unused AIF_INVALID first DAI identifier
All four Qualcomm SoC macro codecs define DAI IDs in an enum starting
with AIF_INVALID=0, which is nowhere used in the code thus actual DAI
IDs start from 1.  Drivers do not have their own of_xlate_dai_name(),
thus snd_soc_get_dlc() expects the DTS to start numbering DAIs from 0,
which creates confusing debugging scenario, e.g. DTS should use
<&lpass_wsamacro 2> for WSA_MACRO_AIF_VI with dai->id=3.

This also wastes some space, because drivers allocate few arrays for all
DAIs and basically the [0] is never used.

Drop the confusing first AIF_INVALID DAI identifier so the enum with DAI
IDs will start from 0.  This has little functional impact and does not
affect the ABI, except saving a few bytes of memory per driver.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250523121811.380045-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:34:48 +01:00
Cezary Rojewski
c95e925daa
ASoC: Intel: avs: Add rt5640 machine board
To support connection between Intel AudioDSP and Realek 5640 codec
implement avs_rt5640 machine board driver. The codec chip is located on
I2C bus and the streaming occurs over I2S interface. A number of such
devices can be connected simultaneously to the platform. Majority of the
board's behavior is inherited from existing representatives such as
avs_rt274.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250530142120.2944095-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:34:38 +01:00
Xinxin Wan
19f971057b
ASoC: codecs: rt5640: Retry DEVICE_ID verification
To be more resilient to codec-detection failures when the hardware
powers on slowly, add retry mechanism to the device verification check.
Similar pattern is found throughout a number of Realtek codecs. Our
tests show that 60ms delay is sufficient to address readiness issues on
rt5640 chip.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Xinxin Wan <xinxin.wan@intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250530142120.2944095-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:34:37 +01:00
Cezary Rojewski
cecec195b2
ASoC: codecs: rt5640: Drop dummy register names
Registers 0xfa and 0xfb represent "General Control 1" and "General
Control 2" respectively.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250530142120.2944095-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:34:36 +01:00
Pei Xiao
03b778d199
ASOC: rockchip: Use helper function devm_clk_get_enabled()
Since commit 7ef9651e97 ("clk: Provide new devm_clk helpers for prepared
and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be
replaced by devm_clk_get_enabled() when driver enables the clocks for the
whole lifetime of the device. Moreover, it is no longer necessary to
unprepare and disable the clocks explicitly.

Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
Acked-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Tested-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Link: https://patch.msgid.link/84bc40641d05596f1edf4f01d1e6aea16bdbeeb5.1749201126.git.xiaopei01@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:34:24 +01:00
Pei Xiao
5dc302d008
ASOC: rockchip: fix capture stream handling in rockchip_sai_xfer_stop
Correcting the capture stream handling which was incorrectly setting
playback=true for capture streams.

The original code mistakenly set playback=true for capture streams,
causing incorrect behavior.

Fixes: cc78d1eaab ("ASoC: rockchip: add Serial Audio Interface (SAI) driver")
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
Tested-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Acked-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Link: https://patch.msgid.link/c374aae92c177aaf42c0f1371eccdbc7e9615786.1749201126.git.xiaopei01@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:34:23 +01:00
Bram Vlerick
c2bde4666d
ASoC: tas571x: add support for tas5753
Add support for tas5753, device is similar to tas5733 but with added
headphone / line driver.

Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
Link: https://patch.msgid.link/20250528-asoc-tas5753-support-v1-1-a50c3f6734ee@openpixelsystems.org
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:34:20 +01:00
Krzysztof Kozlowski
b9ecde0bcf
ASoC: codecs: wcd939x: Add VDD_PX supply
Device has also VDD_PX supply, which should be acquired by the driver.
Regulator framework will provide a dummy supply, thus the change is
compatible with older DTS.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250526-b4-asoc-wcd9395-vdd-px-v1-6-64d3cb60313b@linaro.org
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:33:32 +01:00
Krzysztof Kozlowski
1a134881a8
ASoC: codecs: wcd939x: Simplify return from devm_gpiod_get() error
No need to store devm_gpiod_get() error code in temporary variable.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250526-b4-asoc-wcd9395-vdd-px-v1-4-64d3cb60313b@linaro.org
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:33:30 +01:00
Krzysztof Kozlowski
cc50d176d0
ASoC: codecs: wcd939x: Simplify with devm_regulator_bulk_get_enable()
Drop separate regulator get and enable in probe() path with
devm_regulator_bulk_get_enable(), which simplifies cleanup paths and
device remove().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250526-b4-asoc-wcd9395-vdd-px-v1-3-64d3cb60313b@linaro.org
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:33:29 +01:00
Krzysztof Kozlowski
a7ee107c2d
ASoC: codecs: wcd938x: Simplify with devm_regulator_bulk_get_enable()
Drop separate regulator get and enable in probe() path with
devm_regulator_bulk_get_enable(), which simplifies cleanup paths and
device remove().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250526-b4-asoc-wcd9395-vdd-px-v1-2-64d3cb60313b@linaro.org
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:33:28 +01:00
Krzysztof Kozlowski
10cf8f6be6
ASoC: codecs: wcd937x: Simplify with devm_regulator_bulk_get_enable()
Drop separate regulator get and enable in probe() path with
devm_regulator_bulk_get_enable(), which simplifies cleanup paths and
device remove().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250526-b4-asoc-wcd9395-vdd-px-v1-1-64d3cb60313b@linaro.org
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:33:28 +01:00
Kuninori Morimoto
267be32b0a
ASoC: remove component->id
No one is using component->id.
One idea is we can re-use it as serial number for component.
But we have no usage, so far. Let's just remove it for now.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/877c1suuna.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:31:03 +01:00
Kuninori Morimoto
6ada7351af
ASoC: soc-core: save ID if param was set in fmt_single_name()
fmt_single_name() requests "ind *id" and not allow NULL for it.
But sometimes we don't need it. Allow NULL.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/878qm8uunz.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:31:02 +01:00
Srinivas Kandagatla
8167f4f425
ASoC: qcom: use drvdata instead of component to keep id
Qcom lpass is using component->id to keep DAI ID (A).

(S)	static int lpass_platform_pcmops_open(
				sruct snd_soc_component *component,
				struct snd_pcm_substream *substream)
	{			                          ^^^^^^^^^(B0)
		...
(B1)		struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream);
(B2)		struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_runtime, 0);
		...
(B3)		unsigned int dai_id = cpu_dai->driver->id;

(A)		component->id = dai_id;
		...
	}

This driver can get dai_id from substream (B0 - B3).
In this driver, below functions get dai_id from component->id (A).

(X)	lpass_platform_pcmops_suspend()
(Y)	lpass_platform_pcmops_resume()
(Z)	lpass_platform_copy()

Here, (Z) can get it from substream (B0 - B3), don't need to use
component->id (A). On suspend/resume (X)(Y), dai_id can only be obtained
from component->id (A), because there is no substream (B0) in function
parameter.

But, component->id (A) itself should not be used for such purpose.
It is intilialized at snd_soc_component_initialize(), and parsed its ID
(= component->id) from device name (a).

	int snd_soc_component_initialize(...)
	{
		...
		if (!component->name) {
(a)			component->name = fmt_single_name(dev, &component->id);
			...                                     ^^^^^^^^^^^^^
		}
		...
	}

Unfortunately, current code is broken to start with.

There are many regmaps that the driver cares about, however its only
managing one (either dp or i2s) in component suspend/resume path.

I2S regmap is mandatory however other regmaps are setup based on flags
like "hdmi_port_enable" and "codec_dma_enable".

Correct thing for suspend/resume path to handle is by checking these
flags, instead of using component->id.

Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
Suggested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87a56ouuob.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:31:01 +01:00
Ai Chao
111a2c8ab4
ASoC: imx-card: Use helper function for_each_child_of_node_scoped()
The for_each_child_of_node_scoped() helper provides a scope-based
clean-up functionality to put the device_node automatically, and
as such, there is no need to call of_node_put() directly.

Signed-off-by: Ai Chao <aichao@kylinos.cn>
Link: https://patch.msgid.link/20250603055109.3154061-5-aichao@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:30:50 +01:00
Ai Chao
618abc785e
ASoC: meson: Use helper function for_each_child_of_node_scoped()
The for_each_child_of_node_scoped() helper provides a scope-based
clean-up functionality to put the device_node automatically, and
as such, there is no need to call of_node_put() directly.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505210557.EpJig9BQ-lkp@intel.com/
Signed-off-by: Ai Chao <aichao@kylinos.cn>
Link: https://patch.msgid.link/20250603055109.3154061-4-aichao@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:30:49 +01:00
Ai Chao
077caf1d17
ASoC: renesas: Use helper function for_each_child_of_node_scoped()
The for_each_child_of_node_scoped() helper provides a scope-based
clean-up functionality to put the device_node automatically, and
as such, there is no need to call of_node_put() directly.

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Ai Chao <aichao@kylinos.cn>
Link: https://patch.msgid.link/20250603055109.3154061-3-aichao@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:30:48 +01:00
Krzysztof Kozlowski
ece5d88100
ASoC: codecs: wcd939x: Drop unused 'struct wcd939x_priv' fields
'wcd_regmap_irq_chip' and 'jack' in 'struct wcd939x_priv' are not used
at all.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20250528-asoc-const-unused-v1-8-19a5d07b9d5c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:30:36 +01:00
Krzysztof Kozlowski
ff228b6b9e
ASoC: codecs: wcd938x: Drop unused variant field
Member wcd938x_priv.variant is assigned in probe() function and used
immediately thereafter, thus it can be just a local variable for less
variables stored in 'struct wcd938x_priv' device-wide state.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20250528-asoc-const-unused-v1-7-19a5d07b9d5c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:30:35 +01:00
Krzysztof Kozlowski
fd32bd4467
ASoC: codecs: wcd938x: Drop unused 'struct wcd938x_priv' fields
'wcd_regmap_irq_chip' and 'jack' in 'struct wcd938x_priv' are not used
at all.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20250528-asoc-const-unused-v1-6-19a5d07b9d5c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:30:34 +01:00
Krzysztof Kozlowski
87a2270fd1
ASoC: codecs: wcd937x: Drop unused 'struct wcd937x_priv' fields
'wcd_regmap_irq_chip' and 'jack' in 'struct wcd937x_priv' are not used
at all.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20250528-asoc-const-unused-v1-5-19a5d07b9d5c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:30:33 +01:00
Krzysztof Kozlowski
9afc53569d
ASoC: codecs: wcd934x: Drop unused num_rx_port/num_tx_port fields
Members wcd934x_codec.num_rx_port and num_tx_port are not read anywhere
after assignment, so they can be safely dropped.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20250528-asoc-const-unused-v1-4-19a5d07b9d5c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:30:32 +01:00
Krzysztof Kozlowski
620d968700
ASoC: codecs: wcd9335: Drop unused sido_input_src field
Member wcd9335_codec.sido_input_src is not read anywhere after
assignment, so it can be safely dropped.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20250528-asoc-const-unused-v1-3-19a5d07b9d5c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:30:31 +01:00
Krzysztof Kozlowski
239dab898b
ASoC: fsl: Constify reg_default array
Static 'struct reg_default' array is not modified so can be changed to
const for more safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250528-asoc-const-unused-v1-2-19a5d07b9d5c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:30:30 +01:00
Krzysztof Kozlowski
0045b902ad
ASoC: codecs: Constify regmap configuration static variables
Static arrays/structs for regmap configuration like 'struct
reg_default', 'struct reg_sequence' and others are not modified so can
be changed to const for more safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20250528-asoc-const-unused-v1-1-19a5d07b9d5c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:30:30 +01:00
Luca Weiss
e6e8897995
ASoC: qcom: sm8250: Add Fairphone 5 soundcard compatible
Add a compatible for the QCM6490-based Fairphone 5 which can use this
machine driver.

As a note, QCM6490 RB3 board is using audioreach architecture while
Fairphone 5 uses pre-audioreach.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://patch.msgid.link/20250507-fp5-dp-sound-v4-4-4098e918a29e@fairphone.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:30:19 +01:00
Luca Weiss
ed82808c6a
ASoC: qcom: sm8250: add DisplayPort Jack support
Add support for DisplayPort Jack events, so that user space can
configure the audio routing correctly.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20250507-fp5-dp-sound-v4-3-4098e918a29e@fairphone.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:30:18 +01:00
Luca Weiss
c4b79a2fbf
ASoC: qcom: sm8250: set card driver name from match data
Sound machine drivers for Qualcomm SoCs can be reused across multiple
SoCs. But user space ALSA UCM files depend on the card driver name which
should be set per board/SoC.

Allow such customization by using driver match data as sound card driver
name. The QRB4210 RB2 gets its name set to "sm4250" as requested by
Srinivas Kandagatla, and since no (known) UCM has been written yet this
should not break anything.

Also while we're already touching these lines, sort the compatibles
alphabetically.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20250507-fp5-dp-sound-v4-2-4098e918a29e@fairphone.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:30:17 +01:00
Huacai Chen
a4e469c1e2
ASoC: loongson: Fix build warnings about export.h
After commit 25704938c86d7b2 ("scripts/misc-check: check missing #include
<linux/export.h> when W=1") and 1239f681359926101e ("scripts/misc-check:
check unnecessary #include <linux/export.h> when W=1"), we get some build
warnings with W=1:

sound/soc/loongson/loongson_i2s.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing

So fix these build warnings for ASoC/Loongson.

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://patch.msgid.link/20250608142737.168829-1-chenhuacai@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:29:06 +01:00
Zhang Yi
b44b269400
ASoC: codecs: ES8326: Modify initialization configuration
Modify the value of ES8326_SDINOUT1_IO in the initialization

Signed-off-by: Zhang Yi <zhangyi@everest-semi.com>
Link: https://patch.msgid.link/20250604061821.2678-1-zhangyi@everest-semi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:29:05 +01:00
Harshit Mogalapalli
22188b9df6
ASoC: cs48l32: Fix a signedness bug in cs48l32_hw_params()
There is a type promotion that can happen when freq(u32) variable is
comapared with sclk_target(integer), when sclk_target is a negative
value it promotes to a large postive integer which might not be a
problem in this particular case as the condition evaluates to false
when that happens, but bail out early when sclk_target has negative
error codes.

	cs48l32_sclk_rates[i].freq >= sclk_target

Fix this by adding a negative error check when
snd_soc_tdm_params_to_bclk() fails

Fixes: e2bcbf99d0 ("ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSP")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://patch.msgid.link/20250603214813.197346-1-harshit.m.mogalapalli@oracle.com
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08 23:29:04 +01:00
Ingo Molnar
41cb08555c treewide, timers: Rename from_timer() to timer_container_of()
Move this API to the canonical timer_*() namespace.

[ tglx: Redone against pre rc1 ]

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/aB2X0jCKQO56WdMt@gmail.com
2025-06-08 09:07:37 +02:00
Linus Torvalds
af477f4d5a sound fixes for 6.16-rc1
A collection of fix patches for 6.16-rc1 merge window.
 Most of changes are about ASoC, especially lots of AVS driver fixes.
 Larger LOCs are seen in TAS571x codec drivers, but the changes are
 trivial and safe.  The rest are all device-specific small fixes.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmhD9KAOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE9N+g/+OmjHUQ4coYPAdb5NOoH/9n92N8Tq6xZXwlFq
 ISgTjcpojCiNH2qj6/0i9TBDMTUbt/QOghTfpCy2ikLIRLsym50ZUMvI5JkpH5P7
 Z8lWnf0vQGJDbCdrPaWsn7mUEAd3mWSnsEb39Dr+wQ6fv3TASXFb8DvO6p+YD3aU
 EaTnYDDBm3OCZpLMQfahynqiTA5f8AcbGHsrvsUM6xZ3FiZUIgvW8XTKm21XvYUQ
 nxLl0xzygpu+iSA10hTI/aP9c3tOT7B0Wq7BA8UtQBkLUgtqkaSXKmgqJpcF3QSk
 yKLyZP0zBW3bo8Q+jEvnpBzfUuMdWR0uBlNKxXDsWNJZxwnXfGsjK0nJ+qXuCMLT
 YWEVsLhm/L/fWObZkn7kivY8NMxJFqsgYoj7e1CYIsHTlW/rDkzoPVI0zATuZOOp
 fR65VxVb+b0Q/E14xKjXfczS3jUUPpGMVC86lW8pa3la2G71tyCdtOUKOkoJRKEj
 1YqYtkyu5JlQ5FeKG6tz05CiUALKeaC0KoVpf44/tGAdxxk8+vwNXxxPfJhVJgeY
 5A9eof5xPdTv5vGBpAHTUCyP3uhLLfBWyptpoQYilkij0yaKSj1tBhSdHirjSdNn
 uHGeEq8zN/h7RGZcAZE0r7VQEIeJJAqlUvKmczuns+74aVB9ZD2bbEVLFQrlMz3w
 u+BN26Y=
 =T+Ix
 -----END PGP SIGNATURE-----

Merge tag 'sound-fix-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A collection of fix patches for the 6.16-rc1 merge window.

  Most of changes are about ASoC, especially lots of AVS driver fixes.
  Larger LOCs are seen in TAS571x codec drivers, but the changes are
  trivial and safe. The rest are all device-specific small fixes"

* tag 'sound-fix-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (27 commits)
  ASoC: Intel: avs: boards: Fix rt5663 front end name
  ASoC: Intel: avs: Simplify verification of parse_int_array() result
  ALSA: usb-audio: Add implicit feedback quirk for RODE AI-1
  ALSA: hda: Ignore unsol events for cards being shut down
  ALSA: hda: Add new pci id for AMD GPU display HD audio controller
  ALSA: hda: cs35l41: Constify regmap_irq_chip
  ALSA: usb-audio: Add a quirk for Lenovo Thinkpad Thunderbolt 3 dock
  ASoC: ti: omap-hdmi: Re-add dai_link->platform to fix card init
  ASoC: pcm: Do not open FEs with no BEs connected
  ASoC: rt1320: fix speaker noise when volume bar is 100%
  ASoC: Intel: avs: Include missing string.h
  ASoC: Intel: avs: Verify content returned by parse_int_array()
  ASoC: Intel: avs: Verify kcalloc() status when setting constraints
  ASoC: Intel: avs: Fix paths in MODULE_FIRMWARE hints
  ASoC: Intel: avs: Fix possible null-ptr-deref when initing hw
  ASoC: Intel: avs: Fix PPLCxFMT calculation
  ASoC: Intel: avs: Fix deadlock when the failing IPC is SET_D0IX
  ASoC: codecs: hda: Fix RPM usage count underflow
  ASoC: amd: yc: Add support for Lenovo Yoga 7 16ARP8
  ASoC: tas571x: fix tas5733 num_controls
  ...
2025-06-07 09:40:08 -07:00
Linus Torvalds
c0c9379f23 USB/Thunderbolt changes for 6.16-rc1
Here is the big set of USB and Thunderbolt changes for 6.16-rc1.
 Included in here are the following:
   - USB offload support for audio devices.  I think this takes the
     record for the most number of patch series (30+) over the longest
     period of time (2+ years) to get merged properly.  Many props go to
     Wesley Cheng for seeing this effort through, they took a major
     out-of-tree hacked-up-monstrosity that was created by multiple
     vendors for their specific devices, got it all merged into a
     semi-coherent set of changes, and got all of the different major
     subsystems to agree on how this should be implemented both with
     changes to their code as well as userspace apis, AND wrangled the
     hardware companies into agreeing to go forward with this, despite
     making them all redo work they had already done in their private
     device trees.  This feature offers major power savings on embedded
     devices where a USB audio stream can continue to flow while the rest
     of the system is sleeping, something that devices running on battery
     power really care about.  There are still some more small tweaks
     left to be done here, and those patches are still out for review and
     arguing among the different hardware companies, but this is a major
     step forward and a great example of how to do upstream development
     well.
   - small number of thunderbolt fixes and updates, things seem to be
     slowing down here (famous last words...)
   - xhci refactors and reworking to try to handle some rough corner
     cases in some hardware implementations where things don't always
     work properly
   - typec driver updates
   - USB3 power management reworking and updates
   - Removal of some old and orphaned UDC gadget drivers that had not
     been used in a very long time, dropping over 11 thousand lines from
     the tree, always a nice thing, making up for the 12k lines added for
     the USB offload feature.
   - lots of little updates and fixes in different drivers
 
 All of these have been in linux-next for over 2 weeks, the USB offload
 logic has been in there for 8 weeks now, with no reported issues
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCaEKnpA8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ym3zQCgz+Oz3DHfLcYOX7evGI2PjI4GNMkAoJa6Kndw
 h4YgL+8MeBpKuHCQvxy8
 =KVAn
 -----END PGP SIGNATURE-----

Merge tag 'usb-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB / Thunderbolt updates from Greg KH:
 "Here is the big set of USB and Thunderbolt changes for 6.16-rc1.
  Included in here are the following:

   - USB offload support for audio devices.

     I think this takes the record for the most number of patch series
     (30+) over the longest period of time (2+ years) to get merged
     properly.

     Many props go to Wesley Cheng for seeing this effort through, they
     took a major out-of-tree hacked-up-monstrosity that was created by
     multiple vendors for their specific devices, got it all merged into
     a semi-coherent set of changes, and got all of the different major
     subsystems to agree on how this should be implemented both with
     changes to their code as well as userspace apis, AND wrangled the
     hardware companies into agreeing to go forward with this, despite
     making them all redo work they had already done in their private
     device trees.

     This feature offers major power savings on embedded devices where a
     USB audio stream can continue to flow while the rest of the system
     is sleeping, something that devices running on battery power really
     care about. There are still some more small tweaks left to be done
     here, and those patches are still out for review and arguing among
     the different hardware companies, but this is a major step forward
     and a great example of how to do upstream development well.

   - small number of thunderbolt fixes and updates, things seem to be
     slowing down here (famous last words...)

   - xhci refactors and reworking to try to handle some rough corner
     cases in some hardware implementations where things don't always
     work properly

   - typec driver updates

   - USB3 power management reworking and updates

   - Removal of some old and orphaned UDC gadget drivers that had not
     been used in a very long time, dropping over 11 thousand lines from
     the tree, always a nice thing, making up for the 12k lines added
     for the USB offload feature.

   - lots of little updates and fixes in different drivers

  All of these have been in linux-next for over 2 weeks, the USB offload
  logic has been in there for 8 weeks now, with no reported issues"

* tag 'usb-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (172 commits)
  ALSA: usb-audio: qcom: fix USB_XHCI dependency
  ASoC: qdsp6: fix compile-testing without CONFIG_OF
  usb: misc: onboard_usb_dev: fix build warning for CONFIG_USB_ONBOARD_DEV_USB5744=n
  usb: typec: tipd: fix typo in TPS_STATUS_HIGH_VOLAGE_WARNING macro
  USB: typec: fix const issue in typec_match()
  USB: gadget: udc: fix const issue in gadget_match_driver()
  USB: gadget: fix up const issue with struct usb_function_instance
  USB: serial: pl2303: add new chip PL2303GC-Q20 and PL2303GT-2AB
  USB: serial: bus: fix const issue in usb_serial_device_match()
  usb: usbtmc: Fix timeout value in get_stb
  usb: usbtmc: Fix read_stb function and get_stb ioctl
  ALSA: qc_audio_offload: try to reduce address space confusion
  ALSA: qc_audio_offload: avoid leaking xfer_buf allocation
  ALSA: qc_audio_offload: rename dma/iova/va/cpu/phys variables
  ALSA: usb-audio: qcom: Fix an error handling path in qc_usb_audio_probe()
  usb: misc: onboard_usb_dev: Fix usb5744 initialization sequence
  dt-bindings: usb: ti,usb8041: Add binding for TI USB8044 hub controller
  usb: misc: onboard_usb_dev: Add support for TI TUSB8044 hub
  usb: gadget: lpc32xx_udc: Use USB API functions rather than constants
  usb: gadget: epautoconf: Use USB API functions rather than constants
  ...
2025-06-06 12:45:35 -07:00
Linus Torvalds
a479ebb269 soundwire updates for 6.16
Couple of small core changes for
  - sdw_assign_device_num() logic simplification, using internal slave id
    for irqs and optimizing computing of port params in specific stream
    states
  - Intel driver updates for ACE3+ microphone privacy status reporting
    and enabling the status in HDA Intel driver
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmhBMgcACgkQfBQHDyUj
 g0elyQ/8CqVJ4y6M1i2MgV+efGewspmvzt2WM9a82LA1wzSz668YxEaa50aplWwh
 c2jqqL702zOsbH5gX+H31tDM0wuder9zn5qxQML4JCUbw/Ec7cQSUOeVse+v9Rbg
 Fnb5MdxGXShSnOMjXA+H6JZ4Kt2TF759Q3wd4dmba0VBTIasVtyxW/qhFT997bJp
 SziLBT38dEG3WOBf8I+4qPsDg6NfJtUsn8H3oMJBD4ng8/uTD1BR5GZp3YsyH5X8
 2najQHVUFfGhWM8jLAniBZUBjeAMpGcKHjZxbKiizO3gGrCmetVao3PD1L0WYJP7
 macqODWQ+C3JGuk8aEvrgQ5YZpls/DF1BJDxABmq9u+8IYPFYTKzQdA+YKOmQPGB
 zli+F/GgBT5fCBIDb1UzZxGf5NC/mRN50eTPkd8ZnN2lA+OAsJs6Bnzh8c9BdMqY
 9haG0kY6sgDQVy1f3SSDI+JwAOEecVi6x6jhXKWdc++JyXEL57L3njHeXNA7kd+K
 esDQREVYXZ9Te17g1CL2/uQSWi/nMbPGQ0bPr0Y6CMzbMom1EguUE1FzPpIgct9K
 +3qPs9h6g2zUaUW0CtY1e0WGWUEG/XzBw8OHvTem4320yiSVSnhgF7QTtA4N+nIz
 cH870V3S8enqKU0V6HqDA5kwvfhh1SS8K1wnkRhFGDC3m/nhlRA=
 =izGg
 -----END PGP SIGNATURE-----

Merge tag 'soundwire-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire

Pull soundwire updates from Vinod Koul:
 "A couple of small core changes and an Intel driver change:

   - sdw_assign_device_num() logic simplification, using internal slave
     id for irqs and optimizing computing of port params in specific
     stream states

   - Intel driver updates for ACE3+ microphone privacy status reporting
     and enabling the status in HDA Intel driver"

* tag 'soundwire-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
  soundwire: only compute port params in specific stream states
  ASoC: SOF: Intel: hda: Set the mic_privacy flag for soundwire with ACE3+
  soundwire: intel: Add awareness of ACE3+ microphone privacy
  soundwire: bus: Add internal slave ID and use for IRQs
  soundwire: bus: Simplify sdw_assign_device_num()
2025-06-05 08:07:24 -07:00
Takashi Iwai
10db952852 ASoC: Fixes for v6.16
A bunch of fixes, including a big batch for the Intel AVS driver, and
 one new device ID.  It's all device specific.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmhALmUACgkQJNaLcl1U
 h9CQ3gf/eBmbd/G0CiooTGpornoFRj1GAT1SWr05cT8qEZ1v03mf57AEX8DTTW2o
 SUpkIdYhiJByF5BPlxIB2PdljpweRUc3uwfequeHu6WdVP2tgvB824IN1c6v5ymR
 LMsFxGvfCZTz+S/hqlzmMCE0qm3pZrjsKccK8rmCePBGbjWvWYntYOy3h+EoQWPi
 +EFnUw2sU80e8VX5UJFrMP9YHEv2/xr6QGkYRT+SsEyPWs/DyfVjdMo/SBVH6VAC
 jLNour0FlPcvLN9m/yWdv1n7rq1Q3sOQ/Cl0ORMggmDs6r8Csaea9D+RIUK4+dFv
 qLK7/Wepkjw3R5dnfnW4b6ZfSj1bKw==
 =o11g
 -----END PGP SIGNATURE-----

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

ASoC: Fixes for v6.16

A bunch of fixes, including a big batch for the Intel AVS driver, and
one new device ID.  It's all device specific.
2025-06-05 09:35:24 +02:00
Amadeusz Sławiński
b7188a1c0d
ASoC: Intel: avs: boards: Fix rt5663 front end name
Fix copy paste mistake in board name.

Fixes: f1e282c333 ("ASoC: Intel: avs: boards: Change rt5663 card name")
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/20250603145244.871239-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-03 17:04:32 +01:00
Cezary Rojewski
065a651e2f
ASoC: Intel: avs: Simplify verification of parse_int_array() result
The function return either success or an error code, no need to involve
'<' operator.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250530141025.2942936-9-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-03 12:06:04 +01:00
Mark Brown
b3f3ca04ec
ASoC: Intel: avs: Set of functional fixes
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

Medium range of fixes all avs-driver related. The most important fixes
lead the way:

1. For ASoC-hda codec driver, existing RPM manipulation in
hda_codec_probe_complete()'s error path is superfluous and leads to RPM
usage count underflow if the probe exists early e.g.: build-controls
operation fails.

2. Resolve deadlock when DSP-recovery is a consequence of SET_D0IX IPC.
The procedure handling IPC timeouts and EXCEPTION_CAUGHT notification
shall cancel any D0IX work before proceeding with DSP recovery. If
SET_D0IX called from delayed_work is the failing IPC the procedure will
deadlock.

3. LINK format (PPLCxFMT) calculation is incorrect.
HDAudio transfer types utilize SDxFMT for front-end (HOST) and PPLCxFMT
for back-end (LINK) side when setting up the stream. BE's
substream->runtime duplicates FE runtime so switch to using BE's
hw_params to address incorrect format values on the LINK side when FE
and BE formats differ.

Below three patches address problems found by Coverity static analyzer:
  ASoC: Intel: avs: Fix possible null-ptr-deref when initing hw
  ASoC: Intel: avs: Verify kcalloc() status when setting constraints
  ASoC: Intel: avs: Verify content returned by parse_int_array()

While unlikely in runtime, it's good to keep code resilient. The last
few patches are readability/cohesiveness improvements.
2025-06-02 16:51:02 +01:00