643 Commits

Author SHA1 Message Date
Ilyas Gasanov
eaf526cfa4 ALSA: hda/realtek: Add PCI SSIDs to HP ProBook quirks
According to HW probes, there exist upgraded variants of HP ProBook
440/450 G8 notebook PC hardware, with PCI SSIDs not yet covered:

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

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

Signed-off-by: Ilyas Gasanov <public@gsnoff.com>
Link: https://patch.msgid.link/20251202154930.74481-1-public@gsnoff.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-02 17:54:35 +01:00
Chris Chiu
a30fa81222 ALSA: hda/realtek: fix mute/micmute LEDs don't work for more HP laptops
More HP laptops with codec ALC3247 need the extra coefbit2 to make
mic-mute/audio-mute working.

Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Link: https://patch.msgid.link/20251202042534.174755-1-chris.chiu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-02 08:06:49 +01:00
Takashi Iwai
9747b22a41 Merge tag 'asoc-v6.19' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v6.19

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

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

This also pulls in some gpiolib changes supporting shared GPIOs in the
core there so we can convert some of the ASoC drivers open coding
handling of that to the core functionality.
2025-12-02 07:12:56 +01:00
Takashi Iwai
72987d2ddc Merge branch 'for-linus' into for-next
Pull remaining 6.18-devel changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-12-01 16:25:31 +01:00
Dirk Su
b72a6ddf6a ALSA: hda/realtek: fix mute/micmute LEDs don't work for HP 200 G2i
HP 200 G2i needs quirk to make mic-mute/audio-mute working.

Signed-off-by: Dirk Su <dirk.su@canonical.com>
Link: https://patch.msgid.link/20251127025651.13627-1-dirk.su@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-27 07:24:26 +01:00
Kailang Yang
500372aeb5 ALSA: hda/realtek - Enable Mute LED for HP ZBook X G2i platform
Enable SPK Mute Led and Mic Mute Led for HP ZBook X G2i platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://patch.msgid.link/ab5d4498f7454b25b245a3bad8fb95b3@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-26 07:30:00 +01:00
Ilyas Gasanov
d041e5e748 ALSA: hda/realtek: Add quirk for HP ProBook 450 G8
My laptop, HP ProBook 450 G8 (32M40EA), has Realtek ALC236 codec on its
integrated sound card, and uses GPIO pins 0x2 and 0x1 for speaker mute
and mic mute LEDs correspondingly, as found out by me through hda-verb
invocations. This matches the GPIO masks used by the
alc236_fixup_hp_gpio_led() function.

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

Signed-off-by: Ilyas Gasanov <public@gsnoff.com>
Link: https://patch.msgid.link/20251125235441.53629-1-public@gsnoff.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-26 07:26:56 +01:00
Jacob Zhong
be4c9abdf0 ALSA: hda/realtek: add quirk for HP pavilion aero laptop 13z-be200
The laptop uses ALC287 chip (as shown in /proc/asound/card1/codec#0).
It seems that every HP pavilion laptop in the table uses the same quirk,
so I just copied them. I have verified that the mute LED on my laptop
works with this patch.

For reference, here's the alsa-info of my laptop:
https://alsa-project.org/db/?f=2d5f297087708610bc01816ab12052abdd4a17c0

Signed-off-by: Jacob Zhong <cmpute@qq.com>
Link: https://patch.msgid.link/tencent_E2DFA33EFDF39E0517A94FA8FF06C05C0709@qq.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-21 10:36:58 +01:00
René Rebe
c639065e14 ALSA: realtek/alc288 fix headphone for MS Surface 2/3
The Surface Pro 2 and 3 have a strange headphone frequency response
and miss most of the bass. I discovered connecting the HP out to the
main DAC fixes this. Maybe the other is mono or intentionally filtered
signal for the built-in speakers? (At least the Lenovo Ideapad 720S
(AMD) (0x17aa, 0x3812) exhibited the same problem, but I don't have it
anymore for testing V2 changes.)

Signed-off-by: René Rebe <rene@exactco.de>
Co-developed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251120.124240.139462482701146043.rene@exactco.de
2025-11-20 15:25:32 +01:00
Kailang Yang
9afbbf4903 ALSA: hda/realtek - Enable Mute LED and Tas2781 for HP platform
Enable SPK Mute Led and Mic Mute Led for HP platform.
It was also integrated with Tas2781 supported.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-20 09:50:56 +01:00
Takashi Iwai
2e90ff5462 Merge branch 'for-linus' into for-next
Pull 6.18-devel branch for applying the further HD-audio fixups for HP.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-20 09:49:30 +01:00
Mark Brown
20772c4e0f ASoC: Intel: avs: Allow for NHLT configuration
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>
From AudioDSP perspective, only gateway-related modules e.g.: Copier:

Small set of changes providing new feature which the driver is already
utilizing on the market - for its Long-Term-Support (LTS) devices.

The goal is to cover systems which shipped with invalid Non HDAudio Link
Table (NHLT) - not just the descriptors (headers), but cases where the
hardware configuration is invalid too. The table is part of the ACPI
tree and forcing BIOS updates is not a feasible solution. With the
override, the topology file can carry the hardware configuration
instead.

From AudioDSP perspective, only gateway-related modules e.g.: Copier
care about the procedure. To ensure correct order of operations when
initializing such modules, the overrides take precedence over what's
currently there in the NHLT.
2025-11-18 11:37:11 +00:00
René Rebe
5719a189c9 ALSA: hda/cirrus fix cs420x MacPro 6,1 inverted jack detection
Turns out the Apple MacPro 6,1 trashcan also needs the inverted jack
detection like Mac mini patched, too.

Signed-off-by: René Rebe <rene@exactco.de>
Cc: <sstable@vger.kernel.org>
Link: https://patch.msgid.link/20251117.182351.1595411649664739497.rene@exactco.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-18 07:55:42 +01:00
Antheas Kapenekakis
18a4895370 ALSA: hda/realtek: Add match for ASUS Xbox Ally projects
Bind the realtek codec to TAS2781 I2C audio amps on ASUS Xbox Ally
projects. While these projects work without a quirk, adding it increases
the output volume significantly.

Cc: stable@vger.kernel.org # 6.17
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251026191635.2447593-2-lkml@antheas.dev
2025-11-18 07:52:55 +01:00
Antheas Kapenekakis
945865a0dd ALSA: hda/tas2781: fix speaker id retrieval for multiple probes
Currently, on ASUS projects, the TAS2781 codec attaches the speaker GPIO
to the first tasdevice_priv instance using devm. This causes
tas2781_read_acpi to fail on subsequent probes since the GPIO is already
managed by the first device. This causes a failure on Xbox Ally X,
because it has two amplifiers, and prevents us from quirking both the
Xbox Ally and Xbox Ally X in the realtek codec driver.

It is unnecessary to attach the GPIO to a device as it is static.
Therefore, instead of attaching it and then reading it when loading the
firmware, read its value directly in tas2781_read_acpi and store it in
the private data structure. Then, make reading the value non-fatal so
that ASUS projects that miss a speaker pin can still work, perhaps using
fallback firmware.

Fixes: 4e7035a75d ("ALSA: hda/tas2781: Add speaker id check for ASUS projects")
Cc: stable@vger.kernel.org # 6.17
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Reviewed-by: Baojun Xu <baojun.xu@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251026191635.2447593-1-lkml@antheas.dev
2025-11-18 07:52:55 +01:00
Peter Ujfalusi
9c3af1b2f7 ALSA: hda: controllers: intel: add support for Nova Lake S
Add NVL-S to the PCI-ID list.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251104121650.21872-8-peter.ujfalusi@linux.intel.com
2025-11-17 12:04:29 +01:00
Peter Ujfalusi
eece72a0d4 ALSA: hda: core: intel-dsp-config: Add support for NVL-S
Same recipes as PTL for NVL-S from the Nova Lake family.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251104121650.21872-7-peter.ujfalusi@linux.intel.com
2025-11-17 12:04:29 +01:00
Peter Ujfalusi
cd53591ae4 ALSA: hda/hdmi: intelhdmi: add HDMI codec ID for Intel NVL
Add HDMI codec ID for Intel Nova Lake platform.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251104121650.21872-3-peter.ujfalusi@linux.intel.com
2025-11-17 12:04:28 +01:00
Baojun Xu
f6fdd77b3e ALSA: hda/tas2781: Correct the wrong project ID
The project hardware ID should be ALC287_FIXUP_TXNW2781_I2C,
not ALC287_FIXUP_TAS2781_I2C for HP Lampass projects.

Fixes: 7a39c723b7 ("ALSA: hda/tas2781: Add new quirk for HP new projects")
Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20251112092609.15865-1-baojun.xu@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-12 10:33:17 +01:00
Baojun Xu
7a39c723b7 ALSA: hda/tas2781: Add new quirk for HP new projects
Add new vendor_id and subsystem_id in quirk for HP new projects.

Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20251108142325.2563-1-baojun.xu@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-09 09:52:59 +01:00
wangdicheng
592d1c23af ALSA: hda/senary: Replace magic numbers with defined constants
Replace hardcoded GPIO node value with a defined constant for better
code readability and maintainability.

Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Link: https://patch.msgid.link/20251107024030.36712-1-wangdich9700@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-08 08:54:29 +01:00
Mark Brown
7a381e373a ASoC: qcom: q6dsp: fixes and updates
Merge series from Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>:

This patchset has 4 fixes and some enhancements to the Elite DSP driver
support.
Fixes includes
	- setting correct flags for expected behaviour of appl_ptr
	- fix closing of copp instances
	- fix buffer alignment.
	- fix state checks before closing asm stream
Enhancements include:
	- adding q6asm_get_hw_pointer and ack callback support
	- simplify code via __free(kfree) mechanism.
	- use spinlock guards
	- few cleanups discovered during doing above 2.

There is another set of updates comming soon, which will add support
for early memory mapping and few more modules support in audioreach.
2025-11-06 11:34:45 +00:00
Takashi Iwai
82420bd4e1 ALSA: hda/hdmi: Fix breakage at probing nvhdmi-mcp driver
After restructuring and splitting the HDMI codec driver code, each
HDMI codec driver contains the own build_controls and build_pcms ops.
A copy-n-paste error put the wrong entries for nvhdmi-mcp driver; both
build_controls and build_pcms are swapped.  Unfortunately both
callbacks have the very same form, and the compiler didn't complain
it, either.  This resulted in a NULL dereference because the PCM
instance hasn't been initialized at calling the build_controls
callback.

Fix it by passing the proper entries.

Fixes: ad781b550f ("ALSA: hda/hdmi: Rewrite to new probe method")
Cc: <stable@vger.kernel.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=220743
Link: https://patch.msgid.link/20251106104647.25805-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-06 11:49:35 +01:00
Edson Juliano Drosdeck
4f4c654f5a ALSA: hda/realtek: Enable mic on Vaio RPL
Vaio RPL is equipped with ACL256, and needs a
fix to make the internal mic and headphone 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/20251029181152.389302-1-edson.drosdeck@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-10-30 07:26:47 +01:00
Eren Demir
28935ee5e4 ALSA: hda/realtek: Fix mute led for HP Victus 15-fa1xxx (MB 8C2D)
The quirk for Victus 15-fa1xxx wasn't working on Victus 15-fa1031nt due to a different board id. This patch enables the existing quirk for the board id 8BC8.

Tested on HP Victus 15-fa1031nt (MB 8C2D). The LED behaviour works as intended.

Signed-off-by: Eren Demir <eren.demir2479090@gmail.com>
Link: https://patch.msgid.link/20251027110208.6481-1-eren.demir2479090@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-10-27 15:13:29 +01:00
Richard Fitzgerald
64670a6c06 ALSA: hda/cs35l56: Set cal_index to the amp index
Set cs35l56_base->cal_index to the (zero-based) amp index derived
from cirrus,dev-index property.

This is so that factory calibration data will be written to the UEFI
array in the slot equal to the amp index, for compatibility with the
Windows driver.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251021105022.1013685-11-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-27 14:07:50 +00:00
Richard Fitzgerald
46a3df50b0 ALSA: hda/cs35l56: Create debugfs files for factory calibration
Create debugfs files that can be used to perform factory calibration.

During manufacture, the production line must perform a factory calibration
of the amps. This commit adds this functionality via debugfs files.

As this is only needed during manufacture, there is no need for this to be
available in a normal system so a Kconfig item has been added to enable
this. The new Kconfig option is inside a sub-menu because items do not
group and indent if the parent is invisible or there are multiple parent
dependencies. Anyway the sub-menu reduces the clutter.

cs35l56_hda_apply_calibration() has been changed to return an error code
that can be reported back through the debugfs write. The original call to
this function doesn't check the return code because in normal use it
doesn't matter whether this fails - the firmware will default to a safe
calibration for the platform. But tooling using the debugfs files might
want to know if there was an error.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251021105022.1013685-6-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-27 14:07:45 +00:00
J-Donald Tournier
1386d16761 ALSA: hda/realtek: Add quirk for Lenovo Yoga 7 2-in-1 14AKP10
This laptop requires the same quirk as Lenovo Yoga9 14IAP7 for
fixing the bass speaker problems.

Use HDA_CODEC_QUIRK to match on the codec SSID to avoid conflict with
the Lenovo Legion Slim 7 16IRH8, which has the same PCI SSID.

Signed-off-by: J-Donald Tournier <jdtournier@gmail.com>
Link: https://patch.msgid.link/20251018145322.39119-1-jdournier@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-10-18 18:36:10 +02:00
Dawn Gardner
2a78634800 ALSA: hda/realtek: Fix mute led for HP Omen 17-cb0xxx
This laptop uses the ALC285 codec, fixed by enabling
the ALC285_FIXUP_HP_MUTE_LED quirk

Signed-off-by: Dawn Gardner <dawn.auroali@gmail.com>
Link: https://patch.msgid.link/20251016184218.31508-3-dawn.auroali@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-10-17 16:37:21 +02:00
Takashi Iwai
ec2e0fb07d Merge tag 'asoc-fix-v6.18-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.18

A moderately large collection of driver specific fixes, plus a few new
quirks and device IDs.  The NAU8821 changes are a little large but more
in mechanical ways than in ways that are complex.
2025-10-16 20:14:24 +02:00
Shenghao Ding
66233e583d ALSA: hda/tas2781: Set tas2781_hda::tasdevice_priv::chip_id as TAS5825 in case of tas5825
The software reset for TAS5825 is different form other chips, as it will
set as 0x11 instead of 0x1 during reset in the tasdevice_reset(). So set
tas2781_hda::tasdevice_priv::chip_id as TAS5825, tasdevice_reset() can
work correctly.

Fixes: 7ceb69ca82 ("ASoC: tas2781: Add tas2118, tas2x20, tas5825 support")
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-10-13 09:39:27 +02:00
Takashi Iwai
5ec6f94342 ALSA: hda/realtek: Add quirk entry for HP ZBook 17 G6
HP ZBook 17 G6 with SSID 103c:860c requires a similar workaround as
its 15-inch model in order to make the speaker and mute LED working.
Add the corresponding quirk entry to address it.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=220372
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-10-13 09:28:13 +02:00
Stuart Hayhurst
30b3211aa2 ALSA: hda/intel: Add MSI X870E Tomahawk to denylist
This motherboard uses USB audio instead, causing this driver to complain
about "no codecs found!".
Add it to the denylist to silence the warning.

Signed-off-by: Stuart Hayhurst <stuart.a.hayhurst@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-10-11 08:29:10 +02:00
Denis Arefev
1cf11d80db ALSA: hda: Fix missing pointer check in hda_component_manager_init function
The __component_match_add function may assign the 'matchptr' pointer
the value ERR_PTR(-ENOMEM), which will subsequently be dereferenced.

The call stack leading to the error looks like this:

hda_component_manager_init
|-> component_match_add
    |-> component_match_add_release
        |-> __component_match_add ( ... ,**matchptr, ... )
            |-> *matchptr = ERR_PTR(-ENOMEM);       // assign
|-> component_master_add_with_match( ...  match)
    |-> component_match_realloc(match, match->num); // dereference

Add IS_ERR() check to prevent the crash.

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

Fixes: ae7abe36e3 ("ALSA: hda/realtek: Add CS35L41 support for Thinkpad laptops")
Cc: stable@vger.kernel.org
Signed-off-by: Denis Arefev <arefev@swemel.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-10-11 08:28:52 +02:00
Denis Arefev
8527bbb339 ALSA: hda: cs35l41: Fix NULL pointer dereference in cs35l41_get_acpi_mute_state()
Return value of a function acpi_evaluate_dsm() is dereferenced  without
checking for NULL, but it is usually checked for this function.

acpi_evaluate_dsm() may return NULL, when acpi_evaluate_object() returns
acpi_status other than ACPI_SUCCESS, so add a check to prevent the crach.

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

Fixes: 447106e92a ("ALSA: hda: cs35l41: Support mute notifications for CS35L41 HDA")
Cc: stable@vger.kernel.org
Signed-off-by: Denis Arefev <arefev@swemel.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-10-11 08:28:36 +02:00
Linus Torvalds
fdfa38e95e Merge tag 'sound-fix-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
 "A few more small fixes for 6.18-rc1.

  Most of changes are about ASoC Intel and SOF drivers, while a few
  other device-specific fixes are found for HD-audio, USB-audio, ASoC
  RT722VB and Meson"

* tag 'sound-fix-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: rt722: add settings for rt722VB
  ASoC: meson: aiu-encoder-i2s: fix bit clock polarity
  ALSA: usb: fpc: replace kmalloc_array followed by copy_from_user with memdup_array_user
  ALSA: hda/tas2781: Enable init_profile_id for device initialization
  ALSA: emu10k1: Fix typo in docs
  ALSA: hda/realtek: Add quirk for ASUS ROG Zephyrus Duo
  ASoC: SOF: Intel: Read the LLP via the associated Link DMA channel
  ASoC: SOF: ipc4-pcm: do not report invalid delay values
  ASoC: SOF: sof-audio: add dev_dbg_ratelimited wrapper
  ASoC: SOF: Intel: hda-pcm: Place the constraint on period time instead of buffer time
  ASoC: SOF: ipc4-topology: Account for different ChainDMA host buffer size
  ASoC: SOF: ipc4-topology: Correct the minimum host DMA buffer size
  ASoC: SOF: ipc4-pcm: fix start offset calculation for chain DMA
  ASoC: SOF: ipc4-pcm: fix delay calculation when DSP resamples
  ASoC: SOF: ipc3-topology: Fix multi-core and static pipelines tear down
  ALSA: hda/hdmi: Add pin fix for HP ProDesk model
2025-10-10 09:55:19 -07:00
Shenghao Ding
7ddb711b6e ALSA: hda/tas2781: Enable init_profile_id for device initialization
Optimize the time consumption of profile switching, init_profile saves
the common settings of different profiles, such as the dsp coefficients,
etc, which can greatly reduce the profile switching time comsumption and
remove the repetitive settings.

Fixes: e83dcd139e ("ASoC: tas2781: Add keyword "init" in profile section")
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-10-07 14:14:05 +02:00
Adam Holliday
328b80b29a ALSA: hda/realtek: Add quirk for ASUS ROG Zephyrus Duo
The ASUS ROG Zephyrus Duo 15 SE (GX551QS) with ALC 289 codec requires specific
pin configuration for proper volume control. Without this quirk, volume
adjustments produce a muffled sound effect as only certain channels attenuate,
leaving bass frequency at full volume.

Testing with hdajackretask confirms these pin tweaks fix the issue:
- Pin 0x17: Internal Speaker (LFE)
- Pin 0x1e: Internal Speaker

Signed-off-by: Adam Holliday <dochollidayxx@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-10-04 15:46:48 +02:00
Linus Torvalds
05a54fa773 Merge tag 'sound-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
 "It's been relatively calm in this cycle from the feature POV, but
  there were lots of cleanup works in the wide-range of code for
  converting with the auto-cleanup macros like guard().

  The mostly user-visible changes are the support of a couple of new
  compress-offload API extensions, and the support of new ASoC codec /
  platform drivers as well as USB-audio quirks.

  Here we go with some highlights:

  Core:
   - Compress-offload API extension for 64bit timestamp support
   - Compress-offload API extension for OPUS codec support
   - Workaround for PCM locking issue with PREEMPT_RT and softirq
   - KCSAN warning fix for ALSA sequencer core

  ASoC:
   - Continued cleanup works for ASoC core APIs
   - Lots of cleanups and conversions of DT bindings
   - Substantial maintainance work on the Intel AVS drivers
   - Support for Qualcomm Glymur and PM4125, Realtek RT1321, Shanghai
     FourSemi FS2104/5S, Texas Instruments PCM1754 and TAS2783A
   - Remove support for TI WL1273 for old Nokia systems

  USB-audio:
   - Support for Tascam US-144mkII, Presonus S1824c support
   - More flexible quirk option handling
   - Fix for USB MIDI timer bug triggered by fuzzer

  Others:
   - A large series of cleanups with guard() & co macros over (non-ASoC)
     sound drivers (PCI, ISA, HD-audio, USB-audio, drivers, etc)
   - TAS5825 HD-audio side-codec support"

* tag 'sound-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (454 commits)
  ALSA: usb-audio: don't hardcode gain for output channel of Presonus Studio
  ALSA: usb-audio: add the initial mix for Presonus Studio 1824c
  ALSA: doc: improved docs about quirk_flags in snd-usb-audio
  ALSA: usb-audio: make param quirk_flags change-able in runtime
  ALSA: usb-audio: improve module param quirk_flags
  ALSA: usb-audio: add two-way convert between name and bit for QUIRK_FLAG_*
  ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free
  ALSA: usb-audio: add mono main switch to Presonus S1824c
  ALSA: compress: document 'chan_map' member in snd_dec_opus
  ASoC: cs35l56: Add support for CS35L56 B2 silicon
  ASoC: cs35l56: Set fw_regs table after getting REVID
  ALSA: hda/realtek: Add quirk for HP Spectre 14t-ea100
  ASoc: tas2783A: Fix an error code in probe()
  ASoC: tlv320aic3x: Fix class-D initialization for tlv320aic3007
  ASoC: qcom: sc8280xp: use sa8775p/ subdir for QCS9100 / QCS9075
  ASoC: stm32: sai: manage context in set_sysclk callback
  ASoC: renesas: msiof: ignore 1st FSERR
  ASoC: renesas: msiof: Add note for The possibility of R/L opposite Capture
  ASoC: renesas: msiof: setup both (Playback/Capture) in the same time
  ASoC: renesas: msiof: tidyup DMAC stop timing
  ...
2025-10-02 11:37:19 -07:00
Linus Torvalds
5fb0249319 Merge tag 'pinctrl-v6.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control updates from Linus Walleij:
 "We have GPIO awareness in the pin control core and an interesting
  AAEON driver.

  Core changes:

   - Allow pins to be identified/marked as GPIO mode with a special
     callback.

     The pin controller core is now "aware" if a pin is in GPIO mode if
     the callback is implemented in the driver, and can thus be marked
     as "strict", i.e. disallowing simultaneous use of a line as GPIO
     and another function such as I2C.

     This is enabled in the Qualcomm TLMM driver and also implemeted
     from day 1 in the new Broadcom STB driver

   - Rename the pin config option PIN_CONFIG_OUTPUT to PIN_CONFIG_LEVEL
     to better describe what the config is doing, as well as making it
     more intuitive what shall be returned when reading this property

  New drivers:

   - Qualcomm SDM660 LPASS LPI TLMM pin controller subdriver

   - Qualcomm Glymur family pin controller driver

   - Broadcom STB family pin controller driver

   - Tegra186 pin controller driver

   - AAEON UP pin controller support.

     This is some special pin controller that works as an external
     advanced line MUX and amplifier for signals from an Intel SoC. A
     cooperative effort with the GPIO maintainer was needed to reach a
     solution where we reuse code from the GPIO aggregator/forwarder
     driver

   - Renesas RZ/T2H and RZ/N2H pin controller support

   - Axis ARTPEC-8 subdriver for the Samsung pin controller driver

  Improvements:

   - Output enable (OEN) support in the Renesas RZG2L driver

   - Properly support bias pull up/down in the pinctrl-single driver

   - Move over all GPIO portions using generic MMIO GPIO to the new
     generic GPIO chip management which has a nice and separate API

   - Proper DT bindings for some older Broadcom SoCs

   - External GPIO (EGPIO) support in the Qualcomm SM8250

  Deleted code:

   - Dropped the now unused Samsung S3C24xx drivers"

* tag 'pinctrl-v6.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (75 commits)
  pinctrl: use more common syntax for compound literals
  pinctrl: Simplify printks with pOF format
  pinctrl: qcom: Add SDM660 LPASS LPI TLMM
  dt-bindings: pinctrl: qcom: Add SDM660 LPI pinctrl
  pinctrl: qcom: lpass-lpi: Add ability to use custom pin offsets
  pinctrl: qcom: Add glymur pinctrl driver
  dt-bindings: pinctrl: qcom: Add Glymur pinctrl
  pinctrl: qcom: sm8250: Add egpio support
  pinctrl: generic: rename PIN_CONFIG_OUTPUT to LEVEL
  pinctrl: keembay: fix double free in keembay_build_functions()
  pinctrl: spacemit: fix typo in PRI_TDI pin name
  pinctrl: eswin: Fix regulator error check and Kconfig dependency
  pinctrl: bcm: Add STB family pin controller driver
  dt-bindings: pinctrl: Add support for Broadcom STB pin controller
  pinctrl: qcom: make the pinmuxing strict
  pinctrl: qcom: mark the `gpio` and `egpio` pins function as non-strict functions
  pinctrl: qcom: add infrastructure for marking pin functions as GPIOs
  pinctrl: allow to mark pin functions as requestable GPIOs
  pinctrl: qcom: use generic pin function helpers
  pinctrl: make struct pinfunction a pointer in struct function_desc
  ...
2025-10-01 13:14:48 -07:00
Steven 'Steve' Kendall
74662f9f92 ALSA: hda/hdmi: Add pin fix for HP ProDesk model
The HP ProDesk 400 (SSID 103c:83f3) also needs a quirk for
enabling HDMI outputs.  This patch adds the required quirk
entry.

Signed-off-by: Steven 'Steve' Kendall <skend@chromium.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-09-30 14:32:44 +02:00
Takashi Iwai
329bdcbbd2 Merge branch 'for-linus' into for-next
Pull 6.17-devel branch for applying further changes cleanly.

Signed-off-by: Taksahi Iwai <tiwai@suse.de>
2025-09-28 08:34:58 +02:00
Richard Fitzgerald
ab91835e61 ASoC: cs35l56: Set fw_regs table after getting REVID
Defer setting the cs35l56_base.fw_regs pointer until after the REVID has
been read in cs35l56_hw_init(). Also make the corresponding change to the
cs35l56_hda drivers to prevent a build break.

This is preparing for firmware registers that change address between
revisions of the same device.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-09-28 08:27:15 +02:00
Takashi Iwai
50a098e3e9 ALSA: hda/realtek: Add quirk for HP Spectre 14t-ea100
HP-Spectre 14t-ea100 model has no speaker output unless booting
previously from Windows on dual boot, a reboot while on Linux will
stop the speakers working.  Applying the existing quirk for HP Spectre
X360 EU0xxx seems fixing this speaker problem.

Reported-by: Kaden Berger <kadenb816@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/aMxdGAmfOQ6VPNU8@archlinux
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-09-27 13:52:02 +02:00
Takashi Iwai
b8d8265a0d Merge tag 'asoc-v6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v6.18

A relatively quiet release for ASoC, we've had a lot of maintainance
work going on and several new drivers but really the most remarkable
thing is that we removed a driver, the WL1273 driver used in some old
Nokia systems that have had the underlying system support removed from
the kernel.

 - Morimoto-san continues his work on cleanups of the core APIs and
   enforcement of abstraction layers.
 - Lots of cleanups and conversions of DT bindings.
 - Substantial maintainance work on the Intel AVS drivers.
 - Support for Qualcomm Glymur and PM4125, Realtek RT1321, Shanghai
   FourSemi FS2104/5S, Texas Instruments PCM1754.
 - Remove support for TI WL1273.
2025-09-20 08:38:17 +02:00
Praful Adiga
d33c347104 ALSA: hda/realtek: Fix mute led for HP Laptop 15-dw4xx
This laptop uses the ALC236 codec with COEF 0x7 and idx 1 to
control the mute LED. Enable the existing quirk for this device.

Signed-off-by: Praful Adiga <praful.adiga@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-09-18 21:10:05 +02:00
Richard Fitzgerald
7dd670db9a ALSA: hda: intel-dsp-config: Prevent SEGFAULT if ACPI_HANDLE() is NULL
Check in snd_intel_dsp_check_soundwire() that the pointer returned by
ACPI_HANDLE() is not NULL, before passing it on to other functions.

The original code assumed a non-NULL return, but if it was unexpectedly
NULL it would end up passed to acpi_walk_namespace() as the start
point, and would result in

[    3.219028] BUG: kernel NULL pointer dereference, address:
0000000000000018
[    3.219029] #PF: supervisor read access in kernel mode
[    3.219030] #PF: error_code(0x0000) - not-present page
[    3.219031] PGD 0 P4D 0
[    3.219032] Oops: Oops: 0000 [#1] SMP NOPTI
[    3.219035] CPU: 2 UID: 0 PID: 476 Comm: (udev-worker) Tainted: G S
AW   E       6.17.0-rc5-test #1 PREEMPT(voluntary)
[    3.219038] Tainted: [S]=CPU_OUT_OF_SPEC, [A]=OVERRIDDEN_ACPI_TABLE,
[W]=WARN, [E]=UNSIGNED_MODULE
[    3.219040] RIP: 0010:acpi_ns_walk_namespace+0xb5/0x480

This problem was triggered by a bugged DSDT that the kernel couldn't parse.
But it shouldn't be possible to SEGFAULT the kernel just because of some
bugs in ACPI.

Fixes: 0650857570 ("ALSA: hda: add autodetection for SoundWire")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-09-17 18:19:04 +02:00
Bou-Saan Che
d99c203034 ALSA: hda/realtek: Fix volume control on Lenovo Thinkbook 13x Gen 4
The issue was caused by incorrect configuration in the driver,
which prevented proper volume control on certain systems.

Signed-off-by: Bou-Saan Che <yungmeat@inboxia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-09-15 09:25:01 +02:00
Bou-Saan Che
c1d31894d8 ALSA: hda/realtek: Support Lenovo Thinkbook 13x Gen 5
The laptop does not contain valid _DSD for these amps, so requires
entries into the CS35L41 configuration table to function correctly.

Signed-off-by: Bou-Saan Che <yungmeat@inboxia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-09-15 09:24:49 +02:00
Bou-Saan Che
f205ed23f0 ALSA: hda: cs35l41: Support Lenovo Thinkbook 13x Gen 5
This laptop does not contain _DSD so needs to be supported using the
configuration table.

Signed-off-by: Bou-Saan Che <yungmeat@inboxia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-09-15 09:24:32 +02:00