All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix snd_pcm_drain() excluding SETUP state from valid states
@ 2020-05-02 19:33 sylvain.bertrand
  2020-05-14 12:43 ` sylvain.bertrand
  2020-05-14 13:52 ` Jaroslav Kysela
  0 siblings, 2 replies; 7+ messages in thread
From: sylvain.bertrand @ 2020-05-02 19:33 UTC (permalink / raw)
  To: alsa-devel

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 */

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-06-03 16:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-02 19:33 [PATCH] fix snd_pcm_drain() excluding SETUP state from valid states sylvain.bertrand
2020-05-14 12:43 ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.