alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Subject: [PATCH alsa-lib 4/4] pcm: share: Pass appl_ptr and hw_ptr in snd_pcm_status()
Date: Fri, 22 Jan 2021 15:48:42 +0100	[thread overview]
Message-ID: <20210122144842.8843-5-tiwai@suse.de> (raw)
In-Reply-To: <20210122144842.8843-1-tiwai@suse.de>

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 --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);
-- 
2.26.2


  parent reply	other threads:[~2021-01-22 14:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 14:48 [PATCH alsa-lib 0/4] pcm: Fix missing appl_ptr and hw_ptr updates in snd_pcm_status() Takashi Iwai
2021-01-22 14:48 ` [PATCH alsa-lib 1/4] pcm: direct: Fix the missing appl_ptr update Takashi Iwai
2021-01-22 14:48 ` [PATCH alsa-lib 2/4] pcm: ioplug: Pass appl_ptr and hw_ptr in snd_pcm_status() Takashi Iwai
2021-01-22 14:48 ` [PATCH alsa-lib 3/4] pcm: null: " Takashi Iwai
2021-01-22 14:48 ` Takashi Iwai [this message]
2021-01-22 17:00 ` [PATCH alsa-lib 0/4] pcm: Fix missing appl_ptr and hw_ptr updates " Jaroslav Kysela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210122144842.8843-5-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).