Re: [PATCH] ALSA: pcm: Replace [audio_]tstamp_[n]sec by struct __snd_timespec64 in struct snd_pcm_mmap_status_x32
From: Takashi Iwai
Date: Mon Jun 16 2025 - 02:26:52 EST
On Mon, 16 Jun 2025 07:12:23 +0200,
Christophe Leroy wrote:
>
> To match struct __snd_pcm_mmap_status and enable reuse of
> snd_pcm_sync_ptr_get_user() and snd_pcm_sync_ptr_put_user() by
> snd_pcm_sync_ptr() replace tstamp_sec and tstamp_nsec fields by
> a struct __snd_timespec64 in struct snd_pcm_mmap_status_x32.
> Do the same with audio_tstamp_sec and audio_tstamp_nsec.
>
> This is possible because struct snd_pcm_mmap_status_x32 is packed
> and __SND_STRUCT_TIME64 is always defined for kernel which means
> struct __snd_timespec64 is always defined as struct __kernel_timespec
> which is:
>
> struct __kernel_timespec {
> long long tv_sec;
> long long tv_nsec;
> };
>
> Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
> Fixes: a0f3992ee86e ("ALSA: pcm: Replace [audio_]tstamp_[n]sec by struct __snd_timespec in struct snd_pcm_mmap_status32")
> Closes: https://lore.kernel.org/all/20250616130126.08729b84@xxxxxxxxxxxxxxxx/
> Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
> ---
> Might be squashed with a0f3992ee86e if you happen to rebase sound tree.
Since your patches are the last ones, I rebased now exceptionally.
thanks,
Takashi