diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-04-04 12:21:55 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-04-04 12:21:55 +0200 |
commit | 17fbb5bdfc93bc205e5f5d1e2b5b92fdfd694c68 (patch) | |
tree | ee94446f78eecea07b90116b7b5feb0635a0adea /sound/core | |
parent | cdccfc8dc0bf62a1da327324a8d639139acc9279 (diff) | |
parent | 12ff414e2e4512f59fe191dc18e856e2939a1c79 (diff) | |
download | kernel_samsung_smdk4412-17fbb5bdfc93bc205e5f5d1e2b5b92fdfd694c68.tar.gz kernel_samsung_smdk4412-17fbb5bdfc93bc205e5f5d1e2b5b92fdfd694c68.tar.bz2 kernel_samsung_smdk4412-17fbb5bdfc93bc205e5f5d1e2b5b92fdfd694c68.zip |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'sound/core')
-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, } 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) |