[PATCH 07/14] ASoC: Intel: sof_sdw: add mic:dmic and cfg-mics component strings
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Thu Feb 4 21:33:05 CET 2021
UCM needs to know which microphone is used (dmic or RT715-based),
let's add the information in the component string.
Note the slight change from HDAudio platforms where 'cfg-dmics' was
used. 'cfg-mics' is used here with the intent that this component
string describes either the number of PCH-attached microphones or the
number of RT715-attached ones (the assumption is that the two
configurations are mutually exclusive).
Suggested-by: Jaroslav Kysela <perex at perex.cz>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski at intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen at linux.intel.com>
---
sound/soc/intel/boards/sof_sdw.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index 0e83db947a57..d1251a6ac3af 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -1222,6 +1222,15 @@ static int mc_probe(struct platform_device *pdev)
if (!card->components)
return -ENOMEM;
+ if (mach->mach_params.dmic_num) {
+ card->components = devm_kasprintf(card->dev, GFP_KERNEL,
+ "%s mic:dmic cfg-mics:%d",
+ card->components,
+ mach->mach_params.dmic_num);
+ if (!card->components)
+ return -ENOMEM;
+ }
+
card->long_name = sdw_card_long_name;
/* Register the card */
--
2.25.1
More information about the Alsa-devel
mailing list