From: Takashi Iwai Date: Thu, 20 Aug 2009 23:34:29 +0000 (+0200) Subject: pcm/ioplug: fix error code in start callback X-Git-Tag: v1.0.21~1 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=cbf5675eef5d4194532d3a57c8b5d4c0af831ed7;p=alsa-lib.git pcm/ioplug: fix error code in start callback 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 --- diff --git a/src/pcm/pcm_ioplug.c b/src/pcm/pcm_ioplug.c index c582f5af..2aa75727 100644 --- a/src/pcm/pcm_ioplug.c +++ b/src/pcm/pcm_ioplug.c @@ -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)