All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Vehmanen <kai.vehmanen@linux.intel.com>
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
	kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com,
	lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com,
	ranjani.sridharan@linux.intel.com, daniel.baluta@nxp.com
Subject: [PATCH 06/10] ASoC: SOF: topology: remove sof_load_pipeline_ipc()
Date: Fri, 19 Nov 2021 21:26:17 +0200	[thread overview]
Message-ID: <20211119192621.4096077-7-kai.vehmanen@linux.intel.com> (raw)
In-Reply-To: <20211119192621.4096077-1-kai.vehmanen@linux.intel.com>

From: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>

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>
---
 sound/soc/sof/sof-audio.c |  3 ++-
 sound/soc/sof/sof-audio.h |  4 ----
 sound/soc/sof/topology.c  | 17 -----------------
 3 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/sound/soc/sof/sof-audio.c b/sound/soc/sof/sof-audio.c
index 7cbe757c1fe2..a019355e0bcf 100644
--- a/sound/soc/sof/sof-audio.c
+++ b/sound/soc/sof/sof-audio.c
@@ -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;
diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index 05e98e231b85..6c591b7a531c 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -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);
 
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index 10caf2b1a33c..3a49d7910326 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -1707,23 +1707,6 @@ static int sof_widget_load_pcm(struct snd_soc_component *scomp, int index,
 /*
  * 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)
-- 
2.33.0


  parent reply	other threads:[~2021-11-19 19:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 19:26 [PATCH 00/10] ASoC: SOF: enable multicore with dynamic pipelines Kai Vehmanen
2021-11-19 19:26 ` [PATCH 01/10] ASoC: SOF: Intel: hda: expose get_chip_info() Kai Vehmanen
2021-11-19 19:26 ` [PATCH 02/10] ASoC: SOF: Introduce num_cores and ref count per core Kai Vehmanen
2021-11-19 19:26 ` [PATCH 03/10] ASoC: SOF: Add ops for core_get and core_put Kai Vehmanen
2021-11-19 19:26 ` [PATCH 04/10] ASoC: SOF: Intel: TGL: set core_get/put ops Kai Vehmanen
2021-11-19 19:26 ` [PATCH 05/10] ASoC: SOF: Intel: CNL/ICL/APL: set core_get/core_put ops Kai Vehmanen
2021-11-19 19:26 ` Kai Vehmanen [this message]
2021-11-19 19:26 ` [PATCH 07/10] ASoC: SOF: free widgets in sof_tear_down_pipelines() for static pipelines Kai Vehmanen
2021-11-19 19:26 ` [PATCH 08/10] ASoC: SOF: hda: don't use the core op for power up/power down Kai Vehmanen
2021-11-19 19:26 ` [PATCH 09/10] ASoC: SOF: add support for dynamic pipelines with multi-core Kai Vehmanen
2021-11-19 19:26 ` [PATCH 10/10] ASoC: SOF: Intel: hda: free DAI widget during stop and suspend Kai Vehmanen
2021-11-23  0:00 ` [PATCH 00/10] ASoC: SOF: enable multicore with dynamic pipelines Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211119192621.4096077-7-kai.vehmanen@linux.intel.com \
    --to=kai.vehmanen@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.