All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] ASoC: SOF: sof-audio: setup sched widgets during pipeline" failed to apply to 5.16-stable tree
@ 2022-01-24 13:59 gregkh
  2022-01-24 14:32 ` Pierre-Louis Bossart
  0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2022-01-24 13:59 UTC (permalink / raw)
  To: pierre-louis.bossart, broonie, kai.vehmanen, ranjani.sridharan; +Cc: stable


The patch below does not apply to the 5.16-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 01429183f479c54c1b5d15453a8ce574ea43e525 Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date: Tue, 23 Nov 2021 19:16:04 +0200
Subject: [PATCH] ASoC: SOF: sof-audio: setup sched widgets during pipeline
 complete step

Older firmware prior to ABI 3.19 has a dependency where the scheduler
widgets need to be setup last. Moving the call to sof_widget_setup()
before the pipeline_complete() call also helps remove the need for the
'reverse' direction when walking through the widget list - this was
only working because of the topology macros but the topology does not
require any order.

Fixes: 5fcdbb2d45df ("ASoC: SOF: Add support for dynamic pipelines")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20211123171606.129350-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

diff --git a/sound/soc/sof/sof-audio.c b/sound/soc/sof/sof-audio.c
index 0f2566f7c094..f4e142ec0fbd 100644
--- a/sound/soc/sof/sof-audio.c
+++ b/sound/soc/sof/sof-audio.c
@@ -637,16 +637,25 @@ const struct sof_ipc_pipe_new *snd_sof_pipeline_find(struct snd_sof_dev *sdev,
 
 int sof_set_up_pipelines(struct snd_sof_dev *sdev, bool verify)
 {
+	struct sof_ipc_fw_version *v = &sdev->fw_ready.version;
 	struct snd_sof_widget *swidget;
 	struct snd_sof_route *sroute;
 	int ret;
 
 	/* restore pipeline components */
-	list_for_each_entry_reverse(swidget, &sdev->widget_list, list) {
+	list_for_each_entry(swidget, &sdev->widget_list, list) {
 		/* only set up the widgets belonging to static pipelines */
 		if (!verify && swidget->dynamic_pipeline_widget)
 			continue;
 
+		/*
+		 * For older firmware, skip scheduler widgets in this loop,
+		 * sof_widget_setup() will be called in the 'complete pipeline' loop
+		 */
+		if (v->abi_version < SOF_ABI_VER(3, 19, 0) &&
+		    swidget->id == snd_soc_dapm_scheduler)
+			continue;
+
 		/* update DAI config. The IPC will be sent in sof_widget_setup() */
 		if (WIDGET_IS_DAI(swidget->id)) {
 			struct snd_sof_dai *dai = swidget->private;
@@ -694,6 +703,12 @@ int sof_set_up_pipelines(struct snd_sof_dev *sdev, bool verify)
 			if (!verify && swidget->dynamic_pipeline_widget)
 				continue;
 
+			if (v->abi_version < SOF_ABI_VER(3, 19, 0)) {
+				ret = sof_widget_setup(sdev, swidget);
+				if (ret < 0)
+					return ret;
+			}
+
 			swidget->complete =
 				snd_sof_complete_pipeline(sdev, swidget);
 			break;
@@ -722,7 +737,7 @@ int sof_tear_down_pipelines(struct snd_sof_dev *sdev, bool verify)
 	 * sroute->setup because during suspend all streams are suspended and during topology
 	 * loading the sound card unavailable to open PCMs.
 	 */
-	list_for_each_entry_reverse(swidget, &sdev->widget_list, list) {
+	list_for_each_entry(swidget, &sdev->widget_list, list) {
 		if (swidget->dynamic_pipeline_widget)
 			continue;
 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: FAILED: patch "[PATCH] ASoC: SOF: sof-audio: setup sched widgets during pipeline" failed to apply to 5.16-stable tree
  2022-01-24 13:59 FAILED: patch "[PATCH] ASoC: SOF: sof-audio: setup sched widgets during pipeline" failed to apply to 5.16-stable tree gregkh
@ 2022-01-24 14:32 ` Pierre-Louis Bossart
  2022-01-24 14:50   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre-Louis Bossart @ 2022-01-24 14:32 UTC (permalink / raw)
  To: gregkh, broonie, kai.vehmanen, ranjani.sridharan; +Cc: stable



On 1/24/22 07:59, gregkh@linuxfoundation.org wrote:
> 
> The patch below does not apply to the 5.16-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.

Yes, it looks like we've missing two dependencies. the following
sequence applies on top of v5.16.2

git cherry-pick 7cc7b9ba21d4978d19f0e3edc2b00d44c9d66ff6
git cherry-pick b2ebcf42a48f4560862bb811f3268767d17ebdcd

and then this commit
git cherry-pick 01429183f479c54c1b5d15453a8ce574ea43e525

I would recommend adding these three patches to avoid issues with
dynamic pipelines.


> thanks,
> 
> greg k-h
> 
> ------------------ original commit in Linus's tree ------------------
> 
> From 01429183f479c54c1b5d15453a8ce574ea43e525 Mon Sep 17 00:00:00 2001
> From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Date: Tue, 23 Nov 2021 19:16:04 +0200
> Subject: [PATCH] ASoC: SOF: sof-audio: setup sched widgets during pipeline
>  complete step
> 
> Older firmware prior to ABI 3.19 has a dependency where the scheduler
> widgets need to be setup last. Moving the call to sof_widget_setup()
> before the pipeline_complete() call also helps remove the need for the
> 'reverse' direction when walking through the widget list - this was
> only working because of the topology macros but the topology does not
> require any order.
> 
> Fixes: 5fcdbb2d45df ("ASoC: SOF: Add support for dynamic pipelines")
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
> Link: https://lore.kernel.org/r/20211123171606.129350-1-kai.vehmanen@linux.intel.com
> Signed-off-by: Mark Brown <broonie@kernel.org>
> 
> diff --git a/sound/soc/sof/sof-audio.c b/sound/soc/sof/sof-audio.c
> index 0f2566f7c094..f4e142ec0fbd 100644
> --- a/sound/soc/sof/sof-audio.c
> +++ b/sound/soc/sof/sof-audio.c
> @@ -637,16 +637,25 @@ const struct sof_ipc_pipe_new *snd_sof_pipeline_find(struct snd_sof_dev *sdev,
>  
>  int sof_set_up_pipelines(struct snd_sof_dev *sdev, bool verify)
>  {
> +	struct sof_ipc_fw_version *v = &sdev->fw_ready.version;
>  	struct snd_sof_widget *swidget;
>  	struct snd_sof_route *sroute;
>  	int ret;
>  
>  	/* restore pipeline components */
> -	list_for_each_entry_reverse(swidget, &sdev->widget_list, list) {
> +	list_for_each_entry(swidget, &sdev->widget_list, list) {
>  		/* only set up the widgets belonging to static pipelines */
>  		if (!verify && swidget->dynamic_pipeline_widget)
>  			continue;
>  
> +		/*
> +		 * For older firmware, skip scheduler widgets in this loop,
> +		 * sof_widget_setup() will be called in the 'complete pipeline' loop
> +		 */
> +		if (v->abi_version < SOF_ABI_VER(3, 19, 0) &&
> +		    swidget->id == snd_soc_dapm_scheduler)
> +			continue;
> +
>  		/* update DAI config. The IPC will be sent in sof_widget_setup() */
>  		if (WIDGET_IS_DAI(swidget->id)) {
>  			struct snd_sof_dai *dai = swidget->private;
> @@ -694,6 +703,12 @@ int sof_set_up_pipelines(struct snd_sof_dev *sdev, bool verify)
>  			if (!verify && swidget->dynamic_pipeline_widget)
>  				continue;
>  
> +			if (v->abi_version < SOF_ABI_VER(3, 19, 0)) {
> +				ret = sof_widget_setup(sdev, swidget);
> +				if (ret < 0)
> +					return ret;
> +			}
> +
>  			swidget->complete =
>  				snd_sof_complete_pipeline(sdev, swidget);
>  			break;
> @@ -722,7 +737,7 @@ int sof_tear_down_pipelines(struct snd_sof_dev *sdev, bool verify)
>  	 * sroute->setup because during suspend all streams are suspended and during topology
>  	 * loading the sound card unavailable to open PCMs.
>  	 */
> -	list_for_each_entry_reverse(swidget, &sdev->widget_list, list) {
> +	list_for_each_entry(swidget, &sdev->widget_list, list) {
>  		if (swidget->dynamic_pipeline_widget)
>  			continue;
>  
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: FAILED: patch "[PATCH] ASoC: SOF: sof-audio: setup sched widgets during pipeline" failed to apply to 5.16-stable tree
  2022-01-24 14:32 ` Pierre-Louis Bossart
@ 2022-01-24 14:50   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2022-01-24 14:50 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: broonie, kai.vehmanen, ranjani.sridharan, stable

On Mon, Jan 24, 2022 at 08:32:26AM -0600, Pierre-Louis Bossart wrote:
> 
> 
> On 1/24/22 07:59, gregkh@linuxfoundation.org wrote:
> > 
> > The patch below does not apply to the 5.16-stable tree.
> > If someone wants it applied there, or to any other stable or longterm
> > tree, then please email the backport, including the original git commit
> > id to <stable@vger.kernel.org>.
> 
> Yes, it looks like we've missing two dependencies. the following
> sequence applies on top of v5.16.2
> 
> git cherry-pick 7cc7b9ba21d4978d19f0e3edc2b00d44c9d66ff6
> git cherry-pick b2ebcf42a48f4560862bb811f3268767d17ebdcd
> 
> and then this commit
> git cherry-pick 01429183f479c54c1b5d15453a8ce574ea43e525
> 
> I would recommend adding these three patches to avoid issues with
> dynamic pipelines.

Thanks, all now queued up.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-24 14:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 13:59 FAILED: patch "[PATCH] ASoC: SOF: sof-audio: setup sched widgets during pipeline" failed to apply to 5.16-stable tree gregkh
2022-01-24 14:32 ` Pierre-Louis Bossart
2022-01-24 14:50   ` Greg KH

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.