summaryrefslogtreecommitdiffstats
path: root/sound/hda
diff options
context:
space:
mode:
authorCezary Rojewski <cezary.rojewski@intel.com>2020-05-06 22:39:51 +0200
committerTakashi Iwai <tiwai@suse.de>2020-05-07 09:08:12 +0200
commitdf1fceacb24853d79f41a1dd717b32ab08fa5f3f (patch)
tree784f853da67796e5b5f394146638399efc57ed9d /sound/hda
parent28a04aa3ba6046028036d68eab6b9f3f91b47e4e (diff)
downloadlinux-df1fceacb24853d79f41a1dd717b32ab08fa5f3f.tar.bz2
ALSA: hda: Allow SST driver on SKL and KBL platforms with DMIC
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 <cezary.rojewski@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200506203951.6369-1-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/hda')
-rw-r--r--sound/hda/intel-dsp-config.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
index 1c1fdab2a55f..20b8f6cb3ff8 100644
--- a/sound/hda/intel-dsp-config.c
+++ b/sound/hda/intel-dsp-config.c
@@ -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)
@@ -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)
@@ -123,6 +128,10 @@ static const struct config_entry config_table[] = {
{}
}
},
+ {
+ .flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC,
+ .device = 0x9d71,
+ },
#endif
/*
@@ -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;
}