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

Just like the previous fix for ioplug, the null plugin also misses the
appl_ptr and hw_ptr updates for snd_pcm_status().  Fix it as well.

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

diff --git a/src/pcm/pcm_null.c b/src/pcm/pcm_null.c
index 1d81548569f0..c8ea9b38785f 100644
--- a/src/pcm/pcm_null.c
+++ b/src/pcm/pcm_null.c
@@ -96,6 +96,8 @@ static int snd_pcm_null_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
 	memset(status, 0, sizeof(*status));
 	status->state = null->state;
 	status->trigger_tstamp = null->trigger_tstamp;
+	status->appl_ptr = *pcm->appl.ptr;
+	status->hw_ptr = *pcm->hw.ptr;
 	gettimestamp(&status->tstamp, pcm->tstamp_type);
 	status->avail = snd_pcm_null_avail_update(pcm);
 	status->avail_max = pcm->buffer_size;
-- 
2.26.2


  parent reply	other threads:[~2021-01-22 14:51 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 ` Takashi Iwai [this message]
2021-01-22 14:48 ` [PATCH alsa-lib 4/4] pcm: share: " Takashi Iwai
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-4-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.