[SRU][OEM-5.6][PATCH 1/1] ALSA: hda: add autodetection for SoundWire

Hui Wang hui.wang at canonical.com
Wed Aug 5 03:02:28 UTC 2020


From: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>

BugLink: https://bugs.launchpad.net/bugs/1890231

When an ACPI companion device is present and the SoundWire link mask
information is available, use SoundWire instead of legacy HDA or
Skylake drivers.

The SOF driver is selected when SoundWire or DMIC are detected. There
is no precedence at this level. In the SOF driver proper, SoundWire
will be handled first since it is mutually exclusive with HDaudio.

Known devices with an existing DMI quirk bypass this detection to
avoid any dependency on ACPI/DSDT tables.

[Drop the FLAG_SOF_ONLY_IF_SOUNDWIRE and related code since
sdw_intel_acpi_scan() is not implemented yet in the mainline kernel,
and sdw_intel_acpi_scan() in the oem-5.6 kernel doesn't work well,
this function will return true on Dell machines without soundwire.
- Hui.Wang]

Reviewed-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski at linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao at linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen at linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
Link: https://lore.kernel.org/r/20200409190251.16569-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai at suse.de>
(backported from commit 0650857570d161486a95d37bc8682628881ae2da)
Signed-off-by: Hui Wang <hui.wang at canonical.com>
---
 sound/hda/intel-dsp-config.c | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
index 72c64bf42dec..a4f8149cac74 100644
--- a/sound/hda/intel-dsp-config.c
+++ b/sound/hda/intel-dsp-config.c
@@ -205,10 +205,17 @@ static const struct config_entry config_table[] = {
 				}
 			},
 			{
-				.ident = "Dell laptop",
 				.matches = {
 					DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
-				}
+					DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "09C6")
+				},
+			},
+			{
+				/* early version of SKU 09C6 */
+				.matches = {
+					DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+					DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0983")
+				},
 			},
 			{}
 		}
@@ -225,10 +232,16 @@ static const struct config_entry config_table[] = {
 		.device = 0x06c8,
 		.dmi_table = (const struct dmi_system_id []) {
 			{
-				.ident = "Dell laptop",
 				.matches = {
-					DMI_MATCH(DMI_SYS_VENDOR, "Dell"),
-				}
+					DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+					DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "098F"),
+				},
+			},
+			{
+				.matches = {
+					DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+					DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0990"),
+				},
 			},
 			{}
 		}
-- 
2.17.1




More information about the kernel-team mailing list