Skip to content

Commit 935ff80

Browse files
plbossartbroonie
authored andcommitted
ASoC: Intel: common: add quirk for APL RVP boards
For some reason the RVP/LeafHill SSDT exposes an INT34C3 ID which is used on other boards to point to the TDF8532 amplifier. Yay BIOS. Add a DMI-quirk to ignore this ID and check for other valid machine driver descriptors. Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 97bb91a commit 935ff80

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

sound/soc/intel/common/soc-acpi-intel-bxt-match.c

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,41 @@
66
*
77
*/
88

9+
#include <linux/dmi.h>
910
#include <sound/soc-acpi.h>
1011
#include <sound/soc-acpi-intel-match.h>
1112

13+
enum {
14+
APL_RVP,
15+
};
16+
17+
static const struct dmi_system_id apl_table[] = {
18+
{
19+
.matches = {
20+
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp."),
21+
DMI_MATCH(DMI_BOARD_NAME, "Apollolake RVP1A"),
22+
},
23+
.driver_data = (void *)(APL_RVP),
24+
},
25+
{}
26+
};
27+
28+
static struct snd_soc_acpi_mach *apl_quirk(void *arg)
29+
{
30+
struct snd_soc_acpi_mach *mach = arg;
31+
const struct dmi_system_id *dmi_id;
32+
unsigned long apl_machine_id;
33+
34+
dmi_id = dmi_first_match(apl_table);
35+
if (dmi_id) {
36+
apl_machine_id = (unsigned long)dmi_id->driver_data;
37+
if (apl_machine_id == APL_RVP)
38+
return NULL;
39+
}
40+
41+
return mach;
42+
}
43+
1244
static struct snd_soc_acpi_codecs bxt_codecs = {
1345
.num_codecs = 1,
1446
.codecs = {"MX98357A"}
@@ -50,6 +82,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_bxt_machines[] = {
5082
{
5183
.id = "INT34C3",
5284
.drv_name = "bxt_tdf8532",
85+
.machine_quirk = apl_quirk,
5386
.sof_fw_filename = "intel/sof-apl.ri",
5487
.sof_tplg_filename = "intel/sof-apl-tdf8532.tplg",
5588
.asoc_plat_name = "0000:00:0e.0",

0 commit comments

Comments
 (0)