mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-07 13:30:07 -05:00
pcm: fix snd_pcm_drain() excluding SETUP state from valid states
once draining is done, the pcm enters the SETUP state, which ought to be valid for snd_pcm_drain() signed-off-by: Sylvain BERTRAND <sylvain.bertrand@legeek.net> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
eee879d381
commit
1b9104b5ff
1 changed files with 1 additions and 1 deletions
|
|
@ -1329,7 +1329,7 @@ int snd_pcm_drain(snd_pcm_t *pcm)
|
||||||
SNDMSG("PCM not set up");
|
SNDMSG("PCM not set up");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
err = bad_pcm_state(pcm, P_STATE_RUNNABLE);
|
err = bad_pcm_state(pcm, P_STATE_RUNNABLE | P_STATE(SETUP));
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
/* lock handled in the callback */
|
/* lock handled in the callback */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue