From 31ffb2d041dd517670d7a2723124a22162dac889 Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Tue, 22 Nov 2022 16:55:11 +0800 Subject: [PATCH] ASoC: SOF: ipc3-topology: Ignore the dai_index for ALH from topology Overwrite the dai_index in the struct sof_ipc_comp_dai from the topology file with the platform code provided one, which is already used for the DAI config IPC message. With this change we can be sure that the dai_index is coming from the same source. Signed-off-by: Bard Liao --- sound/soc/sof/ipc3-topology.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sound/soc/sof/ipc3-topology.c b/sound/soc/sof/ipc3-topology.c index e74ebf09b76c33..0fb686b501a65b 100644 --- a/sound/soc/sof/ipc3-topology.c +++ b/sound/soc/sof/ipc3-topology.c @@ -2081,8 +2081,13 @@ static int sof_ipc3_dai_config(struct snd_sof_dev *sdev, struct snd_sof_widget * break; case SOF_DAI_INTEL_ALH: if (data) { + struct sof_dai_private_data *dai_data = dai->private; + struct sof_ipc_comp_dai *comp_dai = dai_data->comp_dai; + config->dai_index = data->dai_index; config->alh.stream_id = data->dai_data; + /* comp_dai->dai_index was from topology, overwrite with the right index. */ + comp_dai->dai_index = config->dai_index; } break; default: