ALSA: hda: Allow SST driver on SKL and KBL platforms with DMIC
PATCH 1/1 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.
--- sound/hda/intel-dsp-config.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
sound/hda/intel-dsp-config.c +20 -2
@@ -16,6 +16,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)struct config_entry {
@@ -100,6 +101,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 )
@@ -116,6 +121,10 @@ static const struct config_entry config_table[] = { {} } }, + { + .flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC, + .device = 0x9d71, + }, #endif/*
@@ -346,8 +355,17 @@ int snd_intel_dsp_driver_probe(struct pci_dev *pci) } } -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 ; }
Signature · 1 line
2.17.1
Quoted 2 lines · Cezary Rojewski
Update intel-dspcfg with
FLAG_SST_ONLY_IF_DMICoption and use it for Skylake and Kabylake platforms when DMIC is present.
Sounds good Cezary but your changes will not apply on Takashi's for-5.8 tree, they will have a minor conflict with my SoundWire changes submitted in early April.
++<<<<<<< HEAD
+#define FLAG_SST BIT(0) +#define FLAG_SOF BIT(1) +#define FLAG_SOF_ONLY_IF_DMIC BIT(16) +#define FLAG_SOF_ONLY_IF_SOUNDWIRE BIT(17)
+
+#define FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE (FLAG_SOF_ONLY_IF_DMIC | \
+ FLAG_SOF_ONLY_IF_SOUNDWIRE)
++=======
+ #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)
++>>>>>>> ALSA: hda: Allow SST driver on SKL and KBL platforms with DMIC
Quoted 61 lines
Signed-off-by Cezary Rojewski <[email protected]>--- sound/hda/intel-dsp-config.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)sound/hda/intel-dsp-config.c +20
-2@@ -16,6 +16,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)struct config_entry {@@ -100,6 +101,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 )@@ -116,6 +121,10 @@ static const struct config_entry config_table[] = { {} } }, + { + .flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC, + .device = 0x9d71, + }, #endif/* @@ -346,8 +355,17 @@ int snd_intel_dsp_driver_probe(struct pci_dev *pci) } } -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 ; }
Quoted 6 lines · Pierre-Louis Bossart
Quoted 2 lines · Cezary Rojewski
Update intel-dspcfg with
FLAG_SST_ONLY_IF_DMICoption and use it for Skylake and Kabylake platforms when DMIC is present.Sounds good Cezary but your changes will not apply on Takashi's for-5.8 tree, they will have a minor conflict with my SoundWire changes submitted in early April.
Quoted 16 lines
++<<<<<<< HEAD
+#define FLAG_SST BIT(0)
+#define FLAG_SOF BIT(1)
+#define FLAG_SOF_ONLY_IF_DMIC BIT(16)
+#define FLAG_SOF_ONLY_IF_SOUNDWIRE BIT(17)
+
+#defineFLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE(FLAG_SOF_ONLY_IF_DMIC| \
+FLAG_SOF_ONLY_IF_SOUNDWIRE)
++=======
+ #define FLAG_SST BIT(0)
+ #define FLAG_SOF BIT(1)
+ #defineFLAG_SST_ONLY_IF_DMICBIT(15)
+ #defineFLAG_SOF_ONLY_IF_DMICBIT(16)
++>>>>>>> ALSA: hda: Allow SST driver on SKL and KBL platforms with DMIC
Indeed, thanks for heads up, Pierre! Fixed in v2.