Skip to content

Commit c291583

Browse files
committed
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: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
1 parent 13aa051 commit c291583

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

sound/soc/intel/boards/sof_sdw.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,15 @@ static int mc_probe(struct platform_device *pdev)
12211221
if (!card->components)
12221222
return -ENOMEM;
12231223

1224+
if (mach->mach_params.dmic_num) {
1225+
card->components = devm_kasprintf(card->dev, GFP_KERNEL,
1226+
"%s mic:dmic cfg-mics:%d",
1227+
card->components,
1228+
mach->mach_params.dmic_num);
1229+
if (!card->components)
1230+
return -ENOMEM;
1231+
}
1232+
12241233
card->long_name = sdw_card_long_name;
12251234

12261235
/* Register the card */

0 commit comments

Comments
 (0)