diff --git a/package/alsa-lib/alsa-lib.mk b/package/alsa-lib/alsa-lib.mk index 3ddb8a5e..7833db11 100644 --- a/package/alsa-lib/alsa-lib.mk +++ b/package/alsa-lib/alsa-lib.mk @@ -4,7 +4,7 @@ # ################################################################################ -ALSA_LIB_VERSION = 1.2.4 +ALSA_LIB_VERSION = 1.2.6.1 ALSA_LIB_DIR = alsa-lib-$(ALSA_LIB_VERSION) ALSA_LIB_SOURCE = alsa-lib-$(ALSA_LIB_VERSION).tar.bz2 ALSA_LIB_SITE = https://www.alsa-project.org/files/pub/lib diff --git a/package/alsa-lib/patches/0000-alsa_pc_in.patch b/package/alsa-lib/patches/0000-alsa_pc_in.patch deleted file mode 100644 index 879ab273..00000000 --- a/package/alsa-lib/patches/0000-alsa_pc_in.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/utils/alsa.pc.in -+++ b/utils/alsa.pc.in -@@ -1,7 +1,7 @@ - prefix=@prefix@ --exec_prefix=@exec_prefix@ --libdir=@libdir@ --includedir=@includedir@ -+exec_prefix=${prefix} -+libdir=${exec_prefix}/lib -+includedir=${prefix}/include - - Name: alsa - Description: Advanced Linux Sound Architecture (ALSA) - Library diff --git a/package/alsa-lib/patches/0001-Don-t-use-fork-on-noMMU-platforms.patch b/package/alsa-lib/patches/0001-Don-t-use-fork-on-noMMU-platforms.patch index 5bf9dd20..17b57d1f 100644 --- a/package/alsa-lib/patches/0001-Don-t-use-fork-on-noMMU-platforms.patch +++ b/package/alsa-lib/patches/0001-Don-t-use-fork-on-noMMU-platforms.patch @@ -10,6 +10,8 @@ Signed-off-by: Thomas Petazzoni [Jörg: update patch for 1.1.6] Signed-off-by: Jörg Krause Upstream: http://mailman.alsa-project.org/pipermail/alsa-devel/2018-November/141376.html +[Bernd: update patch for 1.2.4] +Signed-off-by: Bernd Kuhls --- configure.ac | 2 ++ src/pcm/pcm_direct.c | 10 +++++++++- @@ -32,7 +34,7 @@ diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c index 2b07eff9..4dc3ea26 100644 --- a/src/pcm/pcm_direct.c +++ b/src/pcm/pcm_direct.c -@@ -431,13 +431,21 @@ int snd_pcm_direct_server_create(snd_pcm_direct_t *dmix) +@@ -437,13 +437,21 @@ int snd_pcm_direct_server_create(snd_pcm_direct_t *dmix) close(dmix->server_fd); return ret; } diff --git a/package/alsa-lib/patches/0002-dlmisc-the-snd_plugin_dir_set.patch b/package/alsa-lib/patches/0002-dlmisc-the-snd_plugin_dir_set.patch deleted file mode 100644 index 61d94545..00000000 --- a/package/alsa-lib/patches/0002-dlmisc-the-snd_plugin_dir_set.patch +++ /dev/null @@ -1,34 +0,0 @@ -From ad8c8e5503980295dd8e5e54a6285d2d7e32eb1e Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Thu, 22 Oct 2020 20:57:32 +0200 -Subject: [PATCH] dlmisc: the snd_plugin_dir_set / snd_plugin_dir must be - declared even for \!DL_ORIGIN_AVAILABLE - -Fixes: 8580c081c2 ("dlsym: add support for ALSA_PLUGIN_DIR environment variable") -BugLink: https://github.com/alsa-project/alsa-lib/issues/91 -Signed-off-by: Jaroslav Kysela - -Downloaded from upstream commit -https://github.com/alsa-project/alsa-lib/commit/ad8c8e5503980295dd8e5e54a6285d2d7e32eb1e - -Signed-off-by: Bernd Kuhls ---- - src/dlmisc.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/dlmisc.c b/src/dlmisc.c -index c9517c55..f20eb593 100644 ---- a/src/dlmisc.c -+++ b/src/dlmisc.c -@@ -42,11 +42,9 @@ - #ifndef PIC - struct snd_dlsym_link *snd_dlsym_start = NULL; - #endif --#ifdef DL_ORIGIN_AVAILABLE - static int snd_plugin_dir_set = 0; - static char *snd_plugin_dir = NULL; - #endif --#endif - - #if defined(DL_ORIGIN_AVAILABLE) && defined(HAVE_LIBPTHREAD) - static pthread_mutex_t snd_dlpath_mutex = PTHREAD_MUTEX_INITIALIZER; diff --git a/package/alsa-lib/patches/0002-fix-PyTuple_SET_ITEM-usage-no-return-value.patch b/package/alsa-lib/patches/0002-fix-PyTuple_SET_ITEM-usage-no-return-value.patch new file mode 100644 index 00000000..a1c9f3b8 --- /dev/null +++ b/package/alsa-lib/patches/0002-fix-PyTuple_SET_ITEM-usage-no-return-value.patch @@ -0,0 +1,70 @@ +From 1da2ede2d8b01a8851648e774a4c3c5779c0bafa Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Tue, 7 Dec 2021 13:55:54 -0800 +Subject: [PATCH] Fix PyTuple_SET_ITEM() usage - no return value + +As noted in bpo-30459 (link bellow) the PyTuple_SET_ITEM() macro +has not a return value. Make the code compatible with python 3.10. + +Link: https://bugs.python.org/issue30459 +Signed-off-by: Adam Duskett +--- + modules/mixer/simple/python.c | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/modules/mixer/simple/python.c b/modules/mixer/simple/python.c +index 8a7264d..c7c1ce7 100644 +--- a/modules/mixer/simple/python.c ++++ b/modules/mixer/simple/python.c +@@ -775,8 +775,8 @@ pymixer_melement_new(struct pymixer *pymixer, PyObject *args) + obj = PyDict_GetItemString(pymixer->mdict, class); + if (obj) { + obj1 = PyTuple_New(4); +- if (PyTuple_SET_ITEM(obj1, 0, (PyObject *)pymixer)) +- Py_INCREF((PyObject *)pymixer); ++ PyTuple_SET_ITEM(obj1, 0, (PyObject *)pymixer); ++ Py_INCREF((PyObject *)pymixer); + PyTuple_SET_ITEM(obj1, 1, PyUnicode_FromString(name)); + PyTuple_SET_ITEM(obj1, 2, PyInt_FromLong(index)); + PyTuple_SET_ITEM(obj1, 3, PyInt_FromLong(weight)); +@@ -920,8 +920,8 @@ static PyObject *new_helem(struct python_priv *priv, snd_hctl_elem_t *helem) + obj = PyDict_GetItemString(priv->py_mdict, "HElement"); + if (obj) { + obj1 = PyTuple_New(3); +- if (PyTuple_SET_ITEM(obj1, 0, py_hctl)) +- Py_INCREF(py_hctl); ++ PyTuple_SET_ITEM(obj1, 0, py_hctl); ++ Py_INCREF(py_hctl); + PyTuple_SET_ITEM(obj1, 1, PyFloat_FromDouble(1)); + PyTuple_SET_ITEM(obj1, 2, PyInt_FromLong((long)helem)); + obj2 = PyObject_CallObject(obj, obj1); +@@ -995,11 +995,11 @@ int alsa_mixer_simple_event(snd_mixer_class_t *class, unsigned int mask, + } + if (o == NULL) + return 0; +- if (PyTuple_SET_ITEM(t, 1, o)) +- Py_INCREF(o); ++ PyTuple_SET_ITEM(t, 1, o); ++ Py_INCREF(o); + o = melem ? find_melem(priv, melem) : Py_None; +- if (PyTuple_SET_ITEM(t, 2, o)) +- Py_INCREF(o); ++ PyTuple_SET_ITEM(t, 2, o); ++ Py_INCREF(o); + r = PyObject_CallObject(priv->py_event_func, t); + Py_DECREF(t); + if (r) { +@@ -1066,8 +1066,8 @@ static int alsa_mixer_simple_pyinit(struct python_priv *priv, + obj1 = PyTuple_New(3); + PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong((long)class)); + PyTuple_SET_ITEM(obj1, 1, PyInt_FromLong((long)mixer)); +- if (PyTuple_SET_ITEM(obj1, 2, mdict)) +- Py_INCREF(mdict); ++ PyTuple_SET_ITEM(obj1, 2, mdict); ++ Py_INCREF(mdict); + obj2 = PyObject_CallObject(obj, obj1); + Py_XDECREF(obj1); + PyDict_SetItemString(mdict, "mixer", obj2); +-- +2.33.1 + diff --git a/package/alsa-lib/patches/0003-src-topology-parser.c-drop-duplicate-safe_strtol_bas.patch b/package/alsa-lib/patches/0003-src-topology-parser.c-drop-duplicate-safe_strtol_bas.patch new file mode 100644 index 00000000..a3741c42 --- /dev/null +++ b/package/alsa-lib/patches/0003-src-topology-parser.c-drop-duplicate-safe_strtol_bas.patch @@ -0,0 +1,51 @@ +From 47252054b4a2d5c8382cb1342f5d4eb89dabf95f Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 1 Jan 2022 17:20:47 +0100 +Subject: [PATCH] src/topology/parser.c: drop duplicate safe_strtol_base + +The safe_strtol_base() function is defined twice since + f547b2e3 ("conf: introduce safe_strtol_base()") and + 5fab157a ("topology: do not call strtol directly") +resulting in the following build failure when alsa-utils is built +statically because safe_strtol_base is defined twice. + +Fixes: http://autobuild.buildroot.org/results/08d028004090b2a8292f03910cb9bf80a73ac804 +Fixes: https://github.com/alsa-project/alsa-lib/pull/207 +Signed-off-by: Fabrice Fontaine +Signed-off-by: Jaroslav Kysela +[Retrieved from: +https://github.com/alsa-project/alsa-lib/commit/47252054b4a2d5c8382cb1342f5d4eb89dabf95f] +--- + src/topology/parser.c | 19 ------------------- + 1 file changed, 19 deletions(-) + +diff --git a/src/topology/parser.c b/src/topology/parser.c +index 01c95afa..e70173f6 100644 +--- a/src/topology/parser.c ++++ b/src/topology/parser.c +@@ -21,25 +21,6 @@ + #include "list.h" + #include "tplg_local.h" + +-/* +- * Safe strtol call +- */ +-int safe_strtol_base(const char *str, long *val, int base) +-{ +- char *end; +- long v; +- if (!*str) +- return -EINVAL; +- errno = 0; +- v = strtol(str, &end, base); +- if (errno) +- return -errno; +- if (*end) +- return -EINVAL; +- *val = v; +- return 0; +-} +- + /* + * Get integer value + */ diff --git a/package/alsa-lib/patches/0004-conf-fix-the-export-of-safe_strto-functions-from-libasound.patch b/package/alsa-lib/patches/0004-conf-fix-the-export-of-safe_strto-functions-from-libasound.patch new file mode 100644 index 00000000..3dfcb78b --- /dev/null +++ b/package/alsa-lib/patches/0004-conf-fix-the-export-of-safe_strto-functions-from-libasound.patch @@ -0,0 +1,88 @@ +From c687c482107f746332dd18f7407f6c6efbffccb2 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Sat, 1 Jan 2022 19:18:25 +0100 +Subject: [PATCH] conf: fix the export of safe_strto* functions from libasound + +Only one library should define the safe_strto function. Export it +correctly and add _snd_ prefix to avoid possible clashes with the other +application code. + +Fixes: 47252054 ("src/topology/parser.c: drop duplicate safe_strtol_base") +Fixes: https://github.com/alsa-project/alsa-lib/pull/208 +Signed-off-by: Jaroslav Kysela + +[Retrieved from: +https://github.com/alsa-project/alsa-lib/commit/c687c482107f746332dd18f7407f6c6efbffccb2] +Signed-off-by: Fabrice Fontaine +--- + include/local.h | 8 ++++++-- + src/Versions.in | 6 ++++++ + src/conf.c | 6 +++--- + 3 files changed, 15 insertions(+), 5 deletions(-) + +diff --git a/include/local.h b/include/local.h +index ebc9350c..f64fe9d8 100644 +--- a/include/local.h ++++ b/include/local.h +@@ -232,10 +232,14 @@ size_t page_align(size_t size); + size_t page_size(void); + size_t page_ptr(size_t object_offset, size_t object_size, size_t *offset, size_t *mmap_offset); + +-int safe_strtoll_base(const char *str, long long *val, int base); ++#define safe_strtoll_base _snd_safe_strtoll_base ++int _snd_safe_strtoll_base(const char *str, long long *val, int base); + static inline int safe_strtoll(const char *str, long long *val) { return safe_strtoll_base(str, val, 0); } +-int safe_strtol_base(const char *str, long *val, int base); ++#define safe_strtol_base _snd_safe_strtol_base ++int _snd_safe_strtol_base(const char *str, long *val, int base); + static inline int safe_strtol(const char *str, long *val) { return safe_strtol_base(str, val, 0); } ++#define safe_strtod _snd_safe_strtod ++int _snd_safe_strtod(const char *str, double *val); + + int snd_send_fd(int sock, void *data, size_t len, int fd); + int snd_receive_fd(int sock, void *data, size_t len, int *fd); +diff --git a/src/Versions.in b/src/Versions.in +index 5daccbd4..85031b38 100644 +--- a/src/Versions.in ++++ b/src/Versions.in +@@ -134,3 +134,9 @@ ALSA_1.1.6 { + + @SYMBOL_PREFIX@snd_dlopen; + } ALSA_0.9.7; ++ ++ALSA_1.2.6 { ++ global: ++ ++ @SYMBOL_PREFIX@_snd_safe_strto*; ++} ALSA_1.1.6; +diff --git a/src/conf.c b/src/conf.c +index d3597cbc..098ebd63 100644 +--- a/src/conf.c ++++ b/src/conf.c +@@ -663,7 +663,7 @@ static int input_stdio_open(snd_input_t **inputp, const char *file, + return err; + } + +-int safe_strtoll_base(const char *str, long long *val, int base) ++int _snd_safe_strtoll_base(const char *str, long long *val, int base) + { + char *end; + long v; +@@ -679,7 +679,7 @@ int safe_strtoll_base(const char *str, long long *val, int base) + return 0; + } + +-int safe_strtol_base(const char *str, long *val, int base) ++int _snd_safe_strtol_base(const char *str, long *val, int base) + { + char *end; + long v; +@@ -695,7 +695,7 @@ int safe_strtol_base(const char *str, long *val, int base) + return 0; + } + +-static int safe_strtod(const char *str, double *val) ++int _snd_safe_strtod(const char *str, double *val) + { + char *end; + double v;