Skip to content

Commit 3e951e7

Browse files
Kovács Tamásbroonie
authored andcommitted
ASoC: Intel: Baytrail: add quirk for Aegex 10 (RU2) tablet
This tablet has an incorrect acpi identifier just like Thinkpad10 tablet, which is why it is trying to load the RT5640 driver instead of the RT5762 driver. The RT5640 driver, on the other hand, checks the hardware ID, so no driver are loaded during boot. This fix resolves to load the RT5672 driver on this tablet during boot. It also provides the correct IO configuration, like the jack detect mode 3, for 1.8V pullup. I would like to thank Pierre-Louis Bossart for helping with this patch. Signed-off-by: Kovács Tamás <kepszlok@zohomail.eu> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 1f2675f commit 3e951e7

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

‎sound/soc/codecs/rt5670.c‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2882,6 +2882,18 @@ static const struct dmi_system_id dmi_platform_intel_quirks[] = {
28822882
RT5670_DEV_GPIO |
28832883
RT5670_JD_MODE3),
28842884
},
2885+
{
2886+
.callback = rt5670_quirk_cb,
2887+
.ident = "Aegex 10 tablet (RU2)",
2888+
.matches = {
2889+
DMI_MATCH(DMI_SYS_VENDOR, "AEGEX"),
2890+
DMI_MATCH(DMI_PRODUCT_VERSION, "RU2"),
2891+
},
2892+
.driver_data = (unsigned long *)(RT5670_DMIC_EN |
2893+
RT5670_DMIC2_INR |
2894+
RT5670_DEV_GPIO |
2895+
RT5670_JD_MODE3),
2896+
},
28852897
{}
28862898
};
28872899

‎sound/soc/intel/common/soc-acpi-intel-byt-match.c‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ static unsigned long byt_machine_id;
2222

2323
#define BYT_THINKPAD_10 1
2424
#define BYT_POV_P1006W 2
25+
#define BYT_AEGEX_10 3
2526

2627
static int byt_thinkpad10_quirk_cb(const struct dmi_system_id *id)
2728
{
@@ -35,6 +36,12 @@ static int byt_pov_p1006w_quirk_cb(const struct dmi_system_id *id)
3536
return 1;
3637
}
3738

39+
static int byt_aegex10_quirk_cb(const struct dmi_system_id *id)
40+
{
41+
byt_machine_id = BYT_AEGEX_10;
42+
return 1;
43+
}
44+
3845
static const struct dmi_system_id byt_table[] = {
3946
{
4047
.callback = byt_thinkpad10_quirk_cb,
@@ -75,9 +82,18 @@ static const struct dmi_system_id byt_table[] = {
7582
DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
7683
},
7784
},
85+
{
86+
/* Aegex 10 tablet (RU2) */
87+
.callback = byt_aegex10_quirk_cb,
88+
.matches = {
89+
DMI_MATCH(DMI_SYS_VENDOR, "AEGEX"),
90+
DMI_MATCH(DMI_PRODUCT_VERSION, "RU2"),
91+
},
92+
},
7893
{ }
7994
};
8095

96+
/* The Thinkapd 10 and Aegex 10 tablets have the same ID problem */
8197
static struct snd_soc_acpi_mach byt_thinkpad_10 = {
8298
.id = "10EC5640",
8399
.drv_name = "cht-bsw-rt5672",
@@ -104,6 +120,7 @@ static struct snd_soc_acpi_mach *byt_quirk(void *arg)
104120

105121
switch (byt_machine_id) {
106122
case BYT_THINKPAD_10:
123+
case BYT_AEGEX_10:
107124
return &byt_thinkpad_10;
108125
case BYT_POV_P1006W:
109126
return &byt_pov_p1006w;

0 commit comments

Comments
 (0)