summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@suse.cz>2004-10-07 15:56:30 +0200
committerJaroslav Kysela <perex@suse.cz>2004-10-07 15:56:30 +0200
commit23151bd7566a231b6d8ec32398ae133ff680aef4 (patch)
treeb861ee92185c460d9be195bb2410b96abbbccfcd /include
parent8d51bcbb70c06b22ad7a4af7afe8210cccb532b0 (diff)
[ALSA] Fix drain/drop of linked PCM streams
PCM Midlevel This patch fixes the dead-locking of linked PCM streams when drain/drop is called. The counter field is added to pcm group struct to handle link/unlink more easily. When the PCM streams are linked, start/drain/drop are operated to all linked streams. The drain will wait until draining of all linked streams are finished. The XRUN triggers stopping of all linked streams and changes the state of all of them to XRUN even if only one of them is actually in XRUN. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/sound/pcm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index faf4aef8f96c..e8badb90a279 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -364,6 +364,7 @@ struct _snd_pcm_runtime {
typedef struct _snd_pcm_group { /* keep linked substreams */
spinlock_t lock;
struct list_head substreams;
+ int count;
} snd_pcm_group_t;
struct _snd_pcm_substream {
@@ -488,6 +489,7 @@ int snd_pcm_status(snd_pcm_substream_t * substream, snd_pcm_status_t *status);
int snd_pcm_prepare(snd_pcm_substream_t *substream);
int snd_pcm_start(snd_pcm_substream_t *substream);
int snd_pcm_stop(snd_pcm_substream_t *substream, int status);
+int snd_pcm_drain_done(snd_pcm_substream_t *substream);
#ifdef CONFIG_PM
int snd_pcm_suspend(snd_pcm_substream_t *substream);
int snd_pcm_suspend_all(snd_pcm_t *pcm);