Skip to content

Commit

Permalink
ASoC: Intel: sof_sdw: correct mach_params->dmic_num
Browse files Browse the repository at this point in the history
mach_params->dmic_num will be used to set the cfg-mics value of
card->components string which should be the dmic channels. However
dmic_num is dmic link number and could be set due to the SOC_SDW_PCH_DMIC
quirk. Set mach_params->dmic_num to the default value 2 if it is not set
and dmic_num is set.

Fixes: 7db9f63 ("ASoC: Intel: sof_sdw: overwrite mach_params->dmic_num")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
  • Loading branch information
bardliao committed Nov 13, 2024
1 parent b0dc371 commit 78e4396
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sound/soc/intel/boards/sof_sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1141,9 +1141,11 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
}
/*
* 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.
* string. Set it to the default value 2 if dmic link is created, but mach_params->dmic_num
* is not set.
*/
mach_params->dmic_num = dmic_num;
if (dmic_num && !mach_params->dmic_num)
mach_params->dmic_num = 2;

if (sof_sdw_quirk & SOF_SSP_BT_OFFLOAD_PRESENT)
bt_num = 1;
Expand Down

0 comments on commit 78e4396

Please sign in to comment.