ASoC: SOF: topology: remove sof_load_pipeline_ipc()
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Fri, 19 Nov 2021 19:26:17 +0000 (21:26 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 22 Nov 2021 15:40:20 +0000 (15:40 +0000)
Remove the function sof_load_pipeline_ipc() and directly
send the IPC instead. The pipeline core is already enabled
with the call to sof_pipeline_core_enable() in sof_widget_setup().

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20211119192621.4096077-7-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/sof-audio.c
sound/soc/sof/sof-audio.h
sound/soc/sof/topology.c

index 7cbe757c1fe29636353a703d20b60a5c02ba032f..a019355e0bcf03825e77302d999974c5818361e8 100644 (file)
@@ -203,7 +203,8 @@ int sof_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget)
                break;
        case snd_soc_dapm_scheduler:
                pipeline = swidget->private;
-               ret = sof_load_pipeline_ipc(sdev, pipeline, &r);
+               ret = sof_ipc_tx_message(sdev->ipc, pipeline->hdr.cmd, pipeline,
+                                        sizeof(*pipeline), &r, sizeof(r));
                break;
        default:
                hdr = swidget->private;
index 05e98e231b85df93aa39f33be918810f9c824c2f..6c591b7a531c6a94c410b693ca2340a17b2de9ef 100644 (file)
@@ -184,10 +184,6 @@ void snd_sof_control_notify(struct snd_sof_dev *sdev,
 int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file);
 int snd_sof_complete_pipeline(struct snd_sof_dev *sdev,
                              struct snd_sof_widget *swidget);
-
-int sof_load_pipeline_ipc(struct snd_sof_dev *sdev,
-                         struct sof_ipc_pipe_new *pipeline,
-                         struct sof_ipc_comp_reply *r);
 int sof_pipeline_core_enable(struct snd_sof_dev *sdev,
                             const struct snd_sof_widget *swidget);
 
index 10caf2b1a33ce2de37fbcb98f20c746ebb3cdcd6..3a49d7910326fb543b6c68618e79e6cf8d80dd79 100644 (file)
@@ -1707,23 +1707,6 @@ err:
 /*
  * Pipeline Topology
  */
-int sof_load_pipeline_ipc(struct snd_sof_dev *sdev,
-                         struct sof_ipc_pipe_new *pipeline,
-                         struct sof_ipc_comp_reply *r)
-{
-       int ret = sof_core_enable(sdev, pipeline->core);
-
-       if (ret < 0)
-               return ret;
-
-       ret = sof_ipc_tx_message(sdev->ipc, pipeline->hdr.cmd, pipeline,
-                                sizeof(*pipeline), r, sizeof(*r));
-       if (ret < 0)
-               dev_err(sdev->dev, "error: load pipeline ipc failure\n");
-
-       return ret;
-}
-
 static int sof_widget_load_pipeline(struct snd_soc_component *scomp, int index,
                                    struct snd_sof_widget *swidget,
                                    struct snd_soc_tplg_dapm_widget *tw)