There is a call of snd_pcm_set_appl_ptr() in snd_pcm_hw_hw_params() only for the capture direction. This must be a leftover from the ancient code. Although it's harmless for now, it's superfluous and confusing. Let's kill it.
Signed-off-by: Takashi Iwai tiwai@suse.de --- src/pcm/pcm_hw.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/src/pcm/pcm_hw.c b/src/pcm/pcm_hw.c index 2775483f1933..721b18d2bbbb 100644 --- a/src/pcm/pcm_hw.c +++ b/src/pcm/pcm_hw.c @@ -342,14 +342,7 @@ static int snd_pcm_hw_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params) params->info &= ~0xf0000000; if (pcm->tstamp_type != SND_PCM_TSTAMP_TYPE_GETTIMEOFDAY) params->info |= SND_PCM_INFO_MONOTONIC; - err = sync_ptr(hw, 0); - if (err < 0) - return err; - if (pcm->stream == SND_PCM_STREAM_CAPTURE) { - snd_pcm_set_appl_ptr(pcm, &hw->mmap_control->appl_ptr, hw->fd, - SNDRV_PCM_MMAP_OFFSET_CONTROL); - } - return 0; + return sync_ptr(hw, 0); }
static void snd_pcm_hw_close_timer(snd_pcm_hw_t *hw)