ASoC: topology: set component dai_index to ipc dai config dai_index

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@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200427172939.25848-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Bard Liao 2020-04-27 10:29:37 -07:00 committed by Mark Brown
parent 726e6142b5
commit 744a3bb3b4
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 8 additions and 0 deletions

View File

@ -2693,6 +2693,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,