diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-11 12:19:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-11 12:19:35 -0400 |
commit | a9c86d42599519f3d83b5f46bdab25046fe47b84 (patch) | |
tree | 9b269e3162e5cc0c1a8dfc3349303c902718a9a9 /sound/core/pcm_lib.c | |
parent | a12e4d304ce701844c639541d90df86e165d03f9 (diff) | |
parent | 1110afbe728838ac7ce973c37af9e11385dbaef9 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (377 commits)
ASoC: au1x: PSC-AC97 bugfixes
ALSA: dummy - Increase MAX_PCM_SUBSTREAMS to 128
ALSA: dummy - Add debug proc file
ALSA: Add const prefix to proc helper functions
ALSA: Re-export snd_pcm_format_name() function
ALSA: hda - Use auto model for HP laptops with ALC268 codec
ALSA: cs46xx - Fix minimum period size
ASoC: Fix WM835x Out4 capture enumeration
ALSA: Remove unneeded ifdef from sound/core.h
ALSA: Remove struct snd_monitor_file from public sound/core.h
ASoC: Remove unuused hw_read_t
sound: oxygen: work around MCE when changing volume
ALSA: dummy - Fake buffer allocations
ALSA: hda/realtek: Added support for CLEVO M540R subsystem, 6 channel + digital
ASoC: fix pxa2xx-ac97.c breakage
ALSA: dummy - Fix the timer calculation in systimer mode
ALSA: dummy - Add more description
ALSA: dummy - Better jiffies handling
ALSA: dummy - Support high-res timer mode
ALSA: Release v1.0.21
...
Diffstat (limited to 'sound/core/pcm_lib.c')
-rw-r--r-- | sound/core/pcm_lib.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 9db60d831bb2..30f410832a25 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -197,12 +197,16 @@ static int snd_pcm_update_hw_ptr_post(struct snd_pcm_substream *substream, | |||
197 | avail = snd_pcm_capture_avail(runtime); | 197 | avail = snd_pcm_capture_avail(runtime); |
198 | if (avail > runtime->avail_max) | 198 | if (avail > runtime->avail_max) |
199 | runtime->avail_max = avail; | 199 | runtime->avail_max = avail; |
200 | if (avail >= runtime->stop_threshold) { | 200 | if (runtime->status->state == SNDRV_PCM_STATE_DRAINING) { |
201 | if (substream->runtime->status->state == SNDRV_PCM_STATE_DRAINING) | 201 | if (avail >= runtime->buffer_size) { |
202 | snd_pcm_drain_done(substream); | 202 | snd_pcm_drain_done(substream); |
203 | else | 203 | return -EPIPE; |
204 | } | ||
205 | } else { | ||
206 | if (avail >= runtime->stop_threshold) { | ||
204 | xrun(substream); | 207 | xrun(substream); |
205 | return -EPIPE; | 208 | return -EPIPE; |
209 | } | ||
206 | } | 210 | } |
207 | if (avail >= runtime->control->avail_min) | 211 | if (avail >= runtime->control->avail_min) |
208 | wake_up(&runtime->sleep); | 212 | wake_up(&runtime->sleep); |