Skip to content

Commit 6e7f31c

Browse files
ranj063kv2019i
authored andcommitted
module_adapter: Add a no_pause field for modules
Add a new field, no_pause in struct processing_module which will be set by modules that do not support pause, ex: mixer. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
1 parent af352a2 commit 6e7f31c

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/audio/module_adapter/module_adapter.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,15 @@ int module_adapter_trigger(struct comp_dev *dev, int cmd)
847847
{
848848
comp_dbg(dev, "module_adapter_trigger(): cmd %d", cmd);
849849

850+
/*
851+
* If the module doesn't support pause, keep it active along with the rest of the
852+
* downstream modules
853+
*/
854+
if (cmd == COMP_TRIGGER_PAUSE && mod->no_pause) {
855+
dev->state = COMP_STATE_ACTIVE;
856+
return PPL_STATUS_PATH_STOP;
857+
}
858+
850859
return comp_set_state(dev, cmd);
851860
}
852861

src/include/sof/audio/module_adapter/module/generic.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ struct processing_module {
178178

179179
/* module-specific flags for comp_verify_params() */
180180
uint32_t verify_params_flags;
181+
182+
/* flag to indicate module does not pause */
183+
bool no_pause;
181184
};
182185

183186
/*****************************************************************************/

0 commit comments

Comments
 (0)