Skip to content

Commit 3a625fb

Browse files
committed
ASoC: SOF: ipc4-topology: Remove the skip_during_fe_trigger flag
Now that all widgets/routes/pipelines are setup, triggered and freed in the BE DAI ops, we can reuse the be_pipeline flag in struct snd_sof_pipeline to skip triggering the BE pipelines in the PCM trigger. So remove the skip_during_fe_trigger flag from struct sof_ipc4_pipeline. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
1 parent b47c706 commit 3a625fb

File tree

3 files changed

+5
-22
lines changed

3 files changed

+5
-22
lines changed

sound/soc/sof/intel/hda-dai-ops.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,6 @@ static struct hdac_ext_stream *hda_ipc4_get_hext_stream(struct snd_sof_dev *sdev
126126
struct snd_soc_dai *cpu_dai,
127127
struct snd_pcm_substream *substream)
128128
{
129-
struct snd_sof_widget *pipe_widget;
130-
struct sof_ipc4_pipeline *pipeline;
131-
struct snd_sof_widget *swidget;
132-
struct snd_soc_dapm_widget *w;
133-
134-
w = snd_soc_dai_get_widget(cpu_dai, substream->stream);
135-
swidget = w->dobj.private;
136-
pipe_widget = swidget->spipe->pipe_widget;
137-
pipeline = pipe_widget->private;
138-
139-
/* mark pipeline so that it can be skipped during FE trigger */
140-
pipeline->skip_during_fe_trigger = true;
141-
142129
return snd_soc_dai_get_dma_data(cpu_dai, substream);
143130
}
144131

sound/soc/sof/ipc4-pcm.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,8 @@ sof_ipc4_add_pipeline_to_trigger_list(struct snd_sof_dev *sdev, int state,
136136
s8 *pipe_priority)
137137
{
138138
struct snd_sof_widget *pipe_widget = spipe->pipe_widget;
139-
struct sof_ipc4_pipeline *pipeline = pipe_widget->private;
140139

141-
if (pipeline->skip_during_fe_trigger)
140+
if (spipe->be_managed_pipeline)
142141
return;
143142

144143
switch (state) {
@@ -177,7 +176,7 @@ sof_ipc4_update_pipeline_state(struct snd_sof_dev *sdev, int state, int cmd,
177176
struct sof_ipc4_pipeline *pipeline = pipe_widget->private;
178177
int i;
179178

180-
if (pipeline->skip_during_fe_trigger)
179+
if (spipe->be_managed_pipeline)
181180
return;
182181

183182
/* set state for pipeline if it was just triggered */
@@ -431,10 +430,9 @@ static int sof_ipc4_trigger_pipelines(struct snd_soc_component *component,
431430
* IPC4 requires pipelines to be triggered in order starting at the sink and
432431
* walking all the way to the source. So traverse the pipeline_list in the order
433432
* sink->source when starting PCM's and in the reverse order to pause/stop PCM's.
434-
* Skip the pipelines that have their skip_during_fe_trigger flag set. If there is a fork
435-
* in the pipeline, the order of triggering between the left/right paths will be
436-
* indeterministic. But the sink->source trigger order sink->source would still be
437-
* guaranteed for each fork independently.
433+
* Skip the backend pipelines. If there is a fork in the pipeline, the order of triggering
434+
* between the left/right paths will be indeterministic. But the sink->source trigger
435+
* order sink->source would still be guaranteed for each fork independently.
438436
*/
439437
if (state == SOF_IPC4_PIPE_RUNNING || state == SOF_IPC4_PIPE_RESET)
440438
for (i = pipeline_list->count - 1; i >= 0; i--) {

sound/soc/sof/ipc4-topology.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ struct sof_ipc4_copier_config_set_sink_format {
129129
* @state: Pipeline state
130130
* @use_chain_dma: flag to indicate if the firmware shall use chained DMA
131131
* @msg: message structure for pipeline
132-
* @skip_during_fe_trigger: skip triggering this pipeline during the FE DAI trigger
133132
*/
134133
struct sof_ipc4_pipeline {
135134
uint32_t priority;
@@ -139,7 +138,6 @@ struct sof_ipc4_pipeline {
139138
int state;
140139
bool use_chain_dma;
141140
struct sof_ipc4_msg msg;
142-
bool skip_during_fe_trigger;
143141
};
144142

145143
/**

0 commit comments

Comments
 (0)