aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/pcm.h
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2010-01-07 09:36:31 -0500
committerJaroslav Kysela <perex@perex.cz>2010-01-07 09:48:13 -0500
commit1250932e48d3b698415b1f04775433cf1da688d6 (patch)
tree58d25383b6fa4e083f24dfc9d51ad4339ff7dece /include/sound/pcm.h
parentf240406babfe1526998e10583ea5eccc2676a433 (diff)
ALSA: pcm_lib - optimize wake_up() calls for PCM I/O
As noted by pl bossart <bossart.nospam@gmail.com>, the PCM I/O routines (snd_pcm_lib_write1, snd_pcm_lib_read1) should block wake_up() calls until all samples are not processed. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'include/sound/pcm.h')
-rw-r--r--include/sound/pcm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index fe1b131842be..e26fb3c58037 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -311,6 +311,7 @@ struct snd_pcm_runtime {
311 struct snd_pcm_mmap_control *control; 311 struct snd_pcm_mmap_control *control;
312 312
313 /* -- locking / scheduling -- */ 313 /* -- locking / scheduling -- */
314 unsigned int nowake: 1; /* no wakeup (data-copy in progress) */
314 wait_queue_head_t sleep; 315 wait_queue_head_t sleep;
315 struct fasync_struct *fasync; 316 struct fasync_struct *fasync;
316 317
@@ -839,6 +840,8 @@ void snd_pcm_set_sync(struct snd_pcm_substream *substream);
839int snd_pcm_lib_interleave_len(struct snd_pcm_substream *substream); 840int snd_pcm_lib_interleave_len(struct snd_pcm_substream *substream);
840int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream, 841int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream,
841 unsigned int cmd, void *arg); 842 unsigned int cmd, void *arg);
843int snd_pcm_update_state(struct snd_pcm_substream *substream,
844 struct snd_pcm_runtime *runtime);
842int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream); 845int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream);
843int snd_pcm_playback_xrun_check(struct snd_pcm_substream *substream); 846int snd_pcm_playback_xrun_check(struct snd_pcm_substream *substream);
844int snd_pcm_capture_xrun_check(struct snd_pcm_substream *substream); 847int snd_pcm_capture_xrun_check(struct snd_pcm_substream *substream);