All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: core: Report audio_tstamp in snd_pcm_sync_ptr
@ 2018-04-16 11:59 Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2018-04-16 11:59 UTC (permalink / raw)
  To: alsa-devel; +Cc: David Henningsson

From: David Henningsson <diwic@ubuntu.com>

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.

Signed-off-by: David Henningsson <diwic@ubuntu.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/core/pcm_native.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 35ffccea94c3..632228bfd36b 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2751,6 +2751,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;
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ALSA: core: Report audio_tstamp in snd_pcm_sync_ptr
  2018-04-21 12:57 Takashi Iwai
@ 2018-04-22 12:55 ` Takashi Sakamoto
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Sakamoto @ 2018-04-22 12:55 UTC (permalink / raw)
  To: Takashi Iwai, alsa-devel; +Cc: David Henningsson

Hi,

On Apr 21 2018 21:57, Takashi Iwai wrote:
> From: David Henningsson <diwic@ubuntu.com>
> 
> 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.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

However, with ALSA PCM interface v2.0.14 or later, theoretically in a 
case of driver's support for SNDRV_PCM_INFO_SYNC_APPLPTR, I perhaps can 
see the slip on x86 platform. In detail, please read below commits in order:
  * 42f945970af9 ('ALSA: pcm: Add the explicit appl_ptr sync support')
  * 4b671f577474 ('ALSA: pcm: Add an ioctl to specify the supported
    protocol version')
  * b602aa8eb1a0 ('ALSA: pcm: Disable only control mmap for explicit
    appl_ptr sync')

> Fixes: 4eeaaeaea1ce ("ALSA: core: add hooks for audio timestamps")
> Signed-off-by: David Henningsson <diwic@ubuntu.com>
> Cc: <stable@vger.kernel.org>

# v3.8+

$ git name-rev --tags 4eeaaeaea1cec
4eeaaeaea1cec tags/v3.8-rc1~29^2~127

> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
> 
>   sound/core/pcm_native.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
> index 35ffcce..632228b 100644
> --- a/sound/core/pcm_native.c
> +++ b/sound/core/pcm_native.c
> @@ -2751,6 +2751,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;


Thanks

Takashi Sakamoto

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] ALSA: core: Report audio_tstamp in snd_pcm_sync_ptr
@ 2018-04-21 12:57 Takashi Iwai
  2018-04-22 12:55 ` Takashi Sakamoto
  0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2018-04-21 12:57 UTC (permalink / raw)
  To: alsa-devel; +Cc: David Henningsson

From: David Henningsson <diwic@ubuntu.com>

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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

---

 sound/core/pcm_native.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 35ffcce..632228b 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2751,6 +2751,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;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-22 12:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-16 11:59 [PATCH] ALSA: core: Report audio_tstamp in snd_pcm_sync_ptr Takashi Iwai
2018-04-21 12:57 Takashi Iwai
2018-04-22 12:55 ` Takashi Sakamoto

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.