From: Alexander E. Patrakov Date: Sat, 13 Sep 2014 18:30:17 +0000 (+0600) Subject: pcm, null: use the snd_pcm_mmap_avail function X-Git-Tag: v1.0.29~47 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=4fafa468d4bb4618cfde7183f820d8fdd373dcb1;p=alsa-lib.git pcm, null: use the snd_pcm_mmap_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_null.c b/src/pcm/pcm_null.c index f11a1020..05298200 100644 --- a/src/pcm/pcm_null.c +++ b/src/pcm/pcm_null.c @@ -86,10 +86,7 @@ static snd_pcm_sframes_t snd_pcm_null_avail_update(snd_pcm_t *pcm) if (null->state == SND_PCM_STATE_PREPARED) { /* it is required to return the correct avail count for */ /* the prepared stream, otherwise the start is not called */ - if (pcm->stream == SND_PCM_STREAM_PLAYBACK) - return snd_pcm_mmap_playback_avail(pcm); - else - return snd_pcm_mmap_capture_avail(pcm); + return snd_pcm_mmap_avail(pcm); } return pcm->buffer_size; }