ASoC: Intel: sof_sdw: overwrite mach_params->dmic_num
authorBard Liao <yung-chuan.liao@linux.intel.com>
Tue, 27 Aug 2024 12:32:05 +0000 (20:32 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 28 Aug 2024 12:01:56 +0000 (13:01 +0100)
mach_params->dmic_num will be used to set the cfg-mics value of
card->components string. Overwrite it to the actual number of PCH
DMICs used in the device.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240827123215.258859-8-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_sdw.c

index 3781a27bfbed4db0c8579dc888abf4f1878f7c5e..b06948c16b3f339412debe161fc631b696f99a3d 100644 (file)
@@ -1108,6 +1108,11 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
                else
                        dmic_num = 2;
        }
+       /*
+        * mach_params->dmic_num will be used to set the cfg-mics value of card->components
+        * string. Overwrite it to the actual number of PCH DMICs used in the device.
+        */
+       mach_params->dmic_num = dmic_num;
 
        if (sof_sdw_quirk & SOF_SSP_BT_OFFLOAD_PRESENT)
                bt_num = 1;