diff mbox series

snd_pcm_status() does not update status->avail

Message ID d9c1f37e-5c8d-f289-270e-c6cda7a56ce3@axis.com
State New
Headers show
Series snd_pcm_status() does not update status->avail | expand

Commit Message

Jonas Holmberg Oct. 9, 2020, 2:02 p.m. UTC
Hi,
I have a problem with status->avail not being updated when using 
multiple extplug plugins and softvol. I managed to get it to work with 
the following patch:


My question is if this is the correct solution?

BR
/Jonas
diff mbox series

Patch

diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
index ea60eb98..89e819d6 100644
--- a/src/pcm/pcm_plugin.c
+++ b/src/pcm/pcm_plugin.c
@@ -551,6 +551,8 @@  static int snd_pcm_plugin_status(snd_pcm_t *pcm, 
snd_pcm_status_t * status)
                 return err;
         status->appl_ptr = *pcm->appl.ptr;
         status->hw_ptr = *pcm->hw.ptr;
+       status->avail = snd_pcm_mmap_capture_avail(pcm);
+       status->delay = snd_pcm_mmap_capture_delay(pcm);
         return 0;
  }