diff options
author | Bard Liao <yung-chuan.liao@linux.intel.com> | 2024-08-27 14:32:04 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-08-28 14:01:55 +0200 |
commit | 775c1a4aa640c701eb67d3954a375000d2be3af5 (patch) | |
tree | 39317cd2f74a1ce549e8dc48945fad6323656806 /sound/soc/intel | |
parent | ASoC: SOF: Intel: hda: refactoring topology name fixup for SDW mach (diff) | |
download | linux-775c1a4aa640c701eb67d3954a375000d2be3af5.tar.xz linux-775c1a4aa640c701eb67d3954a375000d2be3af5.zip |
ASoC: Intel: sof_sdw: move ignore_internal_dmic check earlier
dmic links will not be created if ctx->ignore_internal_dmic is set, and
dmic_num should be 0 in this case. Move ignore_internal_dmic check
earlier where dmic_num is set to get an accurate dmic_num.
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-7-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel')
-rw-r--r-- | sound/soc/intel/boards/sof_sdw.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 9b642c6883b0..3781a27bfbed 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -1102,8 +1102,12 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) hdmi_num = SOF_PRE_TGL_HDMI_COUNT; /* enable dmic01 & dmic16k */ - if (sof_sdw_quirk & SOC_SDW_PCH_DMIC || mach_params->dmic_num) - dmic_num = 2; + if (sof_sdw_quirk & SOC_SDW_PCH_DMIC || mach_params->dmic_num) { + if (ctx->ignore_internal_dmic) + dev_warn(dev, "Ignoring PCH DMIC\n"); + else + dmic_num = 2; + } if (sof_sdw_quirk & SOF_SSP_BT_OFFLOAD_PRESENT) bt_num = 1; @@ -1148,14 +1152,10 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) } /* dmic */ - if (dmic_num > 0) { - if (ctx->ignore_internal_dmic) { - dev_warn(dev, "Ignoring PCH DMIC\n"); - } else { - ret = create_dmic_dailinks(card, &dai_links, &be_id); - if (ret) - goto err_end; - } + if (dmic_num) { + ret = create_dmic_dailinks(card, &dai_links, &be_id); + if (ret) + goto err_end; } /* HDMI */ |