Skip to content

Commit

Permalink
ASoC: Intel: common: add quirk for APL RVP boards
Browse files Browse the repository at this point in the history
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 <andriy.shevchenko@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
plbossart authored and broonie committed Nov 6, 2018
1 parent 97bb91a commit 935ff80
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions sound/soc/intel/common/soc-acpi-intel-bxt-match.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,41 @@
*
*/

#include <linux/dmi.h>
#include <sound/soc-acpi.h>
#include <sound/soc-acpi-intel-match.h>

enum {
APL_RVP,
};

static const struct dmi_system_id apl_table[] = {
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp."),
DMI_MATCH(DMI_BOARD_NAME, "Apollolake RVP1A"),
},
.driver_data = (void *)(APL_RVP),
},
{}
};

static struct snd_soc_acpi_mach *apl_quirk(void *arg)
{
struct snd_soc_acpi_mach *mach = arg;
const struct dmi_system_id *dmi_id;
unsigned long apl_machine_id;

dmi_id = dmi_first_match(apl_table);
if (dmi_id) {
apl_machine_id = (unsigned long)dmi_id->driver_data;
if (apl_machine_id == APL_RVP)
return NULL;
}

return mach;
}

static struct snd_soc_acpi_codecs bxt_codecs = {
.num_codecs = 1,
.codecs = {"MX98357A"}
Expand Down Expand Up @@ -50,6 +82,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_bxt_machines[] = {
{
.id = "INT34C3",
.drv_name = "bxt_tdf8532",
.machine_quirk = apl_quirk,
.sof_fw_filename = "intel/sof-apl.ri",
.sof_tplg_filename = "intel/sof-apl-tdf8532.tplg",
.asoc_plat_name = "0000:00:0e.0",
Expand Down

0 comments on commit 935ff80

Please sign in to comment.