summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/ipc4-pcm.c
diff options
context:
space:
mode:
authorBard Liao <yung-chuan.liao@linux.intel.com>2022-11-08 08:29:10 +0800
committerMark Brown <broonie@kernel.org>2022-11-09 13:44:20 +0000
commita2ba1f70b301b366666e739a1f951f57b8af2cce (patch)
treee03c30bc8027757718796db5ffc46de2453a010d /sound/soc/sof/ipc4-pcm.c
parenteb2eaf50395a8164f4f9e0021609ddb40ad97e87 (diff)
downloadlinux-stable-a2ba1f70b301b366666e739a1f951f57b8af2cce.tar.gz
linux-stable-a2ba1f70b301b366666e739a1f951f57b8af2cce.tar.bz2
linux-stable-a2ba1f70b301b366666e739a1f951f57b8af2cce.zip
ASoC: SOF: ipc4: get pipeline instance id from pipe_widget->instance_id
Currently we set pipeline instance id = swidget->pipeline_id, but pipeline_id is from topology and can be any number. In fact, the number of pipelines is limited. This patch use ida to allocate pipeline instance id and will be used for pipeline instance id in the IPC message. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221108002910.2819709-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/ipc4-pcm.c')
-rw-r--r--sound/soc/sof/ipc4-pcm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/sof/ipc4-pcm.c b/sound/soc/sof/ipc4-pcm.c
index 732872395980..96941bebc1f1 100644
--- a/sound/soc/sof/ipc4-pcm.c
+++ b/sound/soc/sof/ipc4-pcm.c
@@ -81,7 +81,7 @@ static int sof_ipc4_trigger_pipelines(struct snd_soc_component *component,
/* first set the pipeline to PAUSED state */
if (pipeline->state != SOF_IPC4_PIPE_PAUSED) {
- ret = sof_ipc4_set_pipeline_state(sdev, swidget->pipeline_id,
+ ret = sof_ipc4_set_pipeline_state(sdev, pipeline_widget->instance_id,
SOF_IPC4_PIPE_PAUSED);
if (ret < 0) {
dev_err(sdev->dev, "failed to pause pipeline %d\n",
@@ -96,7 +96,7 @@ static int sof_ipc4_trigger_pipelines(struct snd_soc_component *component,
continue;
/* then set the final state */
- ret = sof_ipc4_set_pipeline_state(sdev, swidget->pipeline_id, state);
+ ret = sof_ipc4_set_pipeline_state(sdev, pipeline_widget->instance_id, state);
if (ret < 0) {
dev_err(sdev->dev, "failed to set state %d for pipeline %d\n",
state, swidget->pipeline_id);