Skip to content

Commit

Permalink
ALSA: hda: Allow SST driver on SKL and KBL platforms with DMIC
Browse files Browse the repository at this point in the history
Update intel-dspcfg with FLAG_SST_ONLY_IF_DMIC option and use it for
Skylake and Kabylake platforms when DMIC is present.

Signed-off-by: Cezary Rojewski <[email protected]>
Acked-by: Pierre-Louis Bossart <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
crojewsk-intel authored and tiwai committed May 7, 2020
1 parent 28a04aa commit df1fcea
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions sound/hda/intel-dsp-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ MODULE_PARM_DESC(dsp_driver, "Force the DSP driver for Intel DSP (0=auto, 1=lega

#define FLAG_SST BIT(0)
#define FLAG_SOF BIT(1)
#define FLAG_SST_ONLY_IF_DMIC BIT(15)
#define FLAG_SOF_ONLY_IF_DMIC BIT(16)
#define FLAG_SOF_ONLY_IF_SOUNDWIRE BIT(17)

Expand Down Expand Up @@ -107,6 +108,10 @@ static const struct config_entry config_table[] = {
{}
}
},
{
.flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC,
.device = 0x9d70,
},
#endif
/* Kabylake-LP */
#if IS_ENABLED(CONFIG_SND_SOC_INTEL_KBL)
Expand All @@ -123,6 +128,10 @@ static const struct config_entry config_table[] = {
{}
}
},
{
.flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC,
.device = 0x9d71,
},
#endif

/*
Expand Down Expand Up @@ -410,8 +419,17 @@ int snd_intel_dsp_driver_probe(struct pci_dev *pci)
return SND_INTEL_DSP_DRIVER_SOF;
}

if (cfg->flags & FLAG_SST)
return SND_INTEL_DSP_DRIVER_SST;

if (cfg->flags & FLAG_SST) {
if (cfg->flags & FLAG_SST_ONLY_IF_DMIC) {
if (snd_intel_dsp_check_dmic(pci)) {
dev_info(&pci->dev, "Digital mics found on Skylake+ platform, using SST driver\n");
return SND_INTEL_DSP_DRIVER_SST;
}
} else {
return SND_INTEL_DSP_DRIVER_SST;
}
}

return SND_INTEL_DSP_DRIVER_LEGACY;
}
Expand Down

0 comments on commit df1fcea

Please sign in to comment.