29 Apr
2013
29 Apr
'13
10:57 a.m.
On Mon, Apr 29, 2013 at 11:20:42AM +0200, Takashi Iwai wrote:
I started with switch and then didnt want to code for all the PCM_STATES... but yes that makes more sense, i will send that right away.
You can code like switch (stream->runtime->state) { case SNDRV_PCM_STATE_RUNNING: case SNDRV_PCM_STATE_DRAINING: case SNDRV_PCM_STATE_PAUSED: case SNDRV_PCM_STATE_SETUP: break; /* OK */ default: retval = -EBADFD; break; }
Yup, and i did exactly opposite, let me know if you want like this :)
-- ~Vinod