Skip to content

Commit aaa2855

Browse files
brentluplbossart
authored andcommitted
ASoC: Intel: sof_ssp_amp: fix no DMIC BE Link on Chromebooks
The SOF topology supports 2 BE Links(dmic01 and dmic16k) and each link supports up to four DMICs. However, Chromebook does not implement ACPI NHLT table so the mach->mach_params.dmic_num is always zero. We add a quirk so machine driver knows it's running on a Chromebook and need to create BE Links for DMIC. Signed-off-by: Brent Lu <brent.lu@intel.com>
1 parent 68b7676 commit aaa2855

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

sound/soc/intel/boards/sof_ssp_amp.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include <linux/acpi.h>
1111
#include <linux/delay.h>
12+
#include <linux/dmi.h>
1213
#include <linux/module.h>
1314
#include <linux/platform_device.h>
1415
#include <sound/core.h>
@@ -78,6 +79,16 @@ struct sof_card_private {
7879
bool idisp_codec;
7980
};
8081

82+
static const struct dmi_system_id chromebook_platforms[] = {
83+
{
84+
.ident = "Google Chromebooks",
85+
.matches = {
86+
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
87+
}
88+
},
89+
{},
90+
};
91+
8192
static const struct snd_soc_dapm_widget sof_ssp_amp_dapm_widgets[] = {
8293
SND_SOC_DAPM_MIC("SoC DMIC", NULL),
8394
};
@@ -371,7 +382,7 @@ static int sof_ssp_amp_probe(struct platform_device *pdev)
371382
struct snd_soc_dai_link *dai_links;
372383
struct snd_soc_acpi_mach *mach;
373384
struct sof_card_private *ctx;
374-
int dmic_be_num, hdmi_num = 0;
385+
int dmic_be_num = 0, hdmi_num = 0;
375386
int ret, ssp_codec;
376387

377388
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
@@ -383,7 +394,8 @@ static int sof_ssp_amp_probe(struct platform_device *pdev)
383394

384395
mach = pdev->dev.platform_data;
385396

386-
dmic_be_num = mach->mach_params.dmic_num;
397+
if (dmi_check_system(chromebook_platforms) || mach->mach_params.dmic_num > 0)
398+
dmic_be_num = 2;
387399

388400
ssp_codec = sof_ssp_amp_quirk & SOF_AMPLIFIER_SSP_MASK;
389401

0 commit comments

Comments
 (0)