linux-stable/sound/hda
Pierre-Louis Bossart cc73306bf4 ALSA: hda: intel-dsp-config: harden I2C/I2S codec detection
[ Upstream commit 79ac4c1443 ]

The SOF driver is selected whenever specific I2C/I2S HIDs are reported
as 'present' in the ACPI DSDT. In some cases, an HID is reported but
the hardware does not actually rely on I2C/I2S.  This false positive
leads to an invalid selection of the SOF driver and as a result an
invalid topology is loaded.

This patch hardens the detection with a check that the NHLT table is
consistent with the report of an I2S-based codec in DSDT. This table
should expose at least one SSP endpoint configured for an I2S-codec
connection.

Tested on Huawei Matebook D14 (NBLB-WAX9N) using an HDaudio codec with
an invalid ES8336 ACPI HID reported:

[    7.858249] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[    7.858312] snd_hda_intel 0000:00:1f.3: snd_intel_dsp_find_config: no valid SSP found for HID ESSX8336, skipped

Reported-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Tested-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Closes: https://github.com/thesofproject/linux/issues/4934
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Message-ID: <20240426152818.38443-1-pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-12 11:11:28 +02:00
..
ext ALSA: hda: Allow for compress stream to hdac_ext_stream assignment 2022-12-05 14:05:18 +00:00
Kconfig ALSA: hda: Revert "ALSA: hda: Allow setting preallocation again for x86" 2021-03-19 16:55:11 +01:00
Makefile ALSA: hda: move Intel SoundWire ACPI scan to dedicated module 2021-03-02 15:33:00 +01:00
array.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
hda_bus_type.c driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00
hdac_bus.c ALSA: hda: Skip event processing for unregistered codecs 2022-07-15 16:26:50 +02:00
hdac_component.c ALSA: hda/i915 - fix list corruption with concurrent probes 2020-10-09 16:46:04 +02:00
hdac_controller.c ALSA: hda: Using polling mode for loongson controller by default 2023-06-07 12:37:25 +02:00
hdac_device.c Merge branch 'for-next' into for-linus 2023-06-26 15:23:23 +02:00
hdac_i915.c ALSA: hda/i915: extend connectivity check to cover Intel ARL 2023-08-04 12:53:53 +02:00
hdac_regmap.c ALSA: hda: Use regcache_reg_cached() rather than open coding 2023-07-18 15:05:12 +01:00
hdac_stream.c ALSA: hda: Refer to correct stream index at loops 2024-02-05 20:14:26 +00:00
hdac_sysfs.c ALSA: hda: make kobj_type structure constant 2023-02-11 09:37:42 +01:00
hdmi_chmap.c ALSA: hda: Replace runtime->status->state reference to runtime->state 2022-09-27 08:47:33 +02:00
intel-dsp-config.c ALSA: hda: intel-dsp-config: harden I2C/I2S codec detection 2024-06-12 11:11:28 +02:00
intel-nhlt.c ALSA: hda: intel-nhlt: Ignore vbps when looking for DMIC 32 bps format 2024-01-20 11:51:38 +01:00
intel-sdw-acpi.c ALSA: hda: intel-sdw-acpi: fix usage of device_get_named_child_node() 2024-05-17 12:02:05 +02:00
local.h ALSA: hda: Unexport some local helper functions 2020-05-16 08:29:49 +02:00
trace.c
trace.h tracing: ALSA: hda: Remove string manipulation out of the fast path 2022-07-04 14:31:19 +02:00