Skip to content

Commit

Permalink
ASoC: SOF: ipc4-topology: Remove the skip_during_fe_trigger flag
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ranj063 committed Dec 4, 2024
1 parent dd16607 commit 9883c9b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 22 deletions.
13 changes: 0 additions & 13 deletions sound/soc/sof/intel/hda-dai-ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,6 @@ static struct hdac_ext_stream *hda_ipc4_get_hext_stream(struct snd_sof_dev *sdev
struct snd_soc_dai *cpu_dai,
struct snd_pcm_substream *substream)
{
struct snd_sof_widget *pipe_widget;
struct sof_ipc4_pipeline *pipeline;
struct snd_sof_widget *swidget;
struct snd_soc_dapm_widget *w;

w = snd_soc_dai_get_widget(cpu_dai, substream->stream);
swidget = w->dobj.private;
pipe_widget = swidget->spipe->pipe_widget;
pipeline = pipe_widget->private;

/* mark pipeline so that it can be skipped during FE trigger */
pipeline->skip_during_fe_trigger = true;

return snd_soc_dai_get_dma_data(cpu_dai, substream);
}

Expand Down
12 changes: 5 additions & 7 deletions sound/soc/sof/ipc4-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ sof_ipc4_add_pipeline_to_trigger_list(struct snd_sof_dev *sdev, int state,
s8 *pipe_priority)
{
struct snd_sof_widget *pipe_widget = spipe->pipe_widget;
struct sof_ipc4_pipeline *pipeline = pipe_widget->private;

if (pipeline->skip_during_fe_trigger)
if (spipe->be_pipeline)
return;

switch (state) {
Expand Down Expand Up @@ -177,7 +176,7 @@ sof_ipc4_update_pipeline_state(struct snd_sof_dev *sdev, int state, int cmd,
struct sof_ipc4_pipeline *pipeline = pipe_widget->private;
int i;

if (pipeline->skip_during_fe_trigger)
if (spipe->be_pipeline)
return;

/* set state for pipeline if it was just triggered */
Expand Down Expand Up @@ -431,10 +430,9 @@ static int sof_ipc4_trigger_pipelines(struct snd_soc_component *component,
* IPC4 requires pipelines to be triggered in order starting at the sink and
* walking all the way to the source. So traverse the pipeline_list in the order
* sink->source when starting PCM's and in the reverse order to pause/stop PCM's.
* Skip the pipelines that have their skip_during_fe_trigger flag set. If there is a fork
* in the pipeline, the order of triggering between the left/right paths will be
* indeterministic. But the sink->source trigger order sink->source would still be
* guaranteed for each fork independently.
* Skip the backend pipelines. If there is a fork in the pipeline, the order of triggering
* between the left/right paths will be indeterministic. But the sink->source trigger
* order sink->source would still be guaranteed for each fork independently.
*/
if (state == SOF_IPC4_PIPE_RUNNING || state == SOF_IPC4_PIPE_RESET)
for (i = pipeline_list->count - 1; i >= 0; i--) {
Expand Down
2 changes: 0 additions & 2 deletions sound/soc/sof/ipc4-topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ struct sof_ipc4_copier_config_set_sink_format {
* @state: Pipeline state
* @use_chain_dma: flag to indicate if the firmware shall use chained DMA
* @msg: message structure for pipeline
* @skip_during_fe_trigger: skip triggering this pipeline during the FE DAI trigger
*/
struct sof_ipc4_pipeline {
uint32_t priority;
Expand All @@ -139,7 +138,6 @@ struct sof_ipc4_pipeline {
int state;
bool use_chain_dma;
struct sof_ipc4_msg msg;
bool skip_during_fe_trigger;
};

/**
Expand Down

0 comments on commit 9883c9b

Please sign in to comment.