diff options
author | Jaroslav Kysela <perex@perex.cz> | 2010-01-07 15:36:31 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2010-01-07 15:48:13 +0100 |
commit | 1250932e48d3b698415b1f04775433cf1da688d6 (patch) | |
tree | 58d25383b6fa4e083f24dfc9d51ad4339ff7dece /include/sound/pcm.h | |
parent | f240406babfe1526998e10583ea5eccc2676a433 (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.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index fe1b131842b..e26fb3c5803 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -311,6 +311,7 @@ struct snd_pcm_runtime { struct snd_pcm_mmap_control *control; /* -- locking / scheduling -- */ + unsigned int nowake: 1; /* no wakeup (data-copy in progress) */ wait_queue_head_t sleep; struct fasync_struct *fasync; @@ -839,6 +840,8 @@ void snd_pcm_set_sync(struct snd_pcm_substream *substream); int snd_pcm_lib_interleave_len(struct snd_pcm_substream *substream); int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg); +int snd_pcm_update_state(struct snd_pcm_substream *substream, + struct snd_pcm_runtime *runtime); int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream); int snd_pcm_playback_xrun_check(struct snd_pcm_substream *substream); int snd_pcm_capture_xrun_check(struct snd_pcm_substream *substream); |