src/audio/mixer.c
/* used to pass standard and bespoke commands (with data) to component */
used to pass standard and bespoke commands (with data) to component
used to pass standard and bespoke commands ( with data ) to component
static int mixer_trigger(struct comp_dev *dev, int cmd)
{
	int dir = dev->pipeline->source_comp->direction;
	int ret;
	comp_dbg(dev, "mixer_trigger()");
	ret = comp_set_state(dev, cmd);
	if (ret < 0)
		return ret;
	if (ret == COMP_STATUS_STATE_ALREADY_SET)
		return PPL_STATUS_PATH_STOP;
	if (dir == SOF_IPC_STREAM_CAPTURE)
		return ret;
	if (cmd == COMP_TRIGGER_PAUSE ||
	    (cmd == COMP_TRIGGER_STOP &&
	     (mixer_source_status_count(dev, COMP_STATE_ACTIVE) ||
	     mixer_source_status_count(dev, COMP_STATE_PAUSED)))) {
		dev->state = COMP_STATE_ACTIVE;
		ret = PPL_STATUS_PATH_STOP;
	}
	return ret;
}
static int mixer_trigger ( struct comp_dev * dev , int cmd ) { int dir = dev -> pipeline -> source_comp -> direction ; int ret ; comp_dbg ( dev , " " ) ; ret = comp_set_state ( dev , cmd ) ; if ( ret < 0 ) return ret ; if ( ret == COMP_STATUS_STATE_ALREADY_SET ) return PPL_STATUS_PATH_STOP ; if ( dir == SOF_IPC_STREAM_CAPTURE ) return ret ; if ( cmd == COMP_TRIGGER_PAUSE || ( cmd == COMP_TRIGGER_STOP && ( mixer_source_status_count ( dev , COMP_STATE_ACTIVE ) || mixer_source_status_count ( dev , COMP_STATE_PAUSED ) ) ) ) { dev -> state = COMP_STATE_ACTIVE ; ret = PPL_STATUS_PATH_STOP ; } return ret ; }
used to pass standard and bespoke commands (with data) to component
used to pass standard and bespoke commands ( with data ) to component
/* nothing else to check for capture streams */ /* don't stop mixer on pause or if at least one source is active/paused */