]> git.alsa-project.org Git - alsa-lib.git/commitdiff
pcm/ioplug: fix error code in start callback
authorTakashi Iwai <tiwai@suse.de>
Thu, 20 Aug 2009 23:34:29 +0000 (01:34 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 20 Aug 2009 23:34:29 +0000 (01:34 +0200)
When snd_pcm_start() is called in the invalid state, it should return
-EBADFD.  But ioplug plugin returns -EAGAIN.  Let's fix it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_ioplug.c

index c582f5afade7eb2fe40ba9e470567af9b01f5934..2aa75727f4ecb86e72a0ca8b76de4acfc0b00d11 100644 (file)
@@ -442,7 +442,7 @@ static int snd_pcm_ioplug_start(snd_pcm_t *pcm)
        int err;
        
        if (io->data->state != SND_PCM_STATE_PREPARED)
-               return -EBUSY;
+               return -EBADFD;
 
        err = io->data->callback->start(io->data);
        if (err < 0)