未验证 提交 6e13567d 编写于 作者: P Pierre-Louis Bossart 提交者: Mark Brown

ASoC: Intel: sof_es8336: add cfg-dmics component for UCM support

The presence of DMICs needs to be signaled to UCM, follow the HDaudio
example and use the 'cfg-dmics' component string to report the number
of dmics present on the platform.
Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: NBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: NPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220308192610.392950-20-pierre-louis.bossart@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 70b519e5
...@@ -459,6 +459,8 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, ...@@ -459,6 +459,8 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev,
return NULL; return NULL;
} }
static char soc_components[30];
/* i2c-<HID>:00 with HID being 8 chars */ /* i2c-<HID>:00 with HID being 8 chars */
static char codec_name[SND_ACPI_I2C_ID_LEN]; static char codec_name[SND_ACPI_I2C_ID_LEN];
...@@ -594,6 +596,12 @@ static int sof_es8336_probe(struct platform_device *pdev) ...@@ -594,6 +596,12 @@ static int sof_es8336_probe(struct platform_device *pdev)
snd_soc_card_set_drvdata(card, priv); snd_soc_card_set_drvdata(card, priv);
if (mach->mach_params.dmic_num > 0) {
snprintf(soc_components, sizeof(soc_components),
"cfg-dmics:%d", mach->mach_params.dmic_num);
card->components = soc_components;
}
ret = devm_snd_soc_register_card(dev, card); ret = devm_snd_soc_register_card(dev, card);
if (ret) { if (ret) {
gpiod_put(priv->gpio_pa); gpiod_put(priv->gpio_pa);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册