aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-06-07 06:09:17 -0400
committerTakashi Iwai <tiwai@suse.de>2009-06-07 06:19:33 -0400
commitab1863fc9bc18c806338564124b1e5e7e3ef53d1 (patch)
treeb494cdfafdcd4f279e20de3a25d8c9c76c590cf5 /sound/core
parentd86bf92313bfd47885a92c7de63bde392d585f95 (diff)
ALSA: pcm - Fix update of runtime->hw_ptr_interrupt
The commit 13f040f9e55d41e92e485389123654971e03b819 made another regression, the missing update of runtime->hw_ptr_interrupt. Since this field is only checked in snd_pcmupdate__hw_ptr_interrupt(), not in snd_pcm_update_hw_ptr(), it must be updated before the hw_ptr change check. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/pcm_lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index bf34603a7a38..adb306fd5525 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -299,6 +299,8 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream)
299 hw_ptr_interrupt = 299 hw_ptr_interrupt =
300 new_hw_ptr - new_hw_ptr % runtime->period_size; 300 new_hw_ptr - new_hw_ptr % runtime->period_size;
301 } 301 }
302 runtime->hw_ptr_interrupt = hw_ptr_interrupt;
303
302 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && 304 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
303 runtime->silence_size > 0) 305 runtime->silence_size > 0)
304 snd_pcm_playback_silence(substream, new_hw_ptr); 306 snd_pcm_playback_silence(substream, new_hw_ptr);
@@ -309,7 +311,6 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream)
309 runtime->hw_ptr_base = hw_base; 311 runtime->hw_ptr_base = hw_base;
310 runtime->status->hw_ptr = new_hw_ptr; 312 runtime->status->hw_ptr = new_hw_ptr;
311 runtime->hw_ptr_jiffies = jiffies; 313 runtime->hw_ptr_jiffies = jiffies;
312 runtime->hw_ptr_interrupt = hw_ptr_interrupt;
313 if (runtime->tstamp_mode == SNDRV_PCM_TSTAMP_ENABLE) 314 if (runtime->tstamp_mode == SNDRV_PCM_TSTAMP_ENABLE)
314 snd_pcm_gettime(runtime, (struct timespec *)&runtime->status->tstamp); 315 snd_pcm_gettime(runtime, (struct timespec *)&runtime->status->tstamp);
315 316