From: Alexander E. Patrakov Date: Sat, 13 Sep 2014 18:30:16 +0000 (+0600) Subject: pcm, rate: use the snd_pcm_mmap_hw_avail function X-Git-Tag: v1.0.29~48 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=0889e9470667dd68d5a0ce47a10a8c6d61b7bc79;p=alsa-lib.git pcm, rate: use the snd_pcm_mmap_hw_avail function instead of the open-coded equivalent Signed-off-by: Alexander E. Patrakov Signed-off-by: Jaroslav Kysela --- diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c index 5e811bb7..b436a8ea 100644 --- a/src/pcm/pcm_rate.c +++ b/src/pcm/pcm_rate.c @@ -593,10 +593,7 @@ static int snd_pcm_rate_hwsync(snd_pcm_t *pcm) static int snd_pcm_rate_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp) { snd_pcm_rate_hwsync(pcm); - if (pcm->stream == SND_PCM_STREAM_PLAYBACK) - *delayp = snd_pcm_mmap_playback_hw_avail(pcm); - else - *delayp = snd_pcm_mmap_capture_hw_avail(pcm); + *delayp = snd_pcm_mmap_hw_avail(pcm); return 0; }