Commit 209b0b0d authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: Intel: sof_sdw: add mic:dmic and cfg-mics component strings

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: default avatarJaroslav Kysela <perex@perex.cz>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210208233336.59449-5-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent d92e279d
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment