]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ALSA: core: Report audio_tstamp in snd_pcm_sync_ptr
authorDavid Henningsson <diwic@ubuntu.com>
Sat, 21 Apr 2018 12:57:40 +0000 (14:57 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 21 Oct 2018 07:45:37 +0000 (08:45 +0100)
commit f853dcaae2f5bbe021161e421bd1576845bae8f6 upstream.

It looks like a simple mistake that this struct member
was forgotten.

Audio_tstamp isn't used much, and on some archs (such as x86) this
ioctl is not used by default, so that might be the reason why this
has slipped for so long.

Fixes: 4eeaaeaea1ce ("ALSA: core: add hooks for audio timestamps")
Signed-off-by: David Henningsson <diwic@ubuntu.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
sound/core/pcm_native.c

index 3835b818efa8fc9d2dd65cb0feece61a0f7ee65e..d38c60671969e606d405727727e6d8218f6ba16d 100644 (file)
@@ -2527,6 +2527,7 @@ static int snd_pcm_sync_ptr(struct snd_pcm_substream *substream,
        sync_ptr.s.status.hw_ptr = status->hw_ptr;
        sync_ptr.s.status.tstamp = status->tstamp;
        sync_ptr.s.status.suspended_state = status->suspended_state;
+       sync_ptr.s.status.audio_tstamp = status->audio_tstamp;
        snd_pcm_stream_unlock_irq(substream);
        if (copy_to_user(_sync_ptr, &sync_ptr, sizeof(sync_ptr)))
                return -EFAULT;