Commit Graph

10823 Commits

Author SHA1 Message Date
Takashi Iwai
1d68ba24a7 ALSA: ak4531: 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-44-tiwai@suse.de
2025-07-11 09:53:17 +02:00
Takashi Iwai
48102e3220 ALSA: ad1889: 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-43-tiwai@suse.de
2025-07-11 09:53:17 +02:00
Takashi Iwai
c9b7c4b628 ALSA: ac97: 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-42-tiwai@suse.de
2025-07-11 09:53:16 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Cezary Rojewski
3f100f524e ALSA: hda: Ignore unsol events for cards being shut down
For the classic snd_hda_intel driver, codec->card and bus->card point to
the exact same thing. When snd_card_diconnect() fires, bus->shutdown is
set thanks to azx_dev_disconnect(). card->shutdown is already set when
that happens but both provide basically the same functionality.

For the DSP snd_soc_avs driver where multiple codecs are located on
multiple cards, bus->shutdown 'shortcut' is not sufficient. One codec
card may be unregistered while other codecs are still operational.
Proper check in form of card->shutdown must be used to verify whether
the codec's card is being shut down.

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/20250530141309.2943404-1-cezary.rojewski@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-02 16:48:55 +02:00
Vijendar Mukunda
ab72bfce76 ALSA: hda: Add new pci id for AMD GPU display HD audio controller
Add new pci id for AMD GPU display HD audio controller(device id- 0xab40).

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patch.msgid.link/20250529053838.2350071-1-Vijendar.Mukunda@amd.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-02 16:45:39 +02:00
Krzysztof Kozlowski
9a4e17b596 ALSA: hda: cs35l41: Constify regmap_irq_chip
Static 'struct regmap_irq_chip' 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/20250528194402.567062-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-06-02 16:44:48 +02:00
Linus Torvalds
a9e6060bb2 sound updates for 6.16-rc1
We've received a lot of activities in this cycle, mostly about leaf
 driver codes rather than the core part, but with a good mixture of
 code cleanups and new driver additions.  Below are some highlights:
 
 * ASoC:
 - Support for automatically enumerating DAIs from standards conforming
   SoundWire SDCA devices; not much used as of this writing, rather for
   future implementations
 - Conversion of quite a few drivers to newer GPIO APIs
 - Continued cleanups and helper usages in allover places
 - Support for a wider range of Intel AVS platforms
 - Support for AMD ACP 7.x platforms, Cirrus Logic CS35L63 and CS48L32
   Everest Semiconductor ES8375 and ES8389, Longsoon-1 AC'97
   controllers, nVidia Tegra264, Richtek ALC203 and RT9123 and Rockchip
   SAI controllers
 
 * HD-audio:
 - Lots of cleanups of TAS2781 codec drivers
 - A new HD-audio control bound via ACPI for Nvidia
 - Support for Tegra264, Intel WCL, usual new codec quirks
 
 * USB-audio:
 - Fix a race at removal of MIDI device
 - Pioneer DJM-V10 support, Scarlett2 driver cleanups
 
 * Misc:
 - Cleanups of deprecated PCI functions
 - Removal of unused / dead function codes
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmg0KfoOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE/Opg/9H5ZaQpuSj9z5YiG6q3gNzy7lsfcvCqoAqgLW
 w9tVo5cXFH7t9+9EZUhB73sxI0VWNJsF83l+vnMqxCn/SkUzey3CPThiGQuhJtjh
 oRsqeTxxhuHjOXDapnbHJ2r9rMoAqmnabATdQYKKkYZEV8bBeBQQWFLNGtoBCE24
 xmIsyvM7lycOTZaf43uUQVJNqV86ZxV78y7Zoit5l11iZZY78j0c7i7naxSHd+Vr
 WVsxd90urSHBo6EsXyHMtaqBrWLTQmhA5v9UU0k6wm7DLKrNmb1fUo0vQlKk/EXn
 VipFz6V90IzHRbti6nZefSi2UjwaTneHa+FTspPZjOPG19q+h4MCF0s1gUNou6YG
 nqSLU+T37TEZeWpNurhiAwDNKax3/F4Pt7Hz+u4pMcnx25bNvKCb5LMgNU9l9stV
 Ar9X4rC5zfqdSsHTFOUgndV+GilqTgUk2efCW89fH2BmkZGM4Xd0JRp+xy2ECvzl
 RQq4PPvKcqt0/9GphLkLhpQCh5rWpXahVsmxH7GVrtMUlvRYd+FbKUrlalwOfJqE
 j8SJLQKe3yHztH+AXIaIigLaDA0qtCGjnEGSokKGXmCdFH1Pmdm+mnrPFw/wrCXv
 9uvWZvEAhqP5TiH5n8Yw50n8p4X7IDNBALeKFukQVi7qKV4R/aYWN1IaQMoZfVUZ
 duVWPZg=
 =ApEf
 -----END PGP SIGNATURE-----

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

Pull sound updates from Takashi Iwai:
 "We've received a lot of activities in this cycle, mostly about leaf
  driver codes rather than the core part, but with a good mixture of
  code cleanups and new driver additions. Below are some highlights:

  ASoC:
   - Support for automatically enumerating DAIs from standards
     conforming SoundWire SDCA devices; not much used as of this
     writing, rather for future implementations
   - Conversion of quite a few drivers to newer GPIO APIs
   - Continued cleanups and helper usages in allover places
   - Support for a wider range of Intel AVS platforms
   - Support for AMD ACP 7.x platforms, Cirrus Logic CS35L63 and CS48L32
     Everest Semiconductor ES8375 and ES8389, Longsoon-1 AC'97
     controllers, nVidia Tegra264, Richtek ALC203 and RT9123 and
     Rockchip SAI controllers

  HD-audio:
   - Lots of cleanups of TAS2781 codec drivers
   - A new HD-audio control bound via ACPI for Nvidia
   - Support for Tegra264, Intel WCL, usual new codec quirks

  USB-audio:
   - Fix a race at removal of MIDI device
   - Pioneer DJM-V10 support, Scarlett2 driver cleanups

  Misc:
   - Cleanups of deprecated PCI functions
   - Removal of unused / dead function codes"

* tag 'sound-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (364 commits)
  firmware: cs_dsp: Fix OOB memory read access in KUnit test
  ASoC: codecs: add support for ES8375
  ASoC: dt-bindings: Add Everest ES8375 audio CODEC
  ALSA: hda: acpi: Make driver's match data const static
  ALSA: hda: acpi: Use SYSTEM_SLEEP_PM_OPS()
  ALSA: atmel: Replace deprecated strcpy() with strscpy()
  ALSA: core: fix up bus match const issues.
  ASoC: wm_adsp: Make cirrus_dir const
  ASoC: tegra: Tegra264 support in isomgr_bw
  ASoC: tegra: AHUB: Add Tegra264 support
  ASoC: tegra: ADX: Add Tegra264 support
  ASoC: tegra: AMX: Add Tegra264 support
  ASoC: tegra: I2S: Add Tegra264 support
  ASoC: tegra: Update PLL rate for Tegra264
  ASoC: tegra: ASRC: Update ARAM address
  ASoC: tegra: ADMAIF: Add Tegra264 support
  ASoC: tegra: CIF: Add Tegra264 support
  dt-bindings: ASoC: Document Tegra264 APE support
  dt-bindings: ASoC: admaif: Add missing properties
  ASoC: dt-bindings: audio-graph-card2: reference audio-graph routing property
  ...
2025-05-27 15:05:18 -07:00
Linus Torvalds
5e8bbb2caa Another set of timer API cleanups:
- Convert init_timer*(), try_to_del_timer_sync() and
    destroy_timer_on_stack() over to the canonical timer_*() namespace
    convention.
 
 There are is another large converstion pending, which has not been included
 because it would have caused a gazillion of merge conflicts in next. The
 conversion scripts will be run towards the end of the merge window and a
 pull request sent once all conflict dependencies have been merged.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmgzgTkTHHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYodwVD/97rF1Juqm1JZNIZPN/vMqwCxRoUkc6
 tsK0+UC7UXusuJadxJ+Bsv25iPF+qejnThMU+SQ5yTVj/PNfxOe0WPdCEGGiL8Ye
 2JCk6GqSOB/360SlLmtR1B1xHDwsuuUcQTz0w57CH66HRV5vpoWSMSwj/ypy+8nU
 PlgjItaxdCKa9NJ+SUJZPWIxRkt/PsA1kwlV1OcxkgB++IiIHQEbPxECq9mlzWXF
 b4Sq/Sdf2OmEePN+DYoey4fneRwJnkjkeX/o+CqosCPHRIiWUlSu5W/lU5IYojM3
 s3XpMNNg/z8PMXR4JA2VaPYWLUZyBOs+3dM7Y6Am+z55EoxMxfzg6pGx2tfM4ftl
 vF8wG3Z1c9MmpLk+P9LatNvfHeVLNve8KgOLa5phMDQ/El/a8KqLu6HmRDPONvKp
 d6iXdPq1CP8P6jOtlFfzLmKPShgEcp+Zz9W3CaQR/0ZJEsEqrpKOLzdT86hJhBV0
 mBCdzixmGtKAh0BdPdmg2FCLScqER3HKIJhZSdV8I+jSETIHCuMiIfbMXR7iwm/H
 R1/ayvxrbc1mPseo28scqvo7m6cn5BFBxIUf4Sokp52ZCapz1v2aWzo4vHI0cTgT
 ZOjlTrf+fgYLn1dqdD45TJiQPnmRrw4dU+WWSFRFJY2qjfyucj80vdqdkE5zkp5b
 UPomlVimG4ccPg==
 =FHGU
 -----END PGP SIGNATURE-----

Merge tag 'timers-cleanups-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer cleanups from Thomas Gleixner:
 "Another set of timer API cleanups:

    - Convert init_timer*(), try_to_del_timer_sync() and
      destroy_timer_on_stack() over to the canonical timer_*()
      namespace convention.

  There is another large conversion pending, which has not been included
  because it would have caused a gazillion of merge conflicts in next.
  The conversion scripts will be run towards the end of the merge window
  and a pull request sent once all conflict dependencies have been
  merged"

* tag 'timers-cleanups-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  treewide, timers: Rename destroy_timer_on_stack() as timer_destroy_on_stack()
  treewide, timers: Rename try_to_del_timer_sync() as timer_delete_sync_try()
  timers: Rename init_timers() as timers_init()
  timers: Rename NEXT_TIMER_MAX_DELTA as TIMER_NEXT_MAX_DELTA
  timers: Rename __init_timer_on_stack() as __timer_init_on_stack()
  timers: Rename __init_timer() as __timer_init()
  timers: Rename init_timer_on_stack_key() as timer_init_key_on_stack()
  timers: Rename init_timer_key() as timer_init_key()
2025-05-27 08:31:21 -07:00
Takashi Iwai
aca89f1be6 ALSA: hda: acpi: Make driver's match data const static
The driver's match data, nvidia_hda_data, is referred only locally,
and should be static.  Also, as it's a read-only data, it can be
gracefully const, too.

Fixes: 4b214c9bbe ("ALSA: hda - Add new driver for HDA controllers listed via ACPI")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505230426.k8ruTgnr-lkp@intel.com/
Link: https://patch.msgid.link/20250522205252.4056-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-22 22:53:51 +02:00
Takashi Iwai
ebaa3bf415 ALSA: hda: acpi: Use SYSTEM_SLEEP_PM_OPS()
The dev_pm_ops definition must be SYSTEM_SLEEP_PM_OPS() instead of
SET_SYSTEM_SLEEP_PM_OPS(); otherwise it leads compile warnings without
CONFIG_PM_SLEEP.  The latest patch version I took was back to an old
macro (likely mistakenly), and I overlooked it at applying.  Fix it
now.

Fixes: 4b214c9bbe ("ALSA: hda - Add new driver for HDA controllers listed via ACPI")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Closes: https://lore.kernel.org/20250522203020.1478369-1-rdunlap@infradead.org
Link: https://patch.msgid.link/20250522204624.1757-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-22 22:53:50 +02:00
Takashi Iwai
d18bbb7b8a Merge branch 'for-linus' into for-next
Sync with the pending 6.15 fixes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-22 20:34:24 +02:00
Takashi Iwai
547c5775a7 ASoC: Updates for v6.16
The changes in this release are quite large, mainly in drivers rather
 than the core.  This is partly due to cleanups that touch a lot of
 drivers and partly due to several relatively large new drivers.
 
  - Support for automatically enumerating DAIs from standards conforming
    SoundWire SDCA devices, further work is required for these to be
    useful in an actual card.
  - Conversion of quite a few drivers to newer GPIO APIs.
  - More helpers and cleanups from Mormimoto-san.
  - Support for a wider range of AVS platforms.
  - Support for AMD ACP 7.x platforms, Cirrus Logic CS35L63 and CS48L32,
    Everest Semiconductor ES8389, Longsoon-1 AC'97 controllers, nVidia
    Tegra264, Richtek ALC203 and RT9123 and Rockchip SAI controllers.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmgvRsEACgkQJNaLcl1U
 h9DInQf/SD/3ygLJOY3h7YMcY8ua39Jcu01cDtJ4F8Aezt2T+hTppxd/uUqPYiyM
 UcS6B+0yzFbtpKrtdectPoYIBYBXcoH34tnDn0/Qj9yaYX9BzFV1j6meIPJA10Wv
 CdCG35QKNamxL7PfCq/QxekWuS91TcRDZLzsX04lme5jm12q89/mWtenMIlAtRXH
 JCaVp6CzGaXBMpTJYK3uQ9DwszqMnSLmkoPvXJQAr8ymOJ/emOMY9uKPF5nSYtEU
 4T4jbIvt/stR5vsfgRUgOPuXquf2oupExgzOPdGWXWSGOg23QeiJcfeE+7OH1bAf
 k551jztnqivFhY5Ad72iipiaPYhSzw==
 =G6Xw
 -----END PGP SIGNATURE-----

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

ASoC: Updates for v6.16

The changes in this release are quite large, mainly in drivers rather
than the core.  This is partly due to cleanups that touch a lot of
drivers and partly due to several relatively large new drivers.

 - Support for automatically enumerating DAIs from standards conforming
   SoundWire SDCA devices, further work is required for these to be
   useful in an actual card.
 - Conversion of quite a few drivers to newer GPIO APIs.
 - More helpers and cleanups from Mormimoto-san.
 - Support for a wider range of AVS platforms.
 - Support for AMD ACP 7.x platforms, Cirrus Logic CS35L63 and CS48L32,
   Everest Semiconductor ES8389, Longsoon-1 AC'97 controllers, nVidia
   Tegra264, Richtek ALC203 and RT9123 and Rockchip SAI controllers.
2025-05-22 20:30:34 +02:00
Greg Kroah-Hartman
62f134ab19 ALSA: core: fix up bus match const issues.
In commit d69d804845 ("driver core: have match() callback in struct
bus_type take a const *"), the match bus callback was changed to have
the driver be a const pointer.  Unfortunately that const attribute was
thrown away when container_of() is called, which is not correct and was
not caught by the compiler due to how container_of() is implemented.
Fix this up by correctly preserving the const attribute of the driver
passed to the bus match function which requires the hdac_driver match
function to also take a const pointer for the driver structure.

Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Fixes: d69d804845 ("driver core: have match() callback in struct bus_type take a const *")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/2025052204-hyphen-thermal-3e72@gregkh
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-22 20:29:45 +02:00
Shenghao Ding
4fe2385134 ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib
Calibration data getting function for SPI and I2C HDA drivers are almost
same, which read the calibration data from UEFI. To put them into
tas2781_hda lib for code cleanup is more reasonable than to still keep
them in the codec driver. For tas2781 codec driver, there're two different
sources for calibrated data, one is from bin file, generated in factory
test, requested and read in codec driver side; the other is from user
space during device bootup.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>

Link: https://patch.msgid.link/20250522014347.1163-1-shenghao-ding@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-22 09:09:40 +02:00
Daniel Dadap
c597ce56e9 ALSA: hda/tegra: Switch to two-argument strscpy()
strscpy() is used in this driver with char[] struct member destinations,
so it is possible to use the simplified two-argument variant which was
added by commit e6584c3964 ("string: Allow 2-argument strscpy()").

Signed-off-by: Daniel Dadap <ddadap@nvidia.com>
Link: https://patch.msgid.link/aC3lbOTYxWvYR9dl@ddadap-lakeline.nvidia.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-21 22:15:29 +02:00
Daniel Dadap
4b214c9bbe ALSA: hda - Add new driver for HDA controllers listed via ACPI
Some systems expose HD-Audio controllers via objects in the ACPI tables
which encapsulate the controller's interrupt and the base address for the
HDA registers in an ACPI _CRS object, for example, as listed in this ACPI
table dump excerpt:

        Device (HDA0)
        {
            Name (_HID, "NVDA2014")  // _HID: Hardware ID
            ...
            Name (_CRS, ResourceTemplate ()
            // _CRS: Current Resource Settings
            {
                Memory32Fixed (ReadWrite,
                    0x36078000,         // Address Base
                    0x00008000,         // Address Length
                    )
                Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive,
                           ,, )
                {
                    0x0000021E,
                }
            })
        }

Add support for HDA controllers discovered through ACPI, including support
for some platforms which expose such HDA controllers on NVIDIA SoCs. This
is done with a new driver which uses existing infrastructure for extracting
resource information from _CRS objects and plumbs the parsed resource
information through to the existing HDA infrastructure to enable HD-Audio
functionality on such devices.

Although this driver is in the sound/pci/hda/ directory, it targets devices
which are not actually enumerated on the PCI bus. This is because it
depends upon the Intel "Azalia" infrastructure which has traditionally been
usedvfor PCI-based devices.

Signed-off-by: Daniel Dadap <ddadap@nvidia.com>
Link: https://patch.msgid.link/aC3ksXJUM9DlKiz6@ddadap-lakeline.nvidia.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-21 22:14:48 +02:00
Arnd Bergmann
9110fadda3 ALSA: hda/cs35l41_hda: select FW_CS_DSP
When compile-testing this driver, the missing FW_CS_DSP module
causes a link failure:

aarch64-linux-ld: sound/pci/hda/cs35l41_hda.o: in function `cs35l41_shutdown_dsp':
cs35l41_hda.c:(.text+0x7e4): undefined reference to `cs_dsp_stop'
aarch64-linux-ld: cs35l41_hda.c:(.text+0x7ec): undefined reference to `cs_dsp_power_down'
aarch64-linux-ld: sound/pci/hda/cs35l41_hda.o: in function `cs35l41_hda_remove':
cs35l41_hda.c:(.text+0x14b4): undefined reference to `cs_dsp_remove'
aarch64-linux-ld: sound/pci/hda/cs35l41_hda.o: in function `cs35l41_smart_amp.isra.0':
cs35l41_hda.c:(.text+0x189c): undefined reference to `cs_dsp_halo_init'
aarch64-linux-ld: cs35l41_hda.c:(.text+0x1bd4): undefined reference to `cs_dsp_power_up'
aarch64-linux-ld: cs35l41_hda.c:(.text+0x1c38): undefined reference to `cs_dsp_run'
aarch64-linux-ld: cs35l41_hda.c:(.text+0x1c80): undefined reference to `cs_dsp_get_ctl'
aarch64-linux-ld: cs35l41_hda.c:(.text+0x1c90): undefined reference to `cs_dsp_coeff_read_ctrl'
aarch64-linux-ld: cs35l41_hda.c:(.text+0x1cd4): undefined reference to `cs_dsp_get_ctl'
aarch64-linux-ld: cs35l41_hda.c:(.text+0x1ce4): undefined reference to `cs_dsp_coeff_read_ctrl'

Fixes: bdd9ea9187 ("ALSA: hda/hda_cs_dsp_ctl: Delete hda_cs_dsp_ctl module")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250520162101.3929551-1-arnd@kernel.org
2025-05-21 13:27:21 +02:00
Chris Chiu
f709b78aec ALSA: hda/realtek - Add new HP ZBook laptop with micmute led fixup
New HP ZBook with Realtek HDA codec ALC3247 needs the quirk
ALC236_FIXUP_HP_GPIO_LED to fix the micmute LED.

Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20250520132101.120685-1-chris.chiu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-20 16:09:06 +02:00
Stefan Binding
7150d57c37 ALSA: hda/realtek: Add support for HP Agusta using CS35L41 HDA
Add support for HP Agusta.

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

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20250520124757.12597-1-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-20 16:08:36 +02:00
Mark Brown
831962e9d7
Add sound card support for QCS9100 and QCS9075
Merge series from Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>:

This patchset adds support for sound card on Qualcomm QCS9100 and
QCS9075 boards.
2025-05-20 10:34:09 +01:00
Ed Burcher
8d70503068 ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14ASP10
Lenovo Yoga Pro 7 (gen 10) with Realtek ALC3306 and combined CS35L56
amplifiers need quirk ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN to
enable bass

Signed-off-by: Ed Burcher <git@edburcher.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20250519224907.31265-2-git@edburcher.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-20 08:01:19 +02:00
Peter Ujfalusi
ff05770d7b ALSA: hda: hda-intel: add Wildcat Lake support
One more PCI ID.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@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: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250519080855.16977-6-peter.ujfalusi@linux.intel.com
2025-05-19 22:40:03 +02:00
Kai Vehmanen
4c2f4d75ae ALSA: hda: add HDMI codec ID for Intel WCL
Add HDMI codec ID for Intel Wildcat Lake platform.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250519080855.16977-3-peter.ujfalusi@linux.intel.com
2025-05-19 22:40:03 +02:00
Kailang Yang
5ad8a4ddc4 ALSA: hda/realtek - restore auto-mute mode for Dell Chrome platform
This board need to shutdown Class-D amp to avoid EMI issue.
Restore the Auto-Mute mode item will off pin control when Auto-mute mode was enable.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Links: https://lore.kernel.org/ee8bbe5236464c369719d96269ba8ef8@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-16 11:31:49 +02:00
Stefan Binding
e43a93c419 ALSA: hda: cs35l41: Fix swapped l/r audio channels for Acer Helios laptops
Fixes audio channel assignment from ACPI using configuration table.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://patch.msgid.link/20250515162848.405055-3-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-16 09:59:19 +02:00
Stefan Binding
d64cbb5ed9 ALSA: hda/realtek: Add support for Acer Helios Laptops using CS35L41 HDA
Laptops use 2 CS35L41 Amps with HDA, using External boost with I2C.
Similar to previous Acer laptops, these laptops also need the
ALC255_FIXUP_PREDATOR_SUBWOOFER quirk to function properly.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://patch.msgid.link/20250515162848.405055-2-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-16 09:59:10 +02:00
Takashi Iwai
a3d14d1602 Merge branch 'for-linus' into for-next
Back-merge of 6.15 devel branch for further development of HD-audio
stuff.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-16 09:58:35 +02:00
Mohan Kumar D
1c4193917e ALSA: hda/tegra: Add Tegra264 support
Update HDA driver to support Tegra264 differences from legacy HDA,
which includes: clocks/resets, always power on, and hardware-managed
FPCI/IPFS initialization. The driver retrieves this chip-specific
information from soc_data.

Signed-off-by: Mohan Kumar D <mkumard@nvidia.com>
Signed-off-by: Sheetal <sheetal@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250512064258.1028331-4-sheetal@nvidia.com
2025-05-15 12:47:37 +02:00
Mark Brown
4a5883a586
cs35l56: Log tuning unique identifiers during firmware
Merge series from Simon Trimmer <simont@opensource.cirrus.com>:

These two patches introduce a log message when provisioning the cs35l56
family of devices that uniquely identifies the firmware tuning.
2025-05-15 11:43:58 +02:00
Wentao Liang
9e000f1b7f ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2()
The function snd_es1968_capture_open() calls the function
snd_pcm_hw_constraint_pow2(), but does not check its return
value. A proper implementation can be found in snd_cx25821_pcm_open().

Add error handling for snd_pcm_hw_constraint_pow2() and propagate its
error code.

Fixes: b942cf815b ("[ALSA] es1968 - Fix stuttering capture")
Cc: stable@vger.kernel.org # v2.6.22
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20250514092444.331-1-vulab@iscas.ac.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-14 12:13:03 +02:00
Simon Trimmer
db13e3d58c
ALSA: hda: cs35l56: Log tuning unique identifiers during firmware load
The cs35l56 smart amplifier has some informational firmware controls
that are populated by a tuning bin file to unique values - logging these
during firmware load identifies the specific configuration being used on
that device instance.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/2fcc0e6fc5b8669acb026bebe44a4995ac83b967.1747142267.git.simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-14 10:57:41 +02:00
Shenghao Ding
6f174daebe ALSA: hda/tas2781: Fix the symbol was not declare warning reported by kernel test robot
After commit 28a09d9e42 ("ALSA: hda/tas2781: Create an independent lib
to save the shared parts for both SPI and I2C driver") created a separated
lib for both hda-i2c and hda-spi driver, which caused this issue.
sparse warnings: (new ones prefixed by >>)
>> sound/pci/hda/tas2781_hda_spi.c:496:25: sparse: sparse: symbol
   'tas2781_snd_ctls' was not declared. Should it be static?
>> sound/pci/hda/tas2781_hda_spi.c:505:25: sparse: sparse: symbol
   'tas2781_prof_ctl' was not declared. Should it be static?
>> sound/pci/hda/tas2781_hda_spi.c:512:25: sparse: sparse: symbol
   'tas2781_dsp_ctls' was not declared. Should it be static?

Fixes: 28a09d9e42 ("ALSA: hda/tas2781: Create an independent lib to save the shared parts for both SPI and I2C driver")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://urldefense.com/v3/__https://lore.kernel.org/oe-kbuild-all/202505130420.vr9yDI3k-lkp@intel.com/__;!!G3vK!URphGMMfZ2erCLfJdETofl0O1mTSydDLLJ6inMIYWYUDUKYef_IuLvI7pnYj3Mx-4LRIi4BJEw$
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20250513071721.1090-1-shenghao-ding@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-13 11:01:14 +02:00
Ingo Molnar
367ed4e357 treewide, timers: Rename try_to_del_timer_sync() as timer_delete_sync_try()
Move this API to the canonical timer_*() namespace.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250507175338.672442-9-mingo@kernel.org
2025-05-08 19:49:33 +02:00
Kuninori Morimoto
a25ed230e6 ALSA: pci: ali5451: use snd_kcontrol_chip()
We can use snd_kcontrol_chip(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/87ikmdauco.wl-kuninori.morimoto.gx@renesas.com
2025-05-08 11:53:35 +02:00
Kuninori Morimoto
65468d1d3b ALSA: pci: asihpi: use snd_kcontrol_chip()
We can use snd_kcontrol_chip(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/87jz6taucs.wl-kuninori.morimoto.gx@renesas.com
2025-05-08 11:53:35 +02:00
Kuninori Morimoto
9aedbdff5f ALSA: pci: au88x0: use snd_kcontrol_chip()
We can use snd_kcontrol_chip(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/87ldr9aucw.wl-kuninori.morimoto.gx@renesas.com
2025-05-08 11:53:35 +02:00
Kuninori Morimoto
483dd12dbe ALSA: pci: hda: use snd_kcontrol_chip()
We can use snd_kcontrol_chip(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/87plglauda.wl-kuninori.morimoto.gx@renesas.com
2025-05-08 11:53:34 +02:00
Shenghao Ding
28a09d9e42 ALSA: hda/tas2781: Create an independent lib to save the shared parts for both SPI and I2C driver
Some common parts, such as struct tas2781_hda{...} and some audio
kcontrols are moved into an independent lib for code cleanup.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20250507045813.151-1-shenghao-ding@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-08 11:50:59 +02:00
Dr. David Alan Gilbert
42fdb67852 ALSA: hda: Remove unused snd_hda_add_nid
snd_hda_add_nid() last use was removed in 2014 by
commit db8e8a9dc9 ("ALSA: hda - Remove the obsoleted static quirk codes
from patch_cmedia.c")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://patch.msgid.link/20250505010922.340534-1-linux@treblig.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-08 11:49:58 +02:00
Stefan Binding
a3ec669efc
ASoC: cs35l56: Add Mute, Volume and Posture registers to firmware register list
Registers to set Mute, Volume and Posture are inside firmware,
which means they should be added to the list of registers set inside
firmware, in case they vary across Device or Revision.

These three registers are also used for controls, so additional
handling is required to be able to obtain and set the register inside
ALSA controls.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250407151842.143393-4-sbinding@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06 08:49:19 +09:00
Stefan Binding
8c0821ccaa
ASoC: cs35l56: Add struct to index firmware registers
Firmware based registers may be different addresses across different
device ids and revision ids. Create a structure to store and access
these addresses.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250407151842.143393-3-sbinding@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06 08:49:18 +09:00
Mark Brown
02ca789818
AsoC: Phase out hybrid PCI devres
Merge series from Philipp Stanner <phasta@kernel.org>:

A year ago we spent quite some work trying to get PCI into better shape.
Some pci_ functions can be sometimes managed with devres, which is
obviously bad. We want to provide an obvious API, where pci_ functions
are never, and pcim_ functions are always managed.

Thus, everyone enabling his device with pcim_enable_device() must be
ported to pcim_ functions. Porting all users will later enable us to
significantly simplify parts of the PCI subsystem. See here [1] for
details.

This patch series does that for sound.

Feel free to squash the commits as you see fit.

P.

[1] https://elixir.bootlin.com/linux/v6.14-rc4/source/drivers/pci/devres.c#L18
2025-05-06 08:42:25 +09:00
Mark Brown
c788129c85
ASoC: codec: twl4030: Convert to GPIO descriptors
Merge series from "Peng Fan (OSS)" <peng.fan@oss.nxp.com>:

This is separated from [1]. With an update that sorting the headers in a
separate patch. No other changes, so I still keep Linus' R-b for
Patch 2.

[1] https://lore.kernel.org/all/20250408-asoc-gpio-v1-3-c0db9d3fd6e9@nxp.com/
2025-05-01 15:46:16 +09:00
Chris Chiu
63f5235e02 ALSA: hda/realtek - Add more HP laptops which need mute led fixup
More HP EliteBook with Realtek HDA codec ALC3247 and combined CS35L56
Amplifiers need quirk ALC236_FIXUP_HP_GPIO_LED to fix the micmute LED.

Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20250430101843.150833-1-chris.chiu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-04-30 18:03:15 +02:00
Shenghao Ding
9fa6a693ad ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage SND_SOC_TAS2781_FMWLIB
Most codes in tas2781_spi_fwlib.c are same as tas2781-fmwlib.c, mainly for
firmware parsing, only differece is the register reading, bit update and
book switching in i2c and spi. The main purpose of this patch is for code
cleaup and arrange the shared part for i2c and spi.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20250429111055.567-1-shenghao-ding@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-04-30 07:36:25 +02:00
Richard Fitzgerald
849c83fe49 ALSA: hda/cs35l56: Remove dependency on COMPILE_TEST
Change the Kconfig dependency on ACPI || COMPILE_TEST to only depend on
ACPI.

The alternate dependency on COMPILE_TEST was a fudge to enable building
KUnit tests for modules that are selected by the CS35L56 driver but don't
depend on ACPI. This was based on a misunderstanding that KUNIT_ALL_TESTS
meant "all tests". Actually KUNIT_ALL_TESTS only means "tests for modules
that have satisfied dependencies" so it shouldn't be overriding
dependencies.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250428094126.125781-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-04-30 07:35:02 +02:00
Takashi Iwai
4d5b71b487 ALSA: hda/realtek: Fix built-mic regression on other ASUS models
A few ASUS models use the ALC256_FIXUP_ASUS_HEADSET_MODE although they
have no built-in mic pin on NID 0x13, as found in the commit
c1732ede5e ("ALSA: hda/realtek - Fix headset and mic on several Asus
laptops with ALC256").  This was relatively harmless in the past as
NID 0x13 was assigned as the secondary mic.  But since the fix for the
pin sort order, this pin became the primary one, hence user started
noticing the broken input, and we've fixed already for a few ASUS
models to switch to ALC256_FIXUP_ASUS_MIC_NO_PRESENCE.

This patch corrects the other ASUS models to use the right quirk entry
for fixing the built-in mic regression.  Here we cover X541SA
(1043:12e0), X541UV (1043:12f0), Z550SA (1043:13bf0) and X555UB
(1043:1ccd).

Fixes: 3b4309546b ("ALSA: hda: Fix headset detection failure due to unstable sort")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=220058
Link: https://patch.msgid.link/20250430053210.31776-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-04-30 07:33:06 +02:00
Takashi Iwai
26d87c55d1 ALSA: korg1212: Replace the pending stop check code with sync_stop PCM ops
The korg1212 driver has an overly complex code with the timer API to
check the pending stop operation and to sync at the prepare stage.
This very same thing can be achieved more simply by the PCM sync_stop
ops without timer, and this patch implements it.

Along with the rewrite to sync_stop ops, the flag
dsp_stop_is_processed is replaced with dsp_stop_processing to indicate
the stop operation is pending, not to indicate it's finished.  In that
way, wait_for_event() can be used more straightforwardly.

Link: https://lore.kernel.org/590769506CF46967+20250414042629.63019-5-wangyuli@uniontech.com
Link: https://patch.msgid.link/20250415155522.7998-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-04-29 14:53:54 +02:00
Takashi Iwai
be0c40da88 ALSA: hda/realtek: Add quirk for HP Spectre x360 15-df1xxx
HP Spectre x360 15-df1xxx with SSID 13c:863e requires similar
workarounds that were applied to another HP Spectre x360 models;
it has a mute LED only, no micmute LEDs, and needs the speaker GPIO
seup.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=220054
Link: https://patch.msgid.link/20250427081035.11567-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-04-27 10:12:23 +02:00
Chris Chiu
e8fa236e28 ALSA: hda: Apply volume control on speaker+lineout for HP EliteStudio AIO
This hardware has ALC274 codec with speaker NID 0x17 and line out
NID 0x16 for audio output. The line out is routed correctly but
the speaker is not. Thus the volume can't be controlled.

This patch removes DAC NID 0x06 (without volume control) from the
connection list for speaker NID 0x17. Routing both speaker and line
out pins to DAC NID 0x02 which controls the output volume.

Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Link: https://patch.msgid.link/20250425103618.534951-1-chris.chiu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-04-27 10:03:55 +02:00
Richard Fitzgerald
bdd9ea9187 ALSA: hda/hda_cs_dsp_ctl: Delete hda_cs_dsp_ctl module
Delete the hda_cs_dsp module and move the one array and one function
that is used by the cs35l41_hda driver into that driver.

The cs35l41 and cs35l56 drivers stopped creating ALSA controls to
wrap firmware controls. The reasons are explained in:

commit 312c04cee4 ("ALSA: hda: cs35l41: Stop creating ALSA Controls
for firmware coefficients")

and

commit 34e1b1bb73 ("ALSA: hda: cs35l56: Stop creating ALSA controls
for firmware coefficients")

The cs35l56_hda driver now doesn't use hda_cs_dsp_ctl at all. The
cs35l41_hda driver only uses the small array of firmware names and the
function to read a control value. All other functions and data in
hda_cs_dsp_ctl are unused. There is no need to keep a separate module
for such a small amount of data and code that is only used by one driver,
so remove the whole module.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20250424181214.66759-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-04-27 10:02:38 +02:00
Philipp Stanner
889dbe65c7 ALSA: maestro3: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.

Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250423075346.45907-29-phasta@kernel.org
2025-04-24 09:21:35 +02:00
Philipp Stanner
112b3388b1 ALSA: ali5451: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.

Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250423075346.45907-28-phasta@kernel.org
2025-04-24 09:21:35 +02:00
Philipp Stanner
385de1265b ALSA: ca0106: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.

Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250423075346.45907-27-phasta@kernel.org
2025-04-24 09:21:35 +02:00
Philipp Stanner
9d7f24e419 ALSA: cs46xx: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.

Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250423075346.45907-26-phasta@kernel.org
2025-04-24 09:21:35 +02:00
Philipp Stanner
ffa194e9c4 ALSA: cs5535: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.

Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250423075346.45907-25-phasta@kernel.org
2025-04-24 09:21:35 +02:00
Philipp Stanner
6012022e87 ALSA: echoaudio: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.

Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250423075346.45907-24-phasta@kernel.org
2025-04-24 09:21:35 +02:00