Export pcm_mmap_avail

This is useful for timer based wakeups and for checking how much data
has been captured by a hotwording device.

Change-Id: I409201a5c9ce73abc807a9dd767beb3a32810f06
Signed-off-by: Dylan Reid <dgreid@chromium.org>
(cherry picked from commit 9074cfc4127cb841f0633b35895141f90da3f0d6)
diff --git a/include/tinyalsa/asoundlib.h b/include/tinyalsa/asoundlib.h
index 1554b52..30cf0da 100644
--- a/include/tinyalsa/asoundlib.h
+++ b/include/tinyalsa/asoundlib.h
@@ -235,6 +235,7 @@
 int pcm_mmap_begin(struct pcm *pcm, void **areas, unsigned int *offset,
                    unsigned int *frames);
 int pcm_mmap_commit(struct pcm *pcm, unsigned int offset, unsigned int frames);
+int pcm_mmap_avail(struct pcm *pcm);
 /* Prepare the PCM substream to be triggerable */
 int pcm_prepare(struct pcm *pcm);
diff --git a/pcm.c b/pcm.c
index e3a41b0..ed7567b 100644
--- a/pcm.c
+++ b/pcm.c
@@ -1059,7 +1059,7 @@
     return avail;
-static inline int pcm_mmap_avail(struct pcm *pcm)
+int pcm_mmap_avail(struct pcm *pcm)
     pcm_sync_ptr(pcm, SNDRV_PCM_SYNC_PTR_HWSYNC);
     if (pcm->flags & PCM_IN)