This repository has been archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Surface3-OEMB: add quirk for Surface 3 with broken DMI table
Update existing patches. Will be available soon on linux-surface/linux-surface patchset. PR already merged into linux-surface/kernel: linux-surface/kernel#29
- Loading branch information
1 parent
a5649a3
commit 15391f8
Showing
20 changed files
with
820 additions
and
464 deletions.
There are no files selected for viewing
100 changes: 100 additions & 0 deletions
100
...9/0000-Surface_3-DMI-OEMB/0001-Surface3-OEMB-ASoC-add-quirk-for-Surface-3-with-brok.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
From d6391c79df3f3d0d1126800a6154b795c1e25ad0 Mon Sep 17 00:00:00 2001 | ||
From: Chih-Wei Huang <[email protected]> | ||
Date: Tue, 18 Sep 2018 11:01:37 +0800 | ||
Subject: [PATCH 1/2] Surface3-OEMB: ASoC: add quirk for Surface 3 with broken | ||
DMI table | ||
|
||
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. | ||
|
||
=== | ||
(Commit message from kitakar5525 <[email protected]>) | ||
|
||
(am from http://git.osdn.net/view?p=android-x86/kernel.git;a=commitdiff;h=18e2e857c57633b25b3b4120f212224a108cd883) | ||
(author: Chih-Wei Huang <[email protected]> Tue, 18 Sep 2018 03:01:37 +0000 (11:01 +0800)) | ||
(Changed commit title from "ASoC: add quirk for Surface 3 with bad DMI table") | ||
|
||
On some Surface 3, DMI table gets corrupted for unknown reasons | ||
and breaks existing DMI matching used for device-specific quirks. | ||
|
||
This commit adds the (broken) DMI info for the affected Surface 3. | ||
Fixes Sound feature on Surface 3 with broken DMI table. | ||
|
||
Note here that this issue will not necessarily happen after playing | ||
around with Android-x86. I heard a report from a person on the IRC | ||
channel that on the affected system, only Manjaro was used. | ||
|
||
On affected systems, dmidecode will look like this: | ||
$ sudo dmidecode | ||
[...] | ||
BIOS Information | ||
Vendor: American Megatrends Inc. | ||
[...] | ||
System Information | ||
Manufacturer: OEMB | ||
Product Name: OEMB | ||
[...] | ||
|
||
Expected: | ||
$ sudo dmidecode | ||
[...] | ||
BIOS Information | ||
Vendor: (???, I think something like "Microsoft Corporation") | ||
[...] | ||
System Information | ||
Manufacturer: Microsoft Corporation | ||
Product Name: Surface 3 | ||
[...] | ||
--- | ||
sound/soc/codecs/rt5645.c | 9 +++++++++ | ||
sound/soc/intel/common/soc-acpi-intel-cht-match.c | 6 ++++++ | ||
2 files changed, 15 insertions(+) | ||
|
||
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c | ||
index 7e3b47eee..85c0731df 100644 | ||
--- a/sound/soc/codecs/rt5645.c | ||
+++ b/sound/soc/codecs/rt5645.c | ||
@@ -3706,6 +3706,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 | ||
diff --git a/sound/soc/intel/common/soc-acpi-intel-cht-match.c b/sound/soc/intel/common/soc-acpi-intel-cht-match.c | ||
index 91bb99b69..c9f966bac 100644 | ||
--- a/sound/soc/intel/common/soc-acpi-intel-cht-match.c | ||
+++ b/sound/soc/intel/common/soc-acpi-intel-cht-match.c | ||
@@ -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"), | ||
+ }, | ||
}, | ||
{ } | ||
}; | ||
-- | ||
2.24.1 | ||
|
64 changes: 64 additions & 0 deletions
64
...9/0000-Surface_3-DMI-OEMB/0002-Surface3-OEMB-surface3-wmi-add-quirk-for-Surface-3-w.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
From b3e12aa5877944df0e843befade8bca2cac2e17c Mon Sep 17 00:00:00 2001 | ||
From: kitakar5525 <[email protected]> | ||
Date: Sat, 11 Jan 2020 23:24:09 +0900 | ||
Subject: [PATCH 2/2] Surface3-OEMB: surface3-wmi: add quirk for Surface 3 with | ||
broken DMI table | ||
|
||
(made referring to http://git.osdn.net/view?p=android-x86/kernel.git;a=commitdiff;h=18e2e857c57633b25b3b4120f212224a108cd883) | ||
|
||
On some Surface 3, DMI table gets corrupted for unknown reasons | ||
and breaks existing DMI matching used for device-specific quirks. | ||
|
||
This commit adds the (broken) DMI info for the affected Surface 3. | ||
Fixes surface3-wmi probe on Surface 3 with broken DMI table. | ||
|
||
Note here that this issue will not necessarily happen after playing | ||
around with Android-x86. I heard a report from a person on the IRC | ||
channel that on the affected system, only Manjaro was used. | ||
|
||
On affected systems, dmidecode will look like this: | ||
$ sudo dmidecode | ||
[...] | ||
BIOS Information | ||
Vendor: American Megatrends Inc. | ||
[...] | ||
System Information | ||
Manufacturer: OEMB | ||
Product Name: OEMB | ||
[...] | ||
|
||
Expected: | ||
$ sudo dmidecode | ||
[...] | ||
BIOS Information | ||
Vendor: (???, I think something like "Microsoft Corporation") | ||
[...] | ||
System Information | ||
Manufacturer: Microsoft Corporation | ||
Product Name: Surface 3 | ||
[...] | ||
--- | ||
drivers/platform/x86/surface3-wmi.c | 7 +++++++ | ||
1 file changed, 7 insertions(+) | ||
|
||
diff --git a/drivers/platform/x86/surface3-wmi.c b/drivers/platform/x86/surface3-wmi.c | ||
index 25b176996..58d118776 100644 | ||
--- a/drivers/platform/x86/surface3-wmi.c | ||
+++ b/drivers/platform/x86/surface3-wmi.c | ||
@@ -41,6 +41,13 @@ static const struct dmi_system_id surface3_dmi_table[] = { | ||
DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"), | ||
}, | ||
}, | ||
+ { | ||
+ .matches = { | ||
+ DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."), | ||
+ DMI_MATCH(DMI_SYS_VENDOR, "OEMB"), | ||
+ DMI_MATCH(DMI_PRODUCT_NAME, "OEMB"), | ||
+ }, | ||
+ }, | ||
#endif | ||
{ } | ||
}; | ||
-- | ||
2.24.1 | ||
|
62 changes: 0 additions & 62 deletions
62
patch-4.19/5525-Surface_3-DMI-OEMB/Sound-add-DMI_MATCH-OEMB-for-broken-DMI-Surface-3.patch
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
...h-4.19/5525-Surface_3-DMI-OEMB/surface3-wmi-add-DMI_MATCH-OEMB-for-broken-DMI-Surfa.patch
This file was deleted.
Oops, something went wrong.
100 changes: 100 additions & 0 deletions
100
...4/0000-Surface_3-DMI-OEMB/0001-Surface3-OEMB-ASoC-add-quirk-for-Surface-3-with-brok.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
From d6391c79df3f3d0d1126800a6154b795c1e25ad0 Mon Sep 17 00:00:00 2001 | ||
From: Chih-Wei Huang <[email protected]> | ||
Date: Tue, 18 Sep 2018 11:01:37 +0800 | ||
Subject: [PATCH 1/2] Surface3-OEMB: ASoC: add quirk for Surface 3 with broken | ||
DMI table | ||
|
||
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. | ||
|
||
=== | ||
(Commit message from kitakar5525 <[email protected]>) | ||
|
||
(am from http://git.osdn.net/view?p=android-x86/kernel.git;a=commitdiff;h=18e2e857c57633b25b3b4120f212224a108cd883) | ||
(author: Chih-Wei Huang <[email protected]> Tue, 18 Sep 2018 03:01:37 +0000 (11:01 +0800)) | ||
(Changed commit title from "ASoC: add quirk for Surface 3 with bad DMI table") | ||
|
||
On some Surface 3, DMI table gets corrupted for unknown reasons | ||
and breaks existing DMI matching used for device-specific quirks. | ||
|
||
This commit adds the (broken) DMI info for the affected Surface 3. | ||
Fixes Sound feature on Surface 3 with broken DMI table. | ||
|
||
Note here that this issue will not necessarily happen after playing | ||
around with Android-x86. I heard a report from a person on the IRC | ||
channel that on the affected system, only Manjaro was used. | ||
|
||
On affected systems, dmidecode will look like this: | ||
$ sudo dmidecode | ||
[...] | ||
BIOS Information | ||
Vendor: American Megatrends Inc. | ||
[...] | ||
System Information | ||
Manufacturer: OEMB | ||
Product Name: OEMB | ||
[...] | ||
|
||
Expected: | ||
$ sudo dmidecode | ||
[...] | ||
BIOS Information | ||
Vendor: (???, I think something like "Microsoft Corporation") | ||
[...] | ||
System Information | ||
Manufacturer: Microsoft Corporation | ||
Product Name: Surface 3 | ||
[...] | ||
--- | ||
sound/soc/codecs/rt5645.c | 9 +++++++++ | ||
sound/soc/intel/common/soc-acpi-intel-cht-match.c | 6 ++++++ | ||
2 files changed, 15 insertions(+) | ||
|
||
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c | ||
index 7e3b47eee..85c0731df 100644 | ||
--- a/sound/soc/codecs/rt5645.c | ||
+++ b/sound/soc/codecs/rt5645.c | ||
@@ -3706,6 +3706,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 | ||
diff --git a/sound/soc/intel/common/soc-acpi-intel-cht-match.c b/sound/soc/intel/common/soc-acpi-intel-cht-match.c | ||
index 91bb99b69..c9f966bac 100644 | ||
--- a/sound/soc/intel/common/soc-acpi-intel-cht-match.c | ||
+++ b/sound/soc/intel/common/soc-acpi-intel-cht-match.c | ||
@@ -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"), | ||
+ }, | ||
}, | ||
{ } | ||
}; | ||
-- | ||
2.24.1 | ||
|
Oops, something went wrong.