diff options
author | Jaroslav Kysela <perex@perex.cz> | 2019-12-05 00:15:44 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-12-09 21:36:52 +0300 |
commit | 8cd9956f61c65022209ce6d1e55ed12aea12357d (patch) | |
tree | 0dda9b368e2e9d331ae8c34198f9594664eaedf4 /sound/soc/intel/boards/skl_hda_dsp_generic.c | |
parent | 1442842952ccfe4178602c7a8459ac2ecb9d9e1a (diff) | |
download | linux-8cd9956f61c65022209ce6d1e55ed12aea12357d.tar.xz |
ASoC: intel/skl/hda - export number of digital microphones via control components
It is required for the auto-detection in the user space (for UCM).
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20191204211556.12671-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/skl_hda_dsp_generic.c')
-rw-r--r-- | sound/soc/intel/boards/skl_hda_dsp_generic.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/intel/boards/skl_hda_dsp_generic.c b/sound/soc/intel/boards/skl_hda_dsp_generic.c index 4e45901e3a2f..11eaee9ae41f 100644 --- a/sound/soc/intel/boards/skl_hda_dsp_generic.c +++ b/sound/soc/intel/boards/skl_hda_dsp_generic.c @@ -100,6 +100,8 @@ static struct snd_soc_card hda_soc_card = { .late_probe = skl_hda_card_late_probe, }; +static char hda_soc_components[30]; + #define IDISP_DAI_COUNT 3 #define HDAC_DAI_COUNT 2 #define DMIC_DAI_COUNT 2 @@ -183,6 +185,12 @@ static int skl_hda_audio_probe(struct platform_device *pdev) hda_soc_card.dev = &pdev->dev; snd_soc_card_set_drvdata(&hda_soc_card, ctx); + if (mach->mach_params.dmic_num > 0) { + snprintf(hda_soc_components, sizeof(hda_soc_components), + "cfg-dmics:%d", mach->mach_params.dmic_num); + hda_soc_card.components = hda_soc_components; + } + return devm_snd_soc_register_card(&pdev->dev, &hda_soc_card); } |