OSDN Git Service

ASoC: add quirk for Surface 3 with bad DMI table
authorChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 5 Feb 2018 09:00:00 +0000 (17:00 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 5 Feb 2018 09:00:00 +0000 (17:00 +0800)
Some Microsoft Surface 3 owners including me encountered a strange issue
when play Android-x86 on the tablet. The DMI table was erased due to
unknown reason and sound doesn't work in Android-x86 (but it's normal
in Windows). See more details:

https://groups.google.com/d/msg/android-x86/z6GDuvV2oWk/mzyg0RQiCAAJ

Since the DMI table is incorrect, kernel won't enable quirk for it.
To workaround such an issue, add quirk for the bad data "OEMB".
It should not affect any product with correct DMI data.

sound/soc/codecs/rt5645.c
sound/soc/intel/atom/sst/sst_acpi.c

index 1ac96ef..679ca3c 100644 (file)
@@ -3583,6 +3583,14 @@ static const struct dmi_system_id dmi_platform_intel_braswell[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"),
                },
        },
+       {
+               .ident = "Microsoft Surface 3",
+               .matches = {
+                       DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
+                       DMI_MATCH(DMI_SYS_VENDOR, "OEMB"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "OEMB"),
+               },
+       },
        { }
 };
 
index ebc4e85..96f28bb 100644 (file)
@@ -440,6 +440,12 @@ static const struct dmi_system_id cht_table[] = {
                        DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
                        DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"),
                },
+               .callback = cht_surface_quirk_cb,
+               .matches = {
+                       DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
+                       DMI_MATCH(DMI_SYS_VENDOR, "OEMB"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "OEMB"),
+               },
        },
        { }
 };