[SRU][OEM-5.6][PATCH 05/15] ASoC: topology: set component dai_index to ipc dai config dai_index

Hui Wang hui.wang at canonical.com
Fri Oct 16 01:22:27 UTC 2020


From: Bard Liao <yung-chuan.liao at linux.intel.com>

BugLink: https://bugs.launchpad.net/bugs/1900069

The ipc dai config dai_index is from topology. However, the same dai
config will be applied to all DAIs in the same dai link. We have to
ensure that the ipc dai config's dai_index match to the component's
dai_index.

Signed-off-by: Bard Liao <yung-chuan.liao at linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski at linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen at linux.intel.com>
Link: https://lore.kernel.org/r/20200427172939.25848-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie at kernel.org>
(cherry picked from commit 744a3bb3b4b6c4073ae9381a02c9824b29dd1a05)
Signed-off-by: Hui Wang <hui.wang at canonical.com>
---
 sound/soc/sof/topology.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index 35f1050a643d..e344bd1121db 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -2652,6 +2652,14 @@ static int sof_set_dai_config(struct snd_sof_dev *sdev, u32 size,
 			struct sof_ipc_reply reply;
 			int ret;
 
+			/*
+			 * the same dai config will be applied to all DAIs in
+			 * the same dai link. We have to ensure that the ipc
+			 * dai config's dai_index match to the component's
+			 * dai_index.
+			 */
+			config->dai_index = dai->comp_dai.dai_index;
+
 			/* send message to DSP */
 			ret = sof_ipc_tx_message(sdev->ipc,
 						 config->hdr.cmd, config, size,
-- 
2.17.1




More information about the kernel-team mailing list