Message ID | 67BA5DEFFBE7BF46B4C53F7E5FC5AD44344700ED7C@MXCL13.fgremc.it (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Takashi Iwai |
Headers | show |
Date 4.3.2014 12:51, MONTANARO Luciano (MM) wrote: > The function snd_pcm_ioplug_hw_ptr_update() always increased the hw_ptr > by delta, without wrapping it to the boundary. This would lead to > problems when after many hours, the hw_ptr would overflow. Applied to our GIT tree. Thanks. Jaroslav
diff --git a/src/pcm/pcm_ioplug.c b/src/pcm/pcm_ioplug.c index a90c844..c1c3a98 100644 --- a/src/pcm/pcm_ioplug.c +++ b/src/pcm/pcm_ioplug.c @@ -60,7 +60,7 @@ static void snd_pcm_ioplug_hw_ptr_update(snd_pcm_t *pcm) delta = hw - io->last_hw; else delta = pcm->buffer_size + hw - io->last_hw; - io->data->hw_ptr += delta; + snd_pcm_mmap_hw_forward(io->data->pcm, delta); io->last_hw = hw; } else io->data->state = SNDRV_PCM_STATE_XRUN;