diff options
| author | 2011-04-11 13:44:25 -0700 | |
|---|---|---|
| committer | 2011-04-11 13:44:25 -0700 | |
| commit | 1c01a80cfec6f806246f31ff2680cd3639b30e67 (patch) | |
| tree | 0b554aad2ec1da71ecf6339d4ba51617bfe1dc3c /sound/core/pcm_lib.c | |
| parent | niu: Recognise original ethtool class code for AH/ESP flow hashing (diff) | |
| parent | caif: performance bugfix - allow radio stack to prioritize packets. (diff) | |
| download | wireguard-linux-1c01a80cfec6f806246f31ff2680cd3639b30e67.tar.xz wireguard-linux-1c01a80cfec6f806246f31ff2680cd3639b30e67.zip | |
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 a82e3756a72d..64449cb8f873 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, } if (runtime->no_period_wakeup) { + snd_pcm_sframes_t xrun_threshold; /* * Without regular period interrupts, we have to check * the elapsed time to detect xruns. @@ -383,7 +384,8 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream, if (jdelta < runtime->hw_ptr_buffer_jiffies / 2) goto no_delta_check; hdelta = jdelta - delta * HZ / runtime->rate; - while (hdelta > runtime->hw_ptr_buffer_jiffies / 2 + 1) { + xrun_threshold = runtime->hw_ptr_buffer_jiffies / 2 + 1; + while (hdelta > xrun_threshold) { delta += runtime->buffer_size; hw_base += runtime->buffer_size; if (hw_base >= runtime->boundary) |
