From: sylvain.bertrand@gmail.com
To: alsa-devel@alsa-project.org
Subject: [PATCH] fix snd_pcm_drain() excluding SETUP state from valid states
Date: Sat, 2 May 2020 19:33:11 +0000 [thread overview]
Message-ID: <20200502193311.GA19340@freedom> (raw)
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>
---
I missed this one in my previous patch because exiting with or without
an error once draining is done was producing the same result.
--- a/src/pcm/pcm.c
+++ b/src/pcm/pcm.c
@@ -1329,7 +1329,7 @@ int snd_pcm_drain(snd_pcm_t *pcm)
SNDMSG("PCM not set up");
return -EIO;
}
- err = bad_pcm_state(pcm, P_STATE_RUNNABLE);
+ err = bad_pcm_state(pcm, P_STATE_RUNNABLE | P_STATE(SETUP));
if (err < 0)
return err;
/* lock handled in the callback */
next reply other threads:[~2020-05-02 19:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-02 19:33 sylvain.bertrand [this message]
2020-05-14 12:43 ` [PATCH] fix snd_pcm_drain() excluding SETUP state from valid states sylvain.bertrand
2020-05-14 13:52 ` Jaroslav Kysela
2020-05-14 21:06 ` sylvain.bertrand
2020-06-03 16:50 ` Jaroslav Kysela
2020-05-15 11:24 ` [PATCH] augment snd_pcm_drain() documentation regarding its non-blocking mode usage sylvain.bertrand
2020-06-01 11:50 ` sylvain.bertrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200502193311.GA19340@freedom \
--to=sylvain.bertrand@gmail.com \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox