33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
|
From 4fafa468d4bb4618cfde7183f820d8fdd373dcb1 Mon Sep 17 00:00:00 2001
|
||
|
From: "Alexander E. Patrakov" <patrakov@gmail.com>
|
||
|
Date: Sun, 14 Sep 2014 00:30:17 +0600
|
||
|
Subject: [PATCH] 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>
|
||
|
---
|
||
|
src/pcm/pcm_null.c | 5 +----
|
||
|
1 file changed, 1 insertion(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/src/pcm/pcm_null.c b/src/pcm/pcm_null.c
|
||
|
index f11a1020f7e3..05298200ac0a 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;
|
||
|
}
|
||
|
--
|
||
|
2.1.2
|
||
|
|