summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-05-08 22:59:16 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-05-08 22:59:16 +0100
commit1bef8acc4b8c09637b3b233ece30a9e9c694bf8c (patch)
treebe7f4387ea4d4e012cbe59e8c2f0ef0f90f13f6f /5.4/01_all_backport-5.6-alsa-timespec64-p2.patch
parent5.6: base on 5.5 patches (diff)
downloadlinux-headers-patches-1bef8acc4b8c09637b3b233ece30a9e9c694bf8c.tar.gz
linux-headers-patches-1bef8acc4b8c09637b3b233ece30a9e9c694bf8c.tar.bz2
linux-headers-patches-1bef8acc4b8c09637b3b233ece30a9e9c694bf8c.zip
5.4: backport from 5.6 time64 alsa patches
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to '5.4/01_all_backport-5.6-alsa-timespec64-p2.patch')
-rw-r--r--5.4/01_all_backport-5.6-alsa-timespec64-p2.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/5.4/01_all_backport-5.6-alsa-timespec64-p2.patch b/5.4/01_all_backport-5.6-alsa-timespec64-p2.patch
new file mode 100644
index 0000000..865e118
--- /dev/null
+++ b/5.4/01_all_backport-5.6-alsa-timespec64-p2.patch
@@ -0,0 +1,41 @@
+From a4e7dd35b9dac21fa7b33e8788b51c7fbc7a49f1 Mon Sep 17 00:00:00 2001
+From: Baolin Wang <baolin.wang@linaro.org>
+Date: Tue, 24 Apr 2018 20:06:10 +0800
+Subject: [PATCH] ALSA: Avoid using timespec for struct snd_ctl_elem_value
+
+The struct snd_ctl_elem_value will use 'timespec' type variables to record
+timestamp, which is not year 2038 safe on 32bits system.
+
+Since there are no drivers will implemented the tstamp member of the
+struct snd_ctl_elem_value, and also the stucture size will not be changed
+if we change timespec to s64 for tstamp member of struct snd_ctl_elem_value.
+
+From Takashi's comments, "In the library, applications are not expected
+to access to this structure directly. The applications get opaque pointer
+to the structure and must use any control APIs to operate it. Actually the
+library produce no API to handle 'struct snd_ctl_elem_value.tstamp'. This
+means that we can drop this member from alsa-lib without decline of
+functionality." Thus we can simply remove the tstamp member to avoid using
+the type which is not year 2038 safe on 32bits system.
+
+Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+---
+ include/uapi/sound/asound.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/include/uapi/sound/asound.h
++++ b/include/uapi/sound/asound.h
+@@ -957,8 +957,7 @@ struct snd_ctl_elem_value {
+ } bytes;
+ struct snd_aes_iec958 iec958;
+ } value; /* RO */
+- struct timespec tstamp;
+- unsigned char reserved[128-sizeof(struct timespec)];
++ unsigned char reserved[128];
+ };
+
+ struct snd_ctl_tlv {
+--
+2.26.2
+