[alsa-devel] [PATCH 1/1] ALSA: compress_core: Ensure device is stopped when stream closed
rf at opensource.wolfsonmicro.com
Fri Apr 26 15:56:27 CEST 2013
>> + 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.
More information about the Alsa-devel