ssp: pause: fix pause/release logic

SSP can either be in paused or prepared state during stream pause
depending on the state of the other SSP data direction. Make sure this
is taken into account.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
Liam Girdwood 2017-10-12 15:21:21 +01:00
parent 28fafc1071
commit 1bb7cda702
1 changed files with 2 additions and 1 deletions

View File

@ -356,7 +356,8 @@ static int ssp_trigger(struct dai *dai, int cmd, int direction)
ssp_start(dai, direction);
break;
case COMP_CMD_RELEASE:
if (ssp->state[direction] == COMP_STATE_PAUSED)
if (ssp->state[direction] == COMP_STATE_PAUSED ||
ssp->state[direction] == COMP_STATE_PREPARE)
ssp_start(dai, direction);
break;
case COMP_CMD_STOP: