aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBard Liao <[email protected]>2023-04-19 14:55:22 -0500
committerMark Brown <[email protected]>2023-04-20 12:51:52 +0100
commit16373f30777f45823fa68e850b230fa2ef9d7e92 (patch)
tree7347e17eeead8796ef9cdb7c07f9d6d208cc3846
parente9fcbaff5fb871f1a10f09d7d1a4cd13c923e280 (diff)
ASoC: Intel: sof_sdw: set codec_num = 1 if the device is not aggregated
We assume adr_link->num_adr = 1 if a device is not aggregated. However, the assumption is not valid if there are different type devices on the same soundwire link. Signed-off-by: Bard Liao <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Rander Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/intel/boards/sof_sdw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index 7d398b45d48f..e5729df4fd44 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -961,6 +961,7 @@ static int get_slave_info(const struct snd_soc_acpi_link_adr *adr_link,
cpu_dai_id[index++] = ffs(adr_link->mask) - 1;
if (!adr_d->endpoints->aggregated || no_aggregation) {
*cpu_dai_num = 1;
+ *codec_num = 1;
*group_id = 0;
return 0;
}