diff mbox series

[alsa-lib,4/4] pcm: share: Pass appl_ptr and hw_ptr in snd_pcm_status()

Message ID 20210122144842.8843-5-tiwai@suse.de (mailing list archive)
State New, archived
Headers show
Series pcm: Fix missing appl_ptr and hw_ptr updates in snd_pcm_status() | expand

Commit Message

Takashi Iwai Jan. 22, 2021, 2:48 p.m. UTC
This one also has the same problem as others; the appl_ptr and hw_ptr
of share plugin aren't updated in snd_pcm_status() call.  Fix it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 src/pcm/pcm_share.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/src/pcm/pcm_share.c b/src/pcm/pcm_share.c
index bff9507d6422..72509491b366 100644
--- a/src/pcm/pcm_share.c
+++ b/src/pcm/pcm_share.c
@@ -711,6 +711,8 @@  static int snd_pcm_share_status(snd_pcm_t *pcm, snd_pcm_status_t *status)
  _notrunning:
 	status->delay = sd + d;
 	status->state = share->state;
+	status->appl_ptr = *pcm->appl.ptr;
+	status->hw_ptr = *pcm->hw.ptr;
 	status->trigger_tstamp = share->trigger_tstamp;
  _end:
 	Pthread_mutex_unlock(&slave->mutex);