ALSA: pcm: Replace [audio_]tstamp_[n]sec by struct __snd_timespec in struct snd_pcm_m...
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Sat, 14 Jun 2025 06:43:16 +0000 (08:43 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 16 Jun 2025 06:25:27 +0000 (08:25 +0200)
commitc72fad73ba497c237fcc0d771d87a2f8447599bb
tree83ebb5e4af392a991450ed9b855695dc05dae82d
parenta9b49bf8ad5905ebd999da345dcff3b9fad43877
ALSA: pcm: Replace [audio_]tstamp_[n]sec by struct __snd_timespec in struct snd_pcm_mmap_status32

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_timespec in struct snd_pcm_mmap_status32.
Do the same with audio_tstamp_sec and audio_tstamp_nsec.

This is possible because struct snd_pcm_mmap_status32 is packed
and __SND_STRUCT_TIME64 is always defined for kernel which means
struct __snd_timespec is always defined as:

struct __snd_timespec {
__s32 tv_sec;
__s32 tv_nsec;
};

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/df8ea1a9aff61c3e358759b1f495bdb9fb8a3e6a.1749883041.git.christophe.leroy@csgroup.eu
sound/core/pcm_compat.c
sound/core/pcm_native.c