OSDN Git Service

ASoC: add quirk for Surface 3 with bad DMI table
authorChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 18 Sep 2018 03:01:37 +0000 (11:01 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 18 Sep 2018 03:01:37 +0000 (11:01 +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/common/soc-acpi-intel-cht-match.c

index 1dc70f4..517d1c0 100644 (file)
@@ -3699,6 +3699,15 @@ static const struct dmi_system_id dmi_platform_data[] = {
                .driver_data = (void *)&intel_braswell_platform_data,
        },
        {
+               .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"),
+               },
+               .driver_data = (void *)&intel_braswell_platform_data,
+       },
+       {
                /*
                 * Match for the GPDwin which unfortunately uses somewhat
                 * generic dmi strings, which is why we test for 4 strings.
index ad1eb2d..df073f8 100644 (file)
@@ -35,6 +35,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"),
+               },
        },
        { }
 };