diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-05-29 11:46:10 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-05-29 11:46:10 +0200 |
commit | e93721a70263afefbac781f575bfe851c6f95d84 (patch) | |
tree | ab359f12a0688802aa99339bae82c51763dae9f6 /sound/core/pcm_native.c | |
parent | ae1ec5e1e97f67d41e641a73380129e5905e41cc (diff) | |
parent | c87d9732004b3f8fd82d729f12ccfb96c0df279e (diff) | |
download | kernel_samsung_smdk4412-e93721a70263afefbac781f575bfe851c6f95d84.zip kernel_samsung_smdk4412-e93721a70263afefbac781f575bfe851c6f95d84.tar.gz kernel_samsung_smdk4412-e93721a70263afefbac781f575bfe851c6f95d84.tar.bz2 |
Merge branch 'fix/pcm-jiffies-check' into topic/pcm-jiffies-check
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r-- | sound/core/pcm_native.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index cb769d4..45dc53f 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -849,6 +849,7 @@ static void snd_pcm_post_start(struct snd_pcm_substream *substream, int state) { struct snd_pcm_runtime *runtime = substream->runtime; snd_pcm_trigger_tstamp(substream); + runtime->hw_ptr_jiffies = jiffies; runtime->status->state = state; if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && runtime->silence_size > 0) @@ -962,6 +963,11 @@ static int snd_pcm_do_pause(struct snd_pcm_substream *substream, int push) { if (substream->runtime->trigger_master != substream) return 0; + /* The jiffies check in snd_pcm_update_hw_ptr*() is done by + * a delta betwen the current jiffies, this gives a large enough + * delta, effectively to skip the check once. + */ + substream->runtime->hw_ptr_jiffies = jiffies - HZ * 1000; return substream->ops->trigger(substream, push ? SNDRV_PCM_TRIGGER_PAUSE_PUSH : SNDRV_PCM_TRIGGER_PAUSE_RELEASE); |