diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-05 11:22:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-05 11:22:55 -0400 |
commit | 71019c350aca8fe650246988e64bfd2c89192180 (patch) | |
tree | f6a3524d0e456b347772c36418e8e31a77e9e668 /sound/core/pcm_lib.c | |
parent | f83ce3e6b02d5e48b3a43b001390e2b58820389d (diff) | |
parent | 5d7ee52f1c3dbe0e06d9bfad4912562fd1b6eb03 (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:
ASoC: Remove BROKEN from mpc5200 kconfig
ASoC: TWL4030: Fix gain control for earpiece amplifier
ALSA: pcm core - Avoid jiffies check for devices with BATCH flag
ALSA: Add missing SNDRV_PCM_INFO_BATCH flag to some drivers
ALSA: indigo-express: add missing 64KHz flags
ASoC: Set the MPC5200 i2s driver to BROKEN status.
ASoC: Fix logic in WM8350 master clocking check
Diffstat (limited to 'sound/core/pcm_lib.c')
-rw-r--r-- | sound/core/pcm_lib.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 63d088f2265f..a2a792c18c40 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -249,6 +249,12 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream) | |||
249 | new_hw_ptr = hw_base + pos; | 249 | new_hw_ptr = hw_base + pos; |
250 | } | 250 | } |
251 | } | 251 | } |
252 | /* Skip the jiffies check for hardwares with BATCH flag. | ||
253 | * Such hardware usually just increases the position at each IRQ, | ||
254 | * thus it can't give any strange position. | ||
255 | */ | ||
256 | if (runtime->hw.info & SNDRV_PCM_INFO_BATCH) | ||
257 | goto no_jiffies_check; | ||
252 | hdelta = new_hw_ptr - old_hw_ptr; | 258 | hdelta = new_hw_ptr - old_hw_ptr; |
253 | jdelta = jiffies - runtime->hw_ptr_jiffies; | 259 | jdelta = jiffies - runtime->hw_ptr_jiffies; |
254 | if (((hdelta * HZ) / runtime->rate) > jdelta + HZ/100) { | 260 | if (((hdelta * HZ) / runtime->rate) > jdelta + HZ/100) { |
@@ -272,6 +278,7 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream) | |||
272 | hw_base -= hw_base % runtime->buffer_size; | 278 | hw_base -= hw_base % runtime->buffer_size; |
273 | delta = 0; | 279 | delta = 0; |
274 | } | 280 | } |
281 | no_jiffies_check: | ||
275 | if (delta > runtime->period_size + runtime->period_size / 2) { | 282 | if (delta > runtime->period_size + runtime->period_size / 2) { |
276 | hw_ptr_error(substream, | 283 | hw_ptr_error(substream, |
277 | "Lost interrupts? " | 284 | "Lost interrupts? " |