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: Iffe85dd8e69498f0af6e3265971f26daf6f65608
Signed-off-by: Dylan Reid <dgreid@chromium.org>
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)