26 Apr
2013
26 Apr
'13
3:56 p.m.
if ((data->stream.runtime->state == SNDRV_PCM_STATE_RUNNING) ||
(data->stream.runtime->state == SNDRV_PCM_STATE_PAUSED))
data->stream.ops->trigger(&data->stream, SNDRV_PCM_TRIGGER_STOP);
A switch statement would be more idiomatic for this sort of thing.
This follows the general style used in other functions in the source file. I'm happy to upload a version that uses a switch instead if that's preferred.