offsetof(struct sof_ipc4_pipeline, core_id)},
{SOF_TKN_SCHED_PRIORITY, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
offsetof(struct sof_ipc4_pipeline, priority)},
+ {SOF_TKN_SCHED_DIRECTION, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
+ offsetof(struct sof_ipc4_pipeline, direction)},
+ {SOF_TKN_SCHED_DIRECTION, SND_SOC_TPLG_TUPLE_TYPE_BOOL, get_token_u16,
+ offsetof(struct sof_ipc4_pipeline, direction_valid)},
};
static const struct sof_topology_token pipeline_tokens[] = {
swidget->core = pipeline->core_id;
spipe->core_mask |= BIT(pipeline->core_id);
+ if (pipeline->direction_valid) {
+ spipe->direction = pipeline->direction;
+ spipe->direction_valid = true;
+ }
if (pipeline->use_chain_dma) {
dev_dbg(scomp->dev, "Set up chain DMA for %s\n", swidget->widget->name);
goto err;
}
- dev_dbg(scomp->dev, "pipeline '%s': id %d, pri %d, core_id %u, lp mode %d\n",
+ dev_dbg(scomp->dev, "pipeline '%s': id %d, pri %d, core_id %u, lp mode %d direction %d\n",
swidget->widget->name, swidget->pipeline_id,
- pipeline->priority, pipeline->core_id, pipeline->lp_mode);
+ pipeline->priority, pipeline->core_id, pipeline->lp_mode, pipeline->direction);
swidget->private = pipeline;
* @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
+ * @direction_valid: flag indicating if valid direction is set in topology
+ * @direction: pipeline direction set in topology if direction_valid is true
*/
struct sof_ipc4_pipeline {
uint32_t priority;
bool use_chain_dma;
struct sof_ipc4_msg msg;
bool skip_during_fe_trigger;
+ bool direction_valid;
+ u32 direction;
};
/**
* @complete: flag used to indicate that pipeline set up is complete.
* @core_mask: Mask containing target cores for all modules in the pipeline
* @list: List item in sdev pipeline_list
+ * @direction_valid: flag indicating if the direction is set in topology
+ * @direction: pipeline direction set in topology, valid is direction_valid is true
+ *
*/
struct snd_sof_pipeline {
struct snd_sof_widget *pipe_widget;
int complete;
unsigned long core_mask;
struct list_head list;
+ bool direction_valid;
+ u32 direction;
};
/* ASoC SOF DAPM route */