diff options
author | David S. Miller <davem@davemloft.net> | 2011-04-11 16:44:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-11 16:44:25 -0400 |
commit | 1c01a80cfec6f806246f31ff2680cd3639b30e67 (patch) | |
tree | 0b554aad2ec1da71ecf6339d4ba51617bfe1dc3c /sound/core/pcm_lib.c | |
parent | c44d79950b2daa1025e62eede73e4e4a274d1ef3 (diff) | |
parent | 4a9f65f6304a00f6473e83b19c1e83caa1e42530 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/smsc911x.c
Diffstat (limited to 'sound/core/pcm_lib.c')
-rw-r--r-- | sound/core/pcm_lib.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index a82e3756a72..64449cb8f87 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -375,6 +375,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream, | |||
375 | } | 375 | } |
376 | 376 | ||
377 | if (runtime->no_period_wakeup) { | 377 | if (runtime->no_period_wakeup) { |
378 | snd_pcm_sframes_t xrun_threshold; | ||
378 | /* | 379 | /* |
379 | * Without regular period interrupts, we have to check | 380 | * Without regular period interrupts, we have to check |
380 | * the elapsed time to detect xruns. | 381 | * the elapsed time to detect xruns. |
@@ -383,7 +384,8 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream, | |||
383 | if (jdelta < runtime->hw_ptr_buffer_jiffies / 2) | 384 | if (jdelta < runtime->hw_ptr_buffer_jiffies / 2) |
384 | goto no_delta_check; | 385 | goto no_delta_check; |
385 | hdelta = jdelta - delta * HZ / runtime->rate; | 386 | hdelta = jdelta - delta * HZ / runtime->rate; |
386 | while (hdelta > runtime->hw_ptr_buffer_jiffies / 2 + 1) { | 387 | xrun_threshold = runtime->hw_ptr_buffer_jiffies / 2 + 1; |
388 | while (hdelta > xrun_threshold) { | ||
387 | delta += runtime->buffer_size; | 389 | delta += runtime->buffer_size; |
388 | hw_base += runtime->buffer_size; | 390 | hw_base += runtime->buffer_size; |
389 | if (hw_base >= runtime->boundary) | 391 | if (hw_base >= runtime->boundary) |