vanhofen
3 years ago
7 changed files with 213 additions and 49 deletions
@ -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 |
|
@ -1,34 +0,0 @@ |
|||||
From ad8c8e5503980295dd8e5e54a6285d2d7e32eb1e Mon Sep 17 00:00:00 2001 |
|
||||
From: Jaroslav Kysela <perex@perex.cz> |
|
||||
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 <perex@perex.cz> |
|
||||
|
|
||||
Downloaded from upstream commit |
|
||||
https://github.com/alsa-project/alsa-lib/commit/ad8c8e5503980295dd8e5e54a6285d2d7e32eb1e |
|
||||
|
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> |
|
||||
---
|
|
||||
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; |
|
@ -0,0 +1,70 @@ |
|||||
|
From 1da2ede2d8b01a8851648e774a4c3c5779c0bafa Mon Sep 17 00:00:00 2001 |
||||
|
From: Adam Duskett <aduskett@rivian.com> |
||||
|
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 <aduskett@rivian.com> |
||||
|
---
|
||||
|
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 |
||||
|
|
@ -0,0 +1,51 @@ |
|||||
|
From 47252054b4a2d5c8382cb1342f5d4eb89dabf95f Mon Sep 17 00:00:00 2001 |
||||
|
From: Fabrice Fontaine <fontaine.fabrice@gmail.com> |
||||
|
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 <fontaine.fabrice@gmail.com> |
||||
|
Signed-off-by: Jaroslav Kysela <perex@perex.cz> |
||||
|
[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 |
||||
|
*/ |
@ -0,0 +1,88 @@ |
|||||
|
From c687c482107f746332dd18f7407f6c6efbffccb2 Mon Sep 17 00:00:00 2001 |
||||
|
From: Jaroslav Kysela <perex@perex.cz> |
||||
|
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 <perex@perex.cz> |
||||
|
|
||||
|
[Retrieved from: |
||||
|
https://github.com/alsa-project/alsa-lib/commit/c687c482107f746332dd18f7407f6c6efbffccb2] |
||||
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> |
||||
|
---
|
||||
|
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; |
Loading…
Reference in new issue