This is my first attempt to convert sound subsystem to year 2038 safe. In these series patches I focus on the timer.
When check the time relative code in timer of sound subsystem, I feel that I could easy split 64bit time_xxx type in kernel and in userspace (__kernel_time_xxx) according to arnd's approach[1] in comparison with other parts of sound subsys(e.g. pcm). Whether I should follow the same approach in the whole sound subsystem is an open issue for me.
On the other hand, there are difference approaches for dealing with the code in userspace. It seems that snd_timer_read is the only api for other parts of alsa. It share the same code no matter tread is true or false.
The fisrt approach is hide __kernel_time_xxx inside snd_timer_read, although the code may be a little bit ugly.
The second approach is that force userspace migration to 64bit time on all 32bit(including compat) system by re-definition the following types in alsa-lib/include/global.h: typedef struct __kernel_timespec snd_htimestamp_t; This approach will not affect the 64bit application.
[1] http://git.kernel.org/cgit/linux/kernel/git/arnd/playground.git/log/?h=y2038...
Bamvor Zhang Jian (2): y2038: sound: convert timer to y2038 safe y2038: sound: convert compat ioctl of timer to year 2038 safe
include/sound/timer.h | 8 +++++++- include/uapi/sound/asound.h | 9 ++++++--- sound/core/timer.c | 49 +++++++++++++++++++++++++++++++-------------- sound/core/timer_compat.c | 4 +++- 4 files changed, 50 insertions(+), 20 deletions(-)