]> git.alsa-project.org Git - alsa-lib.git/commitdiff
pcm: share: Pass appl_ptr and hw_ptr in snd_pcm_status()
authorTakashi Iwai <tiwai@suse.de>
Fri, 22 Jan 2021 14:48:42 +0000 (15:48 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 22 Jan 2021 16:58:07 +0000 (17:58 +0100)
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>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm_share.c

index bff9507d6422846a8c340072ac350d02689e158a..72509491b36647eac9e290dfb22b06f6cb7c0ca3 100644 (file)
@@ -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);