linux-stable/sound/hda
Pierre-Louis Bossart 68195bb960 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:03:02 +02:00
..
ext ALSA: hda: ext: remove always-true conditions on host and link release 2022-09-20 08:08:14 +02: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
hda_bus_type.c
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: Reset all SIE bits in INTCTL 2022-07-09 18:41:40 +02:00
hdac_device.c ALSA: hda: Fix unhandled register update during auto-suspend period 2023-05-30 14:03:17 +01:00
hdac_i915.c ALSA: hda: Fix discovery of i915 graphics PCI device 2022-06-21 14:05:12 +02:00
hdac_regmap.c ALSA: hda: fix a possible null-pointer dereference due to data race in snd_hdac_regmap_sync() 2023-08-23 17:52:26 +02:00
hdac_stream.c ALSA: hda: Refer to correct stream index at loops 2024-02-05 20:12:54 +00:00
hdac_sysfs.c ALSA: hda: fix potential memleak in 'add_widget_node' 2022-11-10 15:28:12 +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:03:02 +02:00
intel-nhlt.c ALSA: hda: intel-nhlt: Ignore vbps when looking for DMIC 32 bps format 2024-01-20 11:50:04 +01:00
intel-sdw-acpi.c ALSA: hda: intel-sdw-acpi: fix usage of device_get_named_child_node() 2024-05-17 11:56:00 +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