Skip to content

Commit ce148c8

Browse files
committed
ASoC: SOF: sof-audio: skip prepared widgets when pipeline is prepared
When walking the list of connected widgets, the pipeline_params for each widget is modified by the source widget in the path in prepare case. The first source widget is a AIF type for playback and DAI type for capture case. In AEC case a feedback buffer is shared between two streams, one prepared DAI widget in the stream for producing feedback buffer is included in widget list for AEC stream and used for source widget. This will result to incorrect pipeline_params. This patch skip prepared widget in anther stream and use the widget in the current stream for pipeline_param prepare. Signed-off-by: Rander Wang <[email protected]>
1 parent 0741361 commit ce148c8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sound/soc/sof/sof-audio.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,8 +611,16 @@ sof_walk_widgets_in_order(struct snd_sof_dev *sdev, struct snd_sof_pcm *spcm,
611611
break;
612612
case SOF_WIDGET_PREPARE:
613613
{
614+
struct snd_sof_widget *swidget = widget->dobj.private;
614615
struct snd_pcm_hw_params pipeline_params;
615616

617+
/* In case that feedback buffer is shared between two stream, a prepared
618+
* widget in another stream for producing feedback buffer should be skipped
619+
* since pipeline_params is built based on the current stream, not feedback stream.
620+
*/
621+
if (swidget->prepared)
622+
continue;
623+
616624
str = "prepare";
617625
/*
618626
* When walking the list of connected widgets, the pipeline_params for each

0 commit comments

Comments
 (0)