[alsa-devel] [PATCH 4/9] pcm, rate: use the snd_pcm_mmap_hw_avail function

Alexander E. Patrakov patrakov at gmail.com
Sat Sep 13 20:30:16 CEST 2014


instead of the open-coded equivalent

Signed-off-by: Alexander E. Patrakov <patrakov at gmail.com>
---
 src/pcm/pcm_rate.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c
index 5e811bb..b436a8e 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;
 }
 
-- 
2.1.0



More information about the Alsa-devel mailing list