pcm, null: use the snd_pcm_mmap_avail function

instead of the open-coded equivalent

Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Alexander E. Patrakov 2014-09-14 00:30:17 +06:00 committed by Jaroslav Kysela
parent 0889e94706
commit 4fafa468d4

View file

@ -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) { if (null->state == SND_PCM_STATE_PREPARED) {
/* it is required to return the correct avail count for */ /* it is required to return the correct avail count for */
/* the prepared stream, otherwise the start is not called */ /* the prepared stream, otherwise the start is not called */
if (pcm->stream == SND_PCM_STREAM_PLAYBACK) return snd_pcm_mmap_avail(pcm);
return snd_pcm_mmap_playback_avail(pcm);
else
return snd_pcm_mmap_capture_avail(pcm);
} }
return pcm->buffer_size; return pcm->buffer_size;
} }