import alsa-lib-1.2.5-4.el8

This commit is contained in:
CentOS Sources 2021-06-16 04:20:45 +00:00 committed by Andrew Lukoshko
parent 06f4398ead
commit 3cda25114e
2 changed files with 240 additions and 24 deletions

View File

@ -1,7 +1,7 @@
From ddfc32abf5697de1618b9e7ffdf57a0f97013090 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 08:49:32 +0200
Subject: [PATCH 01/22] conf: fix load_for_all_cards()
Subject: [PATCH 01/28] conf: fix load_for_all_cards()
The 63f7745b commit is loading the driver specific configuration
multiple times which ends with the array merges (see the bug).
@ -99,7 +99,7 @@ index f6c80031..d863dec6 100644
From 0e4ba2ea8c0402f12a645032a14693eb9b1278e6 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 11:09:43 +0200
Subject: [PATCH 02/22] ucm: add _alibpref to get the private device prefix
Subject: [PATCH 02/28] ucm: add _alibpref to get the private device prefix
It may be useful to get the device prefix for the local configuration.
@ -168,7 +168,7 @@ index 361952f6..3c9ea15d 100644
From 9621d0bff2e60b43e329ffa5059ab19f2914ec14 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 11:21:54 +0200
Subject: [PATCH 03/22] ucm: fix _alibpref string (add '.' delimiter to the
Subject: [PATCH 03/28] ucm: fix _alibpref string (add '.' delimiter to the
end)
Fixes: 0e4ba2ea ("ucm: add _alibpref to get the private device prefix")
@ -204,7 +204,7 @@ index 3c9ea15d..c9b37b68 100644
From 2a1dafdbe5932260aeb4db359ce5d630b8106889 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 19:26:47 +0200
Subject: [PATCH 04/22] conf: remove dead code in snd_config_get_card()
Subject: [PATCH 04/28] conf: remove dead code in snd_config_get_card()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
@ -236,7 +236,7 @@ index 3663d164..a561040c 100644
From 013ec607db9de11b682f2b85d843be062ca0d046 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 19:28:32 +0200
Subject: [PATCH 05/22] control: remap - fix uninitialized value in
Subject: [PATCH 05/28] control: remap - fix uninitialized value in
parse_map_vindex()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@ -264,7 +264,7 @@ index f3d65010..17c6558a 100644
From 2fee6af9b6e157475159d284af8de1e879bb7a36 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 19:35:44 +0200
Subject: [PATCH 06/22] pcm: direct - fix pcmp error path in
Subject: [PATCH 06/28] pcm: direct - fix pcmp error path in
_snd_pcm_direct_new()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@ -331,7 +331,7 @@ index 0e5e0421..361805bd 100644
From eb95cad4e22a0bf2577f1fa4a3f6fd18caed3362 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 19:37:53 +0200
Subject: [PATCH 07/22] pcm: remove extra NULL checks in snd_pcm_dmix_open()
Subject: [PATCH 07/28] pcm: remove extra NULL checks in snd_pcm_dmix_open()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
@ -374,7 +374,7 @@ index 8747450f..608593f1 100644
From 01a45aec6fcd5a5378a5b5e0ae0f9dacde2068e4 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 19:39:32 +0200
Subject: [PATCH 08/22] pcm: remove extra NULL checks in snd_pcm_dsnoop_open()
Subject: [PATCH 08/28] pcm: remove extra NULL checks in snd_pcm_dsnoop_open()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
@ -419,7 +419,7 @@ index fb1b02c2..2c3b9f43 100644
From 74c6382df6cf18b801659d8c5c53407a7ea1f02b Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 19:46:46 +0200
Subject: [PATCH 09/22] pcm: remove extra NULL checks in snd_pcm_dshare_open()
Subject: [PATCH 09/28] pcm: remove extra NULL checks in snd_pcm_dshare_open()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
@ -464,7 +464,7 @@ index 0f5238a6..a918512b 100644
From eabadf545c51d4c88c5f359db73726ec3ac653ba Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 19:49:29 +0200
Subject: [PATCH 10/22] pcm: softvol - fix early exit in add_tlv_info()
Subject: [PATCH 10/28] pcm: softvol - fix early exit in add_tlv_info()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
@ -498,7 +498,7 @@ index e2bdd31a..eea322ca 100644
From cf3846d46053b23006e6a9042b586fc78e81af55 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 19:50:17 +0200
Subject: [PATCH 11/22] timer: remove dead code in _snd_timer_hw_open()
Subject: [PATCH 11/28] timer: remove dead code in _snd_timer_hw_open()
---
src/timer/timer_hw.c | 2 --
@ -524,7 +524,7 @@ index cfb77463..fe4e40bb 100644
From 200d18cda7a700607c21ad5dc9faaea2a1e27dbd Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 19:51:13 +0200
Subject: [PATCH 12/22] ucm: fix error path in execute_cfgsave()
Subject: [PATCH 12/28] ucm: fix error path in execute_cfgsave()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
@ -554,7 +554,7 @@ index c9b37b68..42fdaa1d 100644
From 9b71d53bde21c8bb0d900c17863664e12753d844 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 19:52:12 +0200
Subject: [PATCH 13/22] ucm: fix use after free in if_eval_regex_match()
Subject: [PATCH 13/28] ucm: fix use after free in if_eval_regex_match()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
@ -586,7 +586,7 @@ index 59d1a155..adb0ecd9 100644
From 7764e3e621a4c8a52327833d44e32c8b6fe3a131 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 19:53:24 +0200
Subject: [PATCH 14/22] ucm: fix if_eval_path() - access NULL pointer
Subject: [PATCH 14/28] ucm: fix if_eval_path() - access NULL pointer
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
@ -613,7 +613,7 @@ index adb0ecd9..0ed0b690 100644
From 7fcb1aadd56e94f03e51c4747e72d77279151c22 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 19:56:01 +0200
Subject: [PATCH 15/22] ucm: find_exec() - fix memory leak (dir)
Subject: [PATCH 15/28] ucm: find_exec() - fix memory leak (dir)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
@ -639,7 +639,7 @@ index a22df8fe..1cdb2633 100644
From 26ab7fc3e4cba416cf51aa0fb48fdddaa0d861ee Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 19:58:04 +0200
Subject: [PATCH 16/22] ucm: fix possible NULL pointer dereference in
Subject: [PATCH 16/28] ucm: fix possible NULL pointer dereference in
uc_mgr_exec()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@ -671,7 +671,7 @@ index 1cdb2633..d83206d0 100644
From 64a6d4d1e827732bef7c68e1e6d2cb6863b4597c Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 19:59:10 +0200
Subject: [PATCH 17/22] ucm: check error value in parse_lookup_query()
Subject: [PATCH 17/28] ucm: check error value in parse_lookup_query()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
@ -702,7 +702,7 @@ index c56730c5..0bc4e63f 100644
From 30d1d256e792fbabf14c57efb98c489541b19f37 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 2 Jun 2021 20:01:08 +0200
Subject: [PATCH 18/22] ucm: fix out-of-array access in
Subject: [PATCH 18/28] ucm: fix out-of-array access in
rval_device_lookup_init()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@ -730,7 +730,7 @@ index 0bc4e63f..20905c3f 100644
From 42c0ccf3275fef523471fa7ea4feecd7b1052357 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Thu, 3 Jun 2021 07:29:11 +0200
Subject: [PATCH 19/22] conf: snd_config_get_card() remove unused assignment
Subject: [PATCH 19/28] conf: snd_config_get_card() remove unused assignment
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
@ -757,7 +757,7 @@ index a561040c..64af96fa 100644
From a154cb29043a4db2fa92bc146fd4cf94c9851892 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Thu, 3 Jun 2021 07:29:43 +0200
Subject: [PATCH 20/22] pcm: direct - remove dead code
Subject: [PATCH 20/28] pcm: direct - remove dead code
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
@ -784,7 +784,7 @@ index 361805bd..d50503e3 100644
From e2133090603a74c0b08cd45b689063071bc90c81 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Thu, 3 Jun 2021 07:30:27 +0200
Subject: [PATCH 21/22] ucm: fix possible memory leak in parse_verb_file()
Subject: [PATCH 21/28] ucm: fix possible memory leak in parse_verb_file()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
@ -811,7 +811,7 @@ index ed261fa2..fccf5791 100644
From 0325f4357d25f262400038f074512e1887c8e5f1 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Thu, 3 Jun 2021 09:00:51 +0200
Subject: [PATCH 22/22] ucm: compound_merge() - fix use after free (and logic)
Subject: [PATCH 22/28] ucm: compound_merge() - fix use after free (and logic)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
@ -861,3 +861,219 @@ index 6945dd2e..a3a584a1 100644
--
2.30.2
From abe805ed6c7f38e48002e575535afd1f673b9bcd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Thu, 3 Jun 2021 12:29:03 +0200
Subject: [PATCH 23/28] ucm_exec.c: Include limits.h explicitly to fix build on
musl
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes:
| ../../../alsa-lib-1.2.5/src/ucm/ucm_exec.c: In function 'find_exec':
| ../../../alsa-lib-1.2.5/src/ucm/ucm_exec.c:43:18: error: 'PATH_MAX' undeclared (first use in this function)
| 43 | char bin[PATH_MAX];
| | ^~~~~~~~
| ../../../alsa-lib-1.2.5/src/ucm/ucm_exec.c:43:18: note: each undeclared identifier is reported only once for each function it appears in
| ../../../alsa-lib-1.2.5/src/ucm/ucm_exec.c: In function 'uc_mgr_exec':
| ../../../alsa-lib-1.2.5/src/ucm/ucm_exec.c:177:18: error: 'PATH_MAX' undeclared (first use in this function)
| 177 | char bin[PATH_MAX];
| | ^~~~~~~~
Fixes: https://github.com/alsa-project/alsa-lib/pull/145
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/ucm/ucm_exec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/ucm/ucm_exec.c b/src/ucm/ucm_exec.c
index d83206d0..4ddf5d15 100644
--- a/src/ucm/ucm_exec.c
+++ b/src/ucm/ucm_exec.c
@@ -30,6 +30,7 @@
#include "ucm_local.h"
#include <sys/stat.h>
#include <sys/wait.h>
+#include <limits.h>
#include <dirent.h>
static pthread_mutex_t fork_lock = PTHREAD_MUTEX_INITIALIZER;
--
2.30.2
From 01960fa85699686763e42eab537100909e8e6607 Mon Sep 17 00:00:00 2001
From: Chih-Wei Huang <cwhuang@linux.org.tw>
Date: Mon, 14 Jun 2021 12:21:35 +0800
Subject: [PATCH 24/28] ucm: include sys/wait.h to fix build on Android
src/ucm/main.c:788:8: error: implicit declaration of function 'WIFSIGNALED' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (WIFSIGNALED(err)) {
^
src/ucm/main.c:790:10: error: implicit declaration of function 'WIFEXITED' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
} if (WIFEXITED(err)) {
^
src/ucm/main.c:791:34: error: implicit declaration of function 'WEXITSTATUS' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (ignore_error == false && WEXITSTATUS(err) != 0) {
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/ucm/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/ucm/main.c b/src/ucm/main.c
index 42fdaa1d..d4645e4a 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -37,6 +37,7 @@
#include <stdarg.h>
#include <pthread.h>
#include <sys/stat.h>
+#include <sys/wait.h>
#include <limits.h>
/*
--
2.30.2
From 76d1aa0cd7635f903bb1d48bb9c18279d46ec624 Mon Sep 17 00:00:00 2001
From: Chih-Wei Huang <cwhuang@linux.org.tw>
Date: Mon, 14 Jun 2021 12:24:10 +0800
Subject: [PATCH 25/28] configure: check if eaccess() is available
To fix the build error on Android:
src/ucm/parser.c:2521:7: error: implicit declaration of function 'eaccess' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (eaccess(filename, R_OK))
^
src/ucm/parser.c:2521:7: note: did you mean 'access'?
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
configure.ac | 1 +
src/ucm/parser.c | 4 ++++
src/ucm/ucm_cond.c | 4 ++++
3 files changed, 9 insertions(+)
diff --git a/configure.ac b/configure.ac
index 60271b8a..635bfeae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,7 @@ AC_HEADER_TIME
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_CHECK_FUNCS([uselocale])
+AC_CHECK_FUNCS([eaccess])
SAVE_LIBRARY_VERSION
AC_SUBST(LIBTOOL_VERSION_INFO)
diff --git a/src/ucm/parser.c b/src/ucm/parser.c
index fccf5791..ee997800 100644
--- a/src/ucm/parser.c
+++ b/src/ucm/parser.c
@@ -2518,7 +2518,11 @@ int uc_mgr_scan_master_configs(const char **_list[])
snprintf(fn, sizeof(fn), "%s.conf", d_name);
ucm_filename(filename, sizeof(filename), 2, d_name, fn);
+#ifdef HAVE_EACCESS
if (eaccess(filename, R_OK))
+#else
+ if (access(filename, R_OK))
+#endif
continue;
err = uc_mgr_config_load(2, filename, &cfg);
diff --git a/src/ucm/ucm_cond.c b/src/ucm/ucm_cond.c
index 0ed0b690..985a366b 100644
--- a/src/ucm/ucm_cond.c
+++ b/src/ucm/ucm_cond.c
@@ -305,7 +305,11 @@ static int if_eval_path(snd_use_case_mgr_t *uc_mgr, snd_config_t *eval)
return -EINVAL;
}
+#ifdef HAVE_EACCESS
if (eaccess(path, amode))
+#else
+ if (access(path, amode))
+#endif
return 0;
return 1;
--
2.30.2
From 8253c1c1f9095901c7dbfbb8ca5147d05828651a Mon Sep 17 00:00:00 2001
From: Chih-Wei Huang <cwhuang@linux.org.tw>
Date: Mon, 14 Jun 2021 12:41:11 +0800
Subject: [PATCH 26/28] Fix EXPORT_SYMBOL attribute for clang
Clang doesn't have the externally_visible attribute.
src/pcm/pcm.c:1503:1: error: unknown attribute 'externally_visible' ignored [-Werror,-Wunknown-attributes]
#define EXPORT_SYMBOL __attribute__((visibility("default"),externally_visible)) ^
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
include/alsa-symbols.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/alsa-symbols.h b/include/alsa-symbols.h
index bba9a9d4..344f021a 100644
--- a/include/alsa-symbols.h
+++ b/include/alsa-symbols.h
@@ -34,7 +34,11 @@
#define default_symbol_version(real, name, version) \
__asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@@" #version)
+#ifdef __clang__
+#define EXPORT_SYMBOL __attribute__((visibility("default")))
+#else
#define EXPORT_SYMBOL __attribute__((visibility("default"),externally_visible))
+#endif
#ifdef USE_VERSIONED_SYMBOLS
#define use_symbol_version(real, name, version) \
--
2.30.2
From f4c061f349188c548497607efd4622c6e6a43270 Mon Sep 17 00:00:00 2001
From: Chih-Wei Huang <cwhuang@linux.org.tw>
Date: Mon, 14 Jun 2021 13:08:08 +0800
Subject: [PATCH 27/28] control: remap - fix an infinite recursive call in the
async callback
The function snd_ctl_remap_async will call itself infinitely. Looks like
a typo.
Fixes: a64391a42 ("control: remap plugin - initial version")
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/control/control_remap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/control/control_remap.c b/src/control/control_remap.c
index 17c6558a..a85c1725 100644
--- a/src/control/control_remap.c
+++ b/src/control/control_remap.c
@@ -323,7 +323,7 @@ static int snd_ctl_remap_nonblock(snd_ctl_t *ctl, int nonblock)
static int snd_ctl_remap_async(snd_ctl_t *ctl, int sig, pid_t pid)
{
snd_ctl_remap_t *priv = ctl->private_data;
- return snd_ctl_remap_async(priv->child, sig, pid);
+ return snd_ctl_async(priv->child, sig, pid);
}
static int snd_ctl_remap_subscribe_events(snd_ctl_t *ctl, int subscribe)
--
2.30.2

View File

@ -9,7 +9,7 @@
Summary: The Advanced Linux Sound Architecture (ALSA) library
Name: alsa-lib
Version: %{version_alsa_lib}
Release: 3%{?prever_dot}%{?dist}
Release: 4%{?prever_dot}%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.alsa-project.org/
@ -163,7 +163,7 @@ rm %{buildroot}/%{_includedir}/asoundlib.h
%{_datadir}/alsa/topology
%changelog
* Thu Jun 3 2021 Jaroslav Kysela <perex@perex.cz> - 1.2.5-3
* Mon Jun 14 2021 Jaroslav Kysela <perex@perex.cz> - 1.2.5-4
- Updated to 1.2.5
* Mon Feb 1 2021 Jaroslav Kysela <perex@perex.cz> - 1.2.4-5