mirror of
https://abf.rosa.ru/djam/kernel-5.15.git
synced 2025-02-23 04:42:47 +00:00
51 lines
1.8 KiB
Diff
51 lines
1.8 KiB
Diff
From 293fb4e7f652e1dd219b2681fd66be58d289304e Mon Sep 17 00:00:00 2001
|
|
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
|
Date: Tue, 8 Mar 2022 13:26:09 -0600
|
|
Subject: [PATCH 412/424] ASoC: Intel: sof_es8336: add cfg-dmics component for
|
|
UCM support
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
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: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
|
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
|
|
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
|
|
Link: https://lore.kernel.org/r/20220308192610.392950-20-pierre-louis.bossart@linux.intel.com
|
|
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
---
|
|
sound/soc/intel/boards/sof_es8336.c | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c
|
|
index 32f530304..5e0529aa4 100644
|
|
--- a/sound/soc/intel/boards/sof_es8336.c
|
|
+++ b/sound/soc/intel/boards/sof_es8336.c
|
|
@@ -459,6 +459,8 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev,
|
|
return NULL;
|
|
}
|
|
|
|
+static char soc_components[30];
|
|
+
|
|
/* i2c-<HID>:00 with HID being 8 chars */
|
|
static char codec_name[SND_ACPI_I2C_ID_LEN];
|
|
|
|
@@ -594,6 +596,12 @@ static int sof_es8336_probe(struct platform_device *pdev)
|
|
|
|
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);
|
|
if (ret) {
|
|
gpiod_put(priv->gpio_pa);
|
|
--
|
|
2.35.2
|
|
|