Compare commits

..

103 commits

Author SHA1 Message Date
Fedora Release Engineering
44510615c1 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-16 03:36:37 +00:00
Jaroslav Kysela
454530bd65 update to 1.2.15.3
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-01-13 08:29:06 +01:00
Jaroslav Kysela
2bb0b91c53 update to 1.2.15.2
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2026-01-08 15:52:41 +01:00
Jaroslav Kysela
f26eb0d2f9 update to 1.2.15.1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-19 12:01:03 +01:00
Jaroslav Kysela
3a48b2356c apply upstream 1.2.15 fixes #3
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-10 16:58:16 +01:00
Jaroslav Kysela
0c2415ae0b apply upstream 1.2.15 fixes #2
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-10 12:18:09 +01:00
Jaroslav Kysela
91324e7b92 apply upstream 1.2.15 fixes #1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-09 18:16:36 +01:00
Jaroslav Kysela
0ed21ea73d update sources for 1.2.15
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-07 22:39:00 +01:00
Jaroslav Kysela
e97c40908c update to 1.2.15
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-12-07 22:31:51 +01:00
Fedora Release Engineering
e8691ba09c Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 16:55:03 +00:00
Jaroslav Kysela
9535a12c2c update alsa-ucm-conf files to latest
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-06-24 15:24:37 +02:00
Jaroslav Kysela
ab1b5f6303 use updated tar ball
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-04-14 18:52:51 +02:00
Jaroslav Kysela
ecc98ea4c4 update to 1.2.14
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2025-04-14 11:12:39 +02:00
Fedora Release Engineering
ce98cbeca1 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 10:54:10 +00:00
Jaroslav Kysela
220911de7a fix snd_seq_has_queue_tempo_base symbol version #2
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2024-11-15 09:40:05 +01:00
Jaroslav Kysela
67fd486ada fix snd_seq_has_queue_tempo_base symbol version
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2024-11-15 09:34:14 +01:00
Jaroslav Kysela
e561588491 fix SOF HDA UCM configuration
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2024-11-13 16:26:28 +01:00
Jaroslav Kysela
0d73162217 update to 1.2.13
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2024-11-12 13:13:09 +01:00
Fedora Release Engineering
943c8b44cd Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 16:52:40 +00:00
Jaroslav Kysela
205206c994 update to 1.2.12
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2024-06-10 14:21:05 +02:00
Jaroslav Kysela
d50c4594a0 update 1.2.11 source package 2024-01-29 17:27:31 +01:00
Jaroslav Kysela
92b901cd68 update to 1.2.11
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2024-01-29 14:25:23 +01:00
Fedora Release Engineering
286a38aadf Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 22:56:09 +00:00
Fedora Release Engineering
e928063161 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 12:44:50 +00:00
Jaroslav Kysela
313e6bd344 fix SplitPCM (alsa-ucm)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-04 17:17:33 +02:00
Jaroslav Kysela
bf0d819031 fix control.h header file (ump)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-04 10:19:43 +02:00
Jaroslav Kysela
77501925ab remove alsa-lib-1.0.14-glibc-open.patch
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 18:23:43 +02:00
Jaroslav Kysela
ed9a35b694 add missing alsa-lib-1.2.10-glibc-open.patch
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 18:22:57 +02:00
Jaroslav Kysela
ace9ef33a6 update to 1.2.10
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-01 18:21:55 +02:00
Fedora Release Engineering
5281fc6cca Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 13:09:34 +00:00
Jaroslav Kysela
2e7fc81a6d update licenses to SPDX format 2023-06-06 20:06:58 +02:00
Jaroslav Kysela
ec4e2ba2d7 update ucm (nhlt-dmic-info) 2023-05-16 17:50:39 +02:00
Jaroslav Kysela
645ed00454 fix the 1.2.9 build 2023-05-04 09:50:58 +02:00
Jaroslav Kysela
d6f38125d0 update to 1.2.9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-05-04 09:41:00 +02:00
Fedora Release Engineering
425def71d7 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-18 21:37:36 +00:00
Jaroslav Kysela
f2b55673df update alsa-lib and ucm conf to latest git
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=2134824
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2022-12-07 15:04:13 +01:00
Jaroslav Kysela
8362c2ece3 update to 1.2.8
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2022-10-24 10:43:23 +02:00
Fedora Release Engineering
17a5a60262 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-20 20:40:54 +00:00
Jaroslav Kysela
c2ac4b6efa add missing sources 2022-07-08 17:48:32 +02:00
Jaroslav Kysela
218694a669 update to 1.2.7.2
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2022-07-08 17:43:32 +02:00
Jaroslav Kysela
afa3fc0a7e update to 1.2.7.1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2022-06-17 12:02:36 +02:00
Jaroslav Kysela
dcc23d2d03 update to 1.2.7
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2022-05-31 17:03:11 +02:00
Fedora Release Engineering
390f3b3f7f - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-19 21:09:13 +00:00
Jaroslav Kysela
dc95b94f41 updated alsa-ucm-conf to 1.2.6.3
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-12-17 17:57:34 +01:00
Jaroslav Kysela
82be0e2f26 correct Requires 2021-12-10 11:38:41 +01:00
Jaroslav Kysela
90dfeee307 updated alsa-lib to 1.2.6.1 and alsa-ucm-conf to 1.2.6.2 2021-12-10 10:11:53 +01:00
Jaroslav Kysela
e25e817147 AMD acp UCM fix 2021-12-09 12:24:34 +01:00
Jaroslav Kysela
e0c620c590 device open fixes from upstream 2021-12-09 10:26:39 +01:00
Jaroslav Kysela
f423222138 update to 1.2.6 2021-12-06 13:17:48 +01:00
Peter Robinson
4f7869e825 Add Rockchip ES8316 support (from upstreama) 2021-11-13 12:20:58 +00:00
Jaroslav Kysela
e42bd8613d ucm fixes for 1.2.5.1 2021-08-31 09:55:42 +02:00
Fedora Release Engineering
3f83c1ca47 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 17:28:11 +00:00
Fedora Release Engineering
4dbf7080fe - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 12:32:47 +00:00
Jaroslav Kysela
e62f855130 update to 1.2.5.1 2021-06-14 13:53:16 +02:00
Jaroslav Kysela
7eb4b59807 add coverity fixes 2021-06-02 20:02:15 +02:00
Jaroslav Kysela
c9814e5a0f remove tegra configs from ucm patch 2021-06-02 19:45:34 +02:00
Jaroslav Kysela
9e061ed2ff 1.2.5 fixes 2021-06-02 19:21:12 +02:00
Jaroslav Kysela
3a13c60e87 update to 1.2.5 2021-05-28 13:39:51 +02:00
Fedora Release Engineering
ecd130e246 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 00:00:33 +00:00
Tom Stellard
34ee424708 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-16 23:24:31 +00:00
Jaroslav Kysela
e21ce7bfab ucm Linked fix 2020-10-19 12:29:43 +02:00
Jaroslav Kysela
0b0ace4695 try to fix lto build 2020-10-15 19:44:09 +02:00
Jaroslav Kysela
dffef8e6ea fix s390 build 2020-10-15 19:31:06 +02:00
Jaroslav Kysela
d8f7704e43 update to 1.2.4 2020-10-15 18:52:21 +02:00
Fedora Release Engineering
d1acbfe5cb - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-31 23:55:35 +00:00
Fedora Release Engineering
9cf64c7508 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 11:57:17 +00:00
Jeff Law
9a6aa025e9 Disable LTO 2020-07-01 12:24:26 -06:00
Jaroslav Kysela
f95bf4e560 fix release version in comment 2020-06-29 13:11:52 +02:00
Jaroslav Kysela
31c63faaa9 update to 1.2.3.2 2020-06-29 13:04:38 +02:00
Jaroslav Kysela
4ec77094a4 update to 1.2.3.1 2020-06-18 19:44:41 +02:00
Jaroslav Kysela
5bc5d06743 update the alsa-lib tar ball (5th) 2020-06-08 15:10:36 +02:00
Jaroslav Kysela
76316fa323 increase release 2020-06-08 13:48:41 +02:00
Jaroslav Kysela
598d1d3cc1 update the alsa-lib tar ball (4th) 2020-06-08 13:46:36 +02:00
Jaroslav Kysela
92e47738e8 update the alsa-lib tar ball (3rd) 2020-06-08 13:20:00 +02:00
Jaroslav Kysela
90144bdd5e update the alsa-lib tar ball (2nd) 2020-06-08 12:12:43 +02:00
Jaroslav Kysela
a5b2c7694e update the alsa-lib tar ball 2020-06-08 10:14:48 +02:00
Jaroslav Kysela
b604e1f66f increase release 2020-06-07 22:55:29 +02:00
Jaroslav Kysela
f7063399dc do not move library files from /usr/lib to /lib 2020-06-07 22:54:17 +02:00
Jaroslav Kysela
3f1a7a5da0 rename alsa-lib-1.1.9-config.patch to alsa-lib-1.2.3-config.patch 2020-06-07 21:36:52 +02:00
Jaroslav Kysela
1f4c94a448 fix the release number in changelog 2020-06-07 19:53:59 +02:00
Jaroslav Kysela
66788d6a63 add changelog for 1.2.3 2020-06-07 19:43:52 +02:00
Jaroslav Kysela
6dbf2613ac update to 1.2.3 2020-06-07 19:41:58 +02:00
Jaroslav Kysela
35f5727aa8 ucm: remove README patch 2020-04-06 17:53:20 +02:00
Jaroslav Kysela
e7697e8bed update to latest UCM configs 2020-04-06 17:47:37 +02:00
Jaroslav Kysela
3b0dc213c4 UCM2 fixes (bug#1786723) 2020-04-06 17:25:48 +02:00
Jaroslav Kysela
efbf088724 add basic tests 2020-03-03 10:15:03 +01:00
Jaroslav Kysela
7c33e3c1a6 fix the version in comment 2020-02-19 12:24:40 +01:00
Jaroslav Kysela
8a04e40ec3 added missing alsa-ucm-conf.patch 2020-02-19 12:14:52 +01:00
Jaroslav Kysela
16fe60a5ce updated to 1.2.2 2020-02-19 12:08:29 +01:00
Jaroslav Kysela
6935b98070 bumb the package version 2020-02-09 20:58:39 +01:00
Jaroslav Kysela
1228343583 more UCM2 fixes from upstream 2020-02-09 20:19:22 +01:00
Fedora Release Engineering
d9eb8077ac - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 11:27:30 +00:00
Jaroslav Kysela
c40825430a UCM2 fixes for sof-hda-dsp 2019-12-09 13:42:45 +01:00
Jaroslav Kysela
04d13aff9a UCM2 fixes, enable alsa-git.patch 2019-12-03 21:16:22 +01:00
Jaroslav Kysela
212f5ac0a9 UCM2 fixes from upstream 2019-12-03 21:01:13 +01:00
Jaroslav Kysela
c4ac9c1e91 updated to 1.2.1.2 2019-11-29 16:45:07 +01:00
Jaroslav Kysela
eedc42cda2 updated to 1.2.1.1 2019-11-19 16:31:15 +01:00
Jaroslav Kysela
fdad002f5c replaced source files 2019-11-14 18:18:51 +01:00
Jaroslav Kysela
2c612e6db8 fix the license for alsa-ucm and alsa-topology packages (BSD) 2019-11-14 13:15:20 +01:00
Jaroslav Kysela
47b7323709 improve .gitignore for ucm/topology tar balls 2019-11-13 17:27:51 +01:00
Jaroslav Kysela
df1ce312c5 updated to 1.2.1 2019-11-13 16:25:10 +01:00
Fedora Release Engineering
5a37d4cfd7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-24 17:47:39 +00:00
Jaroslav Kysela
8c75636abb updated to 1.1.9 2019-05-10 09:38:58 +02:00
9 changed files with 247 additions and 821 deletions

4
.gitignore vendored
View file

@ -1,3 +1,3 @@
/alsa-lib-1.*.tar.bz2
/alsa-topology-conf-1.2.1.tar.bz2
/alsa-ucm-conf-1.2.1.tar.bz2
/alsa-topology-conf-1.*.tar.bz2
/alsa-ucm-conf-1.*.tar.bz2

View file

@ -1,773 +0,0 @@
From c79f09e1f5e8b559b58dacdb00708d995b2e3aa5 Mon Sep 17 00:00:00 2001
From: paulhsia <paulhsia@chromium.org>
Date: Sat, 30 Nov 2019 03:35:30 +0800
Subject: [PATCH 01/10] ucm: Use strncmp to avoid access-out-of-boundary
If the length of the identifier is less than the length of the prefix,
access-out-of-boundary will occur in memcmp().
Signed-off-by: paulhsia <paulhsia@chromium.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/ucm/main.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/ucm/main.c b/src/ucm/main.c
index b0b6ffb3..252e50d9 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -61,11 +61,13 @@ static int check_identifier(const char *identifier, const char *prefix)
{
int len;
- if (strcmp(identifier, prefix) == 0)
- return 1;
len = strlen(prefix);
- if (memcmp(identifier, prefix, len) == 0 && identifier[len] == '/')
+ if (strncmp(identifier, prefix, len) != 0)
+ return 0;
+
+ if (identifier[len] == 0 || identifier[len] == '/')
return 1;
+
return 0;
}
--
2.20.1
From 9baf64da2f26844434ecea4825052937a3abe06c Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Fri, 29 Nov 2019 22:28:26 +0100
Subject: [PATCH 02/10] ucm: return always at least NULL if no list is
available in snd_use_case_get_list()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/ucm/main.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/ucm/main.c b/src/ucm/main.c
index 252e50d9..b80db65f 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -1160,8 +1160,10 @@ static int get_supcon_device_list(snd_use_case_mgr_t *uc_mgr,
modifier = find_modifier(uc_mgr, verb, name, 0);
if (modifier) {
- if (modifier->dev_list.type != type)
+ if (modifier->dev_list.type != type) {
+ *list = NULL;
return 0;
+ }
return get_list(&modifier->dev_list.list, list,
struct dev_list_node, list,
name);
@@ -1169,8 +1171,10 @@ static int get_supcon_device_list(snd_use_case_mgr_t *uc_mgr,
device = find_device(uc_mgr, verb, name, 0);
if (device) {
- if (device->dev_list.type != type)
+ if (device->dev_list.type != type) {
+ *list = NULL;
return 0;
+ }
return get_list(&device->dev_list.list, list,
struct dev_list_node, list,
name);
--
2.20.1
From ebdd2b6cdb8119cf75f0dd0a3b283d271b3a547e Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Sat, 30 Nov 2019 20:31:55 +0100
Subject: [PATCH 03/10] ucm: add _identifiers list
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
include/use-case.h | 1 +
src/ucm/main.c | 268 ++++++++++++++++++++++++++++++++++-----------
2 files changed, 208 insertions(+), 61 deletions(-)
diff --git a/include/use-case.h b/include/use-case.h
index 8e7e838c..85c58ac0 100644
--- a/include/use-case.h
+++ b/include/use-case.h
@@ -206,6 +206,7 @@ int snd_use_case_free_list(const char *list[], int items);
* - _enadevs - get list of enabled devices
* - _enamods - get list of enabled modifiers
*
+ * - _identifiers/{modifier}|{device}[/{verb}] - list of value identifiers
* - _supporteddevs/{modifier}|{device}[/{verb}] - list of supported devices
* - _conflictingdevs/{modifier}|{device}[/{verb}] - list of conflicting devices
*
diff --git a/src/ucm/main.c b/src/ucm/main.c
index b80db65f..d2078a23 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -1072,7 +1072,6 @@ int snd_use_case_mgr_reset(snd_use_case_mgr_t *uc_mgr)
/**
* \brief Get list of verbs in pair verbname+comment
* \param list Returned list
- * \param verbname For verb (NULL = current)
* \return Number of list entries if success, otherwise a negative error code
*/
static int get_verb_list(snd_use_case_mgr_t *uc_mgr, const char **list[])
@@ -1181,7 +1180,6 @@ static int get_supcon_device_list(snd_use_case_mgr_t *uc_mgr,
}
return -ENOENT;
-
}
/**
@@ -1210,41 +1208,201 @@ static int get_conflicting_device_list(snd_use_case_mgr_t *uc_mgr,
#ifndef DOC_HIDDEN
struct myvalue {
- struct list_head list;
- char *value;
+ struct list_head list;
+ const char *text;
};
#endif
+/**
+ * \brief Convert myvalue list string list
+ * \param list myvalue list
+ * \param res string list
+ * \retval Number of list entries if success, otherwise a negativer error code
+ */
+static int myvalue_to_str_list(struct list_head *list, char ***res)
+{
+ struct list_head *pos;
+ struct myvalue *value;
+ char **p;
+ int cnt;
+
+ cnt = alloc_str_list(list, 1, res);
+ if (cnt < 0)
+ return cnt;
+ p = *res;
+ list_for_each(pos, list) {
+ value = list_entry(pos, struct myvalue, list);
+ *p = strdup(value->text);
+ if (*p == NULL) {
+ snd_use_case_free_list((const char **)p, cnt);
+ return -ENOMEM;
+ }
+ p++;
+ }
+ return cnt;
+}
+
+/**
+ * \brief Free myvalue list
+ * \param list myvalue list
+ */
+static void myvalue_list_free(struct list_head *list)
+{
+ struct list_head *pos, *npos;
+ struct myvalue *value;
+
+ list_for_each_safe(pos, npos, list) {
+ value = list_entry(pos, struct myvalue, list);
+ list_del(&value->list);
+ free(value);
+ }
+}
+
+/**
+ * \brief Merge one value to the myvalue list
+ * \param list The list with values
+ * \param value The value to be merged (without duplicates)
+ * \return 1 if dup, 0 if success, otherwise a negative error code
+ */
+static int merge_value(struct list_head *list, const char *text)
+{
+ struct list_head *pos;
+ struct myvalue *value;
+
+ list_for_each(pos, list) {
+ value = list_entry(pos, struct myvalue, list);
+ if (strcmp(value->text, text) == 0)
+ return 1;
+ }
+ value = malloc(sizeof(*value));
+ if (value == NULL)
+ return -ENOMEM;
+ value->text = text;
+ list_add_tail(&value->list, list);
+ return 0;
+}
+
+/**
+ * \brief Find all values for given identifier
+ * \param list Returned list
+ * \param source Source list with ucm_value structures
+ * \return Zero if success, otherwise a negative error code
+ */
+static int add_identifiers(struct list_head *list,
+ struct list_head *source)
+{
+ struct ucm_value *v;
+ struct list_head *pos;
+ int err;
+
+ list_for_each(pos, source) {
+ v = list_entry(pos, struct ucm_value, list);
+ err = merge_value(list, v->name);
+ if (err < 0)
+ return err;
+ }
+ return 0;
+}
+
+/**
+ * \brief Find all values for given identifier
+ * \param list Returned list
+ * \param identifier Identifier
+ * \param source Source list with ucm_value structures
+ */
static int add_values(struct list_head *list,
const char *identifier,
struct list_head *source)
{
- struct ucm_value *v;
- struct myvalue *val;
- struct list_head *pos, *pos1;
- int match;
+ struct ucm_value *v;
+ struct list_head *pos;
+ int err;
- list_for_each(pos, source) {
- v = list_entry(pos, struct ucm_value, list);
- if (check_identifier(identifier, v->name)) {
- match = 0;
- list_for_each(pos1, list) {
- val = list_entry(pos1, struct myvalue, list);
- if (strcmp(val->value, v->data) == 0) {
- match = 1;
- break;
- }
- }
- if (!match) {
- val = malloc(sizeof(struct myvalue));
- if (val == NULL)
- return -ENOMEM;
- val->value = v->data;
- list_add_tail(&val->list, list);
- }
- }
- }
- return 0;
+ list_for_each(pos, source) {
+ v = list_entry(pos, struct ucm_value, list);
+ if (check_identifier(identifier, v->name)) {
+ err = merge_value(list, v->data);
+ if (err < 0)
+ return err;
+ }
+ }
+ return 0;
+}
+
+/**
+ * \brief compare two identifiers
+ */
+static int identifier_cmp(const void *_a, const void *_b)
+{
+ const char * const *a = _a;
+ const char * const *b = _b;
+ return strcmp(*a, *b);
+}
+
+/**
+ * \brief Get list of available identifiers
+ * \param list Returned list
+ * \param name Name of verb or modifier to query
+ * \return Number of list entries if success, otherwise a negative error code
+ */
+static int get_identifiers_list(snd_use_case_mgr_t *uc_mgr,
+ const char **list[], char *name)
+{
+ struct use_case_verb *verb;
+ struct use_case_modifier *modifier;
+ struct use_case_device *device;
+ struct list_head mylist;
+ struct list_head *value_list;
+ char *str, **res;
+ int err;
+
+ if (!name)
+ return -ENOENT;
+
+ str = strchr(name, '/');
+ if (str) {
+ *str = '\0';
+ verb = find_verb(uc_mgr, str + 1);
+ }
+ else {
+ verb = uc_mgr->active_verb;
+ }
+ if (!verb)
+ return -ENOENT;
+
+ value_list = NULL;
+ modifier = find_modifier(uc_mgr, verb, name, 0);
+ if (modifier) {
+ value_list = &modifier->value_list;
+ } else {
+ device = find_device(uc_mgr, verb, name, 0);
+ if (device)
+ value_list = &device->value_list;
+ }
+ if (value_list == NULL)
+ return -ENOENT;
+
+ INIT_LIST_HEAD(&mylist);
+ err = add_identifiers(&mylist, &uc_mgr->value_list);
+ if (err < 0)
+ goto __fail;
+ err = add_identifiers(&mylist, &verb->value_list);
+ if (err < 0)
+ goto __fail;
+ err = add_identifiers(&mylist, value_list);
+ if (err < 0)
+ goto __fail;
+ err = myvalue_to_str_list(&mylist, &res);
+ if (err > 0)
+ *list = (const char **)res;
+ else if (err == 0)
+ *list = NULL;
+__fail:
+ myvalue_list_free(&mylist);
+ if (err <= 0)
+ return err;
+ qsort(*list, err, sizeof(char *), identifier_cmp);
+ return err;
}
/**
@@ -1258,8 +1416,7 @@ static int get_value_list(snd_use_case_mgr_t *uc_mgr,
const char **list[],
char *verbname)
{
- struct list_head mylist, *pos, *npos;
- struct myvalue *val;
+ struct list_head mylist, *pos;
struct use_case_verb *verb;
struct use_case_device *dev;
struct use_case_modifier *mod;
@@ -1292,26 +1449,13 @@ static int get_value_list(snd_use_case_mgr_t *uc_mgr,
if (err < 0)
goto __fail;
}
- err = alloc_str_list(&mylist, 1, &res);
- if (err >= 0) {
+ err = myvalue_to_str_list(&mylist, &res);
+ if (err > 0)
*list = (const char **)res;
- list_for_each(pos, &mylist) {
- val = list_entry(pos, struct myvalue, list);
- *res = strdup(val->value);
- if (*res == NULL) {
- snd_use_case_free_list((const char **)res, err);
- err = -ENOMEM;
- goto __fail;
- }
- res++;
- }
- }
+ else if (err == 0)
+ *list = NULL;
__fail:
- list_for_each_safe(pos, npos, &mylist) {
- val = list_entry(pos, struct myvalue, list);
- list_del(&val->list);
- free(val);
- }
+ myvalue_list_free(&mylist);
return err;
}
@@ -1381,21 +1525,23 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
} else {
str = NULL;
}
- if (check_identifier(identifier, "_devices"))
- err = get_device_list(uc_mgr, list, str);
+ if (check_identifier(identifier, "_devices"))
+ err = get_device_list(uc_mgr, list, str);
else if (check_identifier(identifier, "_modifiers"))
- err = get_modifier_list(uc_mgr, list, str);
- else if (check_identifier(identifier, "_supporteddevs"))
- err = get_supported_device_list(uc_mgr, list, str);
- else if (check_identifier(identifier, "_conflictingdevs"))
- err = get_conflicting_device_list(uc_mgr, list, str);
+ err = get_modifier_list(uc_mgr, list, str);
+ else if (check_identifier(identifier, "_identifiers"))
+ err = get_identifiers_list(uc_mgr, list, str);
+ else if (check_identifier(identifier, "_supporteddevs"))
+ err = get_supported_device_list(uc_mgr, list, str);
+ else if (check_identifier(identifier, "_conflictingdevs"))
+ err = get_conflicting_device_list(uc_mgr, list, str);
else if (identifier[0] == '_')
err = -ENOENT;
- else
- err = get_value_list(uc_mgr, identifier, list, str);
- if (str)
- free(str);
- }
+ else
+ err = get_value_list(uc_mgr, identifier, list, str);
+ if (str)
+ free(str);
+ }
__end:
pthread_mutex_unlock(&uc_mgr->mutex);
return err;
--
2.20.1
From 5ee5ef31b5ff3fb7c904054cb9cac7478a727f7c Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Sun, 1 Dec 2019 14:26:40 +0100
Subject: [PATCH 04/10] namehint: correct the @args check
BugLink: https://github.com/alsa-project/alsa-plugins/issues/3
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/control/namehint.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/control/namehint.c b/src/control/namehint.c
index 808df6b5..4927ef97 100644
--- a/src/control/namehint.c
+++ b/src/control/namehint.c
@@ -348,6 +348,12 @@ static int try_config(snd_config_t *config,
goto __cleanup;
if (snd_config_search(res, "@args", &cfg) >= 0) {
snd_config_for_each(i, next, cfg) {
+ /* skip the argument list */
+ snd_config_get_id(snd_config_iterator_entry(i), &str);
+ while (*str && *str >= '0' && *str <= '9') str++;
+ if (*str == '\0')
+ continue;
+ /* the argument definition must have the default */
if (snd_config_search(snd_config_iterator_entry(i),
"default", NULL) < 0) {
err = -EINVAL;
--
2.20.1
From 6055f8a584296abfc0cec0439ceb708f0eddcc9d Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Sun, 1 Dec 2019 14:30:54 +0100
Subject: [PATCH 05/10] namehint: improve the previous patch (check the
returned value)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/control/namehint.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/control/namehint.c b/src/control/namehint.c
index 4927ef97..60c48ae3 100644
--- a/src/control/namehint.c
+++ b/src/control/namehint.c
@@ -349,7 +349,8 @@ static int try_config(snd_config_t *config,
if (snd_config_search(res, "@args", &cfg) >= 0) {
snd_config_for_each(i, next, cfg) {
/* skip the argument list */
- snd_config_get_id(snd_config_iterator_entry(i), &str);
+ if (snd_config_get_id(snd_config_iterator_entry(i), &str) < 0)
+ continue;
while (*str && *str >= '0' && *str <= '9') str++;
if (*str == '\0')
continue;
--
2.20.1
From 4dddcf733d56a13f4d042fefa1fb6230c09f1f65 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Mon, 2 Dec 2019 11:56:30 +0100
Subject: [PATCH 06/10] ucm: docs - allow spaces in device names for JackHWMute
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
include/use-case.h | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/include/use-case.h b/include/use-case.h
index 85c58ac0..e1f58027 100644
--- a/include/use-case.h
+++ b/include/use-case.h
@@ -326,7 +326,7 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
* - Valid values: "soft" (software attenuation)
* - EDIDFile
* - Path to EDID file for HDMI devices
- * - JackControl, JackDev, JackHWMute
+ * - JackControl, JackDev
* - Jack information for a device. The jack status can be reported via
* a kcontrol and/or via an input device. **JackControl** is the
* kcontrol name of the jack, and **JackDev** is the input device id of
@@ -334,17 +334,18 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
* JackDev value should be "foo"). UCM configuration files should
* contain both JackControl and JackDev when possible, because
* applications are likely to support only one or the other.
- *
- * If **JackHWMute** is set, it indicates that when the jack is plugged
- * in, the hardware automatically mutes some other device(s). The
- * JackHWMute value is a space-separated list of device names (this
- * isn't compatible with device names with spaces in them, so don't use
- * such device names!). Note that JackHWMute should be used only when
- * the hardware enforces the automatic muting. If the hardware doesn't
- * enforce any muting, it may still be tempting to set JackHWMute to
- * trick upper software layers to e.g. automatically mute speakers when
- * headphones are plugged in, but that's application policy
- * configuration that doesn't belong to UCM configuration files.
+ * - JackHWMute
+ * If this value is set, it indicates that when the jack is plugged
+ * in, the hardware automatically mutes some other device(s). The
+ * value is a space-separated list of device names. If the device
+ * name contains space, it must be enclosed to ' or ", e.g.:
+ * JackHWMute "'Dock Headphone' Headphone"
+ * Note that JackHWMute should be used only when the hardware enforces
+ * the automatic muting. If the hardware doesn't enforce any muting, it
+ * may still be tempting to set JackHWMute to trick upper software layers
+ * to e.g. automatically mute speakers when headphones are plugged in,
+ * but that's application policy configuration that doesn't belong
+ * to UCM configuration files.
* - MinBufferLevel
* - This is used on platform where reported buffer level is not accurate.
* E.g. "512", which holds 512 samples in device buffer. Note: this will
--
2.20.1
From 2a286ca9a8415571181ce58027686ec332a834e9 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Mon, 2 Dec 2019 11:57:18 +0100
Subject: [PATCH 07/10] use-case: docs - add PlaybackMixerCopy and
CaptureMixerCopy
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
include/use-case.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/use-case.h b/include/use-case.h
index e1f58027..71fcc949 100644
--- a/include/use-case.h
+++ b/include/use-case.h
@@ -309,8 +309,14 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
* - PlaybackMixerElem
* - mixer element playback identifier
* - can be parsed using snd_use_case_parse_selem_id()
+ * - PlaybackMixerCopy
+ * - additional mixer element playback identifier
+ * - can be parsed using snd_use_case_parse_selem_id()
+ * - those elements should copy the volume and switch settings
+ * - element identifiers are separated using the | character
* - PlaybackMasterElem
* - mixer element playback identifier for the master control
+ * - can be parsed using snd_use_case_parse_selem_id()
* - PlaybackMasterType
* - type of the master volume control
* - Valid values: "soft" (software attenuation)
@@ -319,8 +325,14 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
* - CaptureMixerElem
* - mixer element capture identifier
* - can be parsed using snd_use_case_parse_selem_id()
+ * - CaptureMixerCopy
+ * - additional mixer element capture identifier
+ * - can be parsed using snd_use_case_parse_selem_id()
+ * - those elements should copy the volume and switch settings
+ * - element identifiers are separated using the | character
* - CaptureMasterElem
* - mixer element playback identifier for the master control
+ * - can be parsed using snd_use_case_parse_selem_id()
* - CaptureMasterType
* - type of the master volume control
* - Valid values: "soft" (software attenuation)
--
2.20.1
From a0fc4447bb7c7f9a850a0a85f3a5a32c1509caf4 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Tue, 3 Dec 2019 15:01:04 +0100
Subject: [PATCH 08/10] ucm: docs - add JackCTL, rearrange JackControl and
JackDev
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
include/use-case.h | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/include/use-case.h b/include/use-case.h
index 71fcc949..25998cb9 100644
--- a/include/use-case.h
+++ b/include/use-case.h
@@ -338,14 +338,20 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
* - Valid values: "soft" (software attenuation)
* - EDIDFile
* - Path to EDID file for HDMI devices
- * - JackControl, JackDev
- * - Jack information for a device. The jack status can be reported via
- * a kcontrol and/or via an input device. **JackControl** is the
- * kcontrol name of the jack, and **JackDev** is the input device id of
- * the jack (if the full input device path is /dev/input/by-id/foo, the
- * JackDev value should be "foo"). UCM configuration files should
- * contain both JackControl and JackDev when possible, because
- * applications are likely to support only one or the other.
+ * - JackCTL
+ * - jack control device name
+ * - JackControl
+ * - jack control identificator
+ * - can be parsed using snd_use_case_parse_ctl_elem_id()
+ * - UCM configuration files should contain both JackControl and JackDev
+ * when possible, because applications are likely to support only one
+ * or the other
+ * - JackDev
+ * - the input device id of the jack (if the full input device path is
+ * /dev/input/by-id/foo, the JackDev value should be "foo")
+ * - UCM configuration files should contain both JackControl and JackDev
+ * when possible, because applications are likely to support only one
+ * or the other
* - JackHWMute
* If this value is set, it indicates that when the jack is plugged
* in, the hardware automatically mutes some other device(s). The
--
2.20.1
From e59034a0bec257cc7422a1e9436d936be8696a6f Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Tue, 3 Dec 2019 18:27:39 +0100
Subject: [PATCH 09/10] ucm: Do not fail to parse configs on cards with an
empty CardComponents lists
Since the UCM profiles for all Bay- and Cherry-Trail SST cards have been
moved over to UCM2, parsing them fails with:
ALSA lib ucm_subs.c:220:(uc_mgr_get_substituted_value) variable '${CardComponents}' is not defined in this context!
This completely breaks audio support on all Bay- and Cherry-Trail devices.
This is caused by these non-SOF ASoC using cards having an empty
CardComponents list. Which in itself is fine, but is rejected by
the ucm_subs.c code. This commit changes the ucm_subs code to accept
an empty string as a valid value for CardComponents restoring audio
functionality on these boards.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/ucm/ucm_subs.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/ucm/ucm_subs.c b/src/ucm/ucm_subs.c
index 00afa9e3..90e395f0 100644
--- a/src/ucm/ucm_subs.c
+++ b/src/ucm/ucm_subs.c
@@ -25,6 +25,7 @@
*/
#include "ucm_local.h"
+#include <stdbool.h>
#include <sys/stat.h>
#include <limits.h>
@@ -145,10 +146,11 @@ static char *rval_sysfs(snd_use_case_mgr_t *uc_mgr ATTRIBUTE_UNUSED, const char
return strdup(path);
}
-#define MATCH_VARIABLE(name, id, fcn) \
+#define MATCH_VARIABLE(name, id, fcn, empty_ok) \
if (strncmp((name), (id), sizeof(id) - 1) == 0) { \
rval = fcn(uc_mgr); \
idsize = sizeof(id) - 1; \
+ allow_empty = (empty_ok); \
goto __rval; \
}
@@ -189,12 +191,14 @@ int uc_mgr_get_substituted_value(snd_use_case_mgr_t *uc_mgr,
while (*value) {
if (*value == '$' && *(value+1) == '{') {
- MATCH_VARIABLE(value, "${ConfName}", rval_conf_name);
- MATCH_VARIABLE(value, "${CardId}", rval_card_id);
- MATCH_VARIABLE(value, "${CardDriver}", rval_card_driver);
- MATCH_VARIABLE(value, "${CardName}", rval_card_name);
- MATCH_VARIABLE(value, "${CardLongName}", rval_card_longname);
- MATCH_VARIABLE(value, "${CardComponents}", rval_card_components);
+ bool allow_empty = false;
+
+ MATCH_VARIABLE(value, "${ConfName}", rval_conf_name, false);
+ MATCH_VARIABLE(value, "${CardId}", rval_card_id, false);
+ MATCH_VARIABLE(value, "${CardDriver}", rval_card_driver, false);
+ MATCH_VARIABLE(value, "${CardName}", rval_card_name, false);
+ MATCH_VARIABLE(value, "${CardLongName}", rval_card_longname, false);
+ MATCH_VARIABLE(value, "${CardComponents}", rval_card_components, true);
MATCH_VARIABLE2(value, "${env:", rval_env);
MATCH_VARIABLE2(value, "${sys:", rval_sysfs);
err = -EINVAL;
@@ -208,7 +212,7 @@ int uc_mgr_get_substituted_value(snd_use_case_mgr_t *uc_mgr,
}
goto __error;
__rval:
- if (rval == NULL || rval[0] == '\0') {
+ if (rval == NULL || (!allow_empty && rval[0] == '\0')) {
free(rval);
strncpy(r, value, idsize);
r[idsize] = '\0';
--
2.20.1
From 8e2c70add782f997f7c269ed3f722888e56ff024 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Tue, 3 Dec 2019 18:56:40 +0100
Subject: [PATCH 10/10] src/ucm/main.c: fix build without mixer
Commit 4ce38a5ff466d18039b2606938f866ea3a6c9f3c breaks the build without
mixer on:
CCLD libasound.la
/home/buildroot/autobuild/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/8.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: ucm/.libs/libucm.a(main.o): in function `snd_use_case_set':
main.c:(.text+0x185c): undefined reference to `snd_mixer_selem_id_parse'
Fixes: http://autobuild.buildroot.org/results/4d91c9f82a2a61c50c457a851073b85cc09ea345
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/ucm/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/ucm/main.c b/src/ucm/main.c
index d2078a23..61922f10 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -2115,8 +2115,10 @@ int snd_use_case_parse_selem_id(snd_mixer_selem_id_t *dst,
const char *ucm_id,
const char *value)
{
+#ifdef BUILD_MIXER
if (strcmp(ucm_id, "PlaybackMixerId") == 0 ||
strcmp(ucm_id, "CaptureMixerId") == 0)
return snd_mixer_selem_id_parse(dst, value);
+#endif
return -EINVAL;
}
--
2.20.1

View file

@ -1,11 +0,0 @@
--- alsa-lib-1.0.14/aserver/aserver.c 2007-05-31 10:05:13.000000000 +0200
+++ alsa-lib-1.0.14.lennart/aserver/aserver.c 2007-08-15 15:53:32.000000000 +0200
@@ -35,6 +35,8 @@
#include "aserver.h"
+#undef open
+
char *command;
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)

View file

@ -0,0 +1,10 @@
--- alsa-lib-1.2.10/aserver/aserver.c~ 2023-09-01 17:35:48.000000000 +0200
+++ alsa-lib-1.2.10/aserver/aserver.c 2023-09-01 18:13:11.339601685 +0200
@@ -35,6 +35,7 @@
#include <limits.h>
#include <signal.h>
+#undef open
char *command;

View file

@ -1,19 +1,19 @@
diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf
index 09980586..c4525f0b 100644
index 18427ec6..1915af4e 100644
--- a/src/conf/alsa.conf
+++ b/src/conf/alsa.conf
@@ -67,8 +67,7 @@ defaults.pcm.nonblock 1
@@ -80,8 +80,7 @@ defaults.pcm.nonblock 1
defaults.pcm.compat 0
defaults.pcm.minperiodtime 5000 # in us
defaults.pcm.ipc_key 5678293
-defaults.pcm.ipc_gid audio
-defaults.pcm.ipc_perm 0660
+defaults.pcm.ipc_perm 0600
defaults.pcm.tstamp_type default
defaults.pcm.dmix.max_periods 0
defaults.pcm.dmix.channels 2
defaults.pcm.dmix.rate 48000
diff --git a/src/conf/pcm/dmix.conf b/src/conf/pcm/dmix.conf
index 7fa5c8b2..97936a82 100644
index 50e573da..70523f29 100644
--- a/src/conf/pcm/dmix.conf
+++ b/src/conf/pcm/dmix.conf
@@ -48,10 +48,6 @@ pcm.!dmix {
@ -28,7 +28,7 @@ index 7fa5c8b2..97936a82 100644
@func refer
name defaults.pcm.ipc_perm
diff --git a/src/conf/pcm/dsnoop.conf b/src/conf/pcm/dsnoop.conf
index abbd44f7..528fb6ad 100644
index f4336e5f..60b9f212 100644
--- a/src/conf/pcm/dsnoop.conf
+++ b/src/conf/pcm/dsnoop.conf
@@ -41,10 +41,6 @@ pcm.!dsnoop {

View file

@ -1,15 +1,19 @@
#define prever rc3
#define prever_dot .rc3
#define postver a
%define version_alsa_lib 1.2.1.2
%define version_alsa_ucm 1.2.1.2
%define version_alsa_tplg 1.2.1
%define version_alsa_lib 1.2.15.3
%define version_alsa_ucm 1.2.15.3
%define version_alsa_tplg 1.2.5
%global lib_patch 0
%global ucm_patch 0
Summary: The Advanced Linux Sound Architecture (ALSA) library
Name: alsa-lib
Version: %{version_alsa_lib}
Release: 3%{?prever_dot}%{?dist}
License: LGPLv2+
Release: 2%{?prever_dot}%{?dist}
License: LGPL-2.1-or-later
URL: http://www.alsa-project.org/
Source: ftp://ftp.alsa-project.org/pub/lib/%{name}-%{version}%{?prever}%{?postver}.tar.bz2
@ -18,12 +22,18 @@ Source2: ftp://ftp.alsa-project.org/pub/lib/alsa-topology-conf-%{version_alsa_t
Source10: asound.conf
Source11: modprobe-dist-alsa.conf
Source12: modprobe-dist-oss.conf
%if %{ucm_patch}
Source40: alsa-ucm-conf.patch
%endif
%if %{lib_patch}
Patch0: alsa-git.patch
Patch1: alsa-lib-1.1.9-config.patch
Patch2: alsa-lib-1.0.14-glibc-open.patch
%endif
Patch1: alsa-lib-1.2.3.1-config.patch
Patch2: alsa-lib-1.2.10-glibc-open.patch
BuildRequires: doxygen
BuildRequires: autoconf automake libtool
BuildRequires: make
%description
The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
@ -48,8 +58,8 @@ against the ALSA libraries and interfaces.
%package -n alsa-ucm
Summary: ALSA Use Case Manager configuration
BuildArch: noarch
License: BSD
Requires: %{name} >= %{version_alsa_ucm}
License: BSD-3-Clause
Requires: %{name} >= %{version_alsa_lib}
%description -n alsa-ucm
The Advanced Linux Sound Architecture (ALSA) Use Case Manager configuration
@ -58,8 +68,8 @@ contains alsa-lib configuration of Audio input/output names and routing
%package -n alsa-topology
Summary: ALSA Topology configuration
BuildArch: noarch
License: BSD
Requires: %{name} >= %{version_alsa_tplg}
License: BSD-3-Clause
Requires: %{name} >= %{version_alsa_lib}
%description -n alsa-topology
The Advanced Linux Sound Architecture (ALSA) topology configuration
@ -67,11 +77,23 @@ contains alsa-lib configuration of SoC topology
%prep
%setup -q -n %{name}-%{version}%{?prever}%{?postver}
%patch0 -p1 -b .alsa-git
%patch1 -p1 -b .config
%patch2 -p1 -b .glibc-open
%if %{lib_patch}
%patch -P0 -p1 -b .alsa-git
%endif
%patch -P1 -p1 -b .config
%patch -P2 -p1 -b .glibc-open
%build
# This package uses top level ASM constructs which are incompatible with LTO.
# Top level ASMs are often used to implement symbol versioning. gcc-10
# introduces a new mechanism for symbol versioning which works with LTO.
# Converting packages to use that mechanism instead of toplevel ASMs is
# recommended.
# Note: The v1.2.4 contains changes wich are compatible with gcc-10 LTO
# although using the old ASM constructs.
# Enable custom LTO flags
%define _lto_cflags -flto -ffat-lto-objects -flto-partition=none
autoreconf -vif
%configure --disable-aload --with-plugindir=%{_libdir}/alsa-lib --disable-alisp
@ -87,13 +109,6 @@ make doc
make DESTDIR=%{buildroot} install
# We need the library to be available even before /usr might be mounted
mkdir -p %{buildroot}/%{_lib}
mv %{buildroot}%{_libdir}/libasound.so.* %{buildroot}/%{_lib}
ln -snf ../../%{_lib}/libasound.so.2 %{buildroot}%{_libdir}/libasound.so
mv %{buildroot}%{_libdir}/libatopology.so.* %{buildroot}/%{_lib}
ln -snf ../../%{_lib}/libatopology.so.2 %{buildroot}%{_libdir}/libatopology.so
# Install global configuration files
mkdir -p -m 755 %{buildroot}/etc
install -p -m 644 %{SOURCE10} %{buildroot}/etc
@ -109,13 +124,16 @@ mkdir -p %{buildroot}/%{_datadir}/alsa/ucm
mkdir -p %{buildroot}/%{_datadir}/alsa/ucm2
# Unpack UCMs
tar xvjf %{SOURCE1} -C %{buildroot}/%{_datadir}/alsa ucm ucm2
tar xvjf %{SOURCE1} -C %{buildroot}/%{_datadir}/alsa --strip-components=1 "*/ucm" "*/ucm2"
%if %{ucm_patch}
patch -d %{buildroot}/%{_datadir}/alsa -p1 < %{SOURCE40}
%endif
# Create topology directory
mkdir -p %{buildroot}/%{_datadir}/alsa/topology
# Unpack topologies
tar xvjf %{SOURCE2} -C %{buildroot}/%{_datadir}/alsa topology
tar xvjf %{SOURCE2} -C %{buildroot}/%{_datadir}/alsa --strip-components=1 "*/topology"
# Remove libtool archives.
find %{buildroot} -name '*.la' -delete
@ -130,8 +148,8 @@ rm %{buildroot}/%{_includedir}/asoundlib.h
%license COPYING
%doc doc/asoundrc.txt modprobe-dist-oss.conf
%config %{_sysconfdir}/asound.conf
/%{_lib}/libasound.so.*
/%{_lib}/libatopology.so.*
/%{_libdir}/libasound.so.*
/%{_libdir}/libatopology.so.*
%{_bindir}/aserver
#{_libdir}/alsa-lib/
%{_datadir}/alsa/
@ -160,6 +178,166 @@ rm %{buildroot}/%{_includedir}/asoundlib.h
%{_datadir}/alsa/topology
%changelog
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.15.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Tue Jan 13 2026 Jaroslav Kysela <perex@perex.cz> - 1.2.15.3-1
- update to 1.2.15.3
* Thu Jan 8 2026 Jaroslav Kysela <perex@perex.cz> - 1.2.15.2-1
- update to 1.2.15.2
* Fri Dec 19 2025 Jaroslav Kysela <perex@perex.cz> - 1.2.15.1-1
- update to 1.2.15.1
* Wed Dec 10 2025 Jaroslav Kysela <perex@perex.cz> - 1.2.15-4
- update to 1.2.15
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.14-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jun 24 2025 Jaroslav Kysela <perex@perex.cz> - 1.2.14-3
- update to latest alsa-ucm-conf files
* Mon Apr 14 2025 Jaroslav Kysela <perex@perex.cz> - 1.2.14-2
- update to 1.2.14
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.13-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Fri Nov 15 2024 Jaroslav Kysela <perex@perex.cz> - 1.2.13-3
- update to 1.2.13
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Mon Jun 10 2024 Jaroslav Kysela <perex@perex.cz> - 1.2.12-1
- update to 1.2.12
* Mon Jan 29 2024 Jaroslav Kysela <perex@perex.cz> - 1.2.11-2
- update to 1.2.11
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.10-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.10-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Sep 4 2023 Jaroslav Kysela <perex@perex.cz> - 1.2.10-3
- fix control.h header file (ump)
- fix SplitPCM (alsa-ucm)
* Fri Sep 1 2023 Jaroslav Kysela <perex@perex.cz> - 1.2.10-1
- update to 1.2.10
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 6 2023 Jaroslav Kysela <perex@perex.cz> - 1.2.9-3
- SPDX licences
* Tue May 16 2023 Jaroslav Kysela <perex@perex.cz> - 1.2.9-2
- update ucm (nhlt-dmic-info)
* Thu May 4 2023 Jaroslav Kysela <perex@perex.cz> - 1.2.9-1
- update to 1.2.9
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Dec 7 2022 Jaroslav Kysela <perex@perex.cz> - 1.2.8-2
- update lib code to latest git
- update ucm configs to latest git
* Mon Oct 24 2022 Jaroslav Kysela <perex@perex.cz> - 1.2.8-1
- update to 1.2.8
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jul 8 2022 Jaroslav Kysela <perex@perex.cz> - 1.2.7.1-2
- update to 1.2.7.2
* Fri Jun 17 2022 Jaroslav Kysela <perex@perex.cz> - 1.2.7.1-1
- update to 1.2.7.1
* Tue May 31 2022 Jaroslav Kysela <perex@perex.cz> - 1.2.7-1
- update to 1.2.7
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Dec 17 2021 Jaroslav Kysela <perex@perex.cz> - 1.2.6.1-3
- updated alsa-ucm-conf to 1.2.6.3
* Fri Dec 10 2021 Jaroslav Kysela <perex@perex.cz> - 1.2.6.1-2
- updated alsa-lib to 1.2.6.1 and alsa-ucm-conf to 1.2.6.2
* Thu Dec 9 2021 Jaroslav Kysela <perex@perex.cz> - 1.2.6-3
- device open fixes from upstream
* Mon Dec 6 2021 Jaroslav Kysela <perex@perex.cz> - 1.2.6-1
- update to 1.2.6
* Sat Nov 13 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 1.2.5.1-4
- Add Rockchip ES8316 support
* Tue Aug 31 2021 Jaroslav Kysela <perex@perex.cz> - 1.2.5.1-3
- add UCM related fixes
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.5.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Jun 14 2021 Jaroslav Kysela <perex@perex.cz> - 1.2.5.1-1
- update to 1.2.5.1
* Wed Jun 2 2021 Jaroslav Kysela <perex@perex.cz> - 1.2.5-2
- add upstream fixes (conf + ucm)
* Fri May 28 2021 Jaroslav Kysela <perex@perex.cz> - 1.2.5-1
- update to 1.2.5
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Oct 19 2020 Jaroslav Kysela <perex@perex.cz> - 1.2.4-4
- update to 1.2.4
- enable LTO
* Fri Jul 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.3.2-5
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.3.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 1 2020 Jeff Law <law@redhat.com> - 1.2.3.2-3
- Disable LTO
* Mon Jun 29 2020 Jaroslav Kysela <perex@perex.cz> - 1.2.3.2-2
- update to 1.2.3.2
* Thu Jun 18 2020 Jaroslav Kysela <perex@perex.cz> - 1.2.3.1-1
- update to 1.2.3.1
* Sun Jun 7 2020 Jaroslav Kysela <perex@perex.cz> - 1.2.3-8
- update to 1.2.3
* Mon Apr 6 2020 Jaroslav Kysela <perex@perex.cz> - 1.2.2-2
- UCM2 fixes (RemoveDevice), bug#1786723
* Wed Feb 19 2020 Jaroslav Kysela <perex@perex.cz> - 1.2.2-1
- Updated to 1.2.2
* Sun Feb 9 2020 Jaroslav Kysela <perex@perex.cz> - 1.2.1.2-6
- More UCM2 related fixes
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Dec 9 2019 Jaroslav Kysela <perex@perex.cz> - 1.2.1.2-4
- Fixes for sof-hda-dsp UCM2 configuration
* Tue Dec 3 2019 Jaroslav Kysela <perex@perex.cz> - 1.2.1.2-3
- Fixed more UCM2 related issues
@ -172,6 +350,9 @@ rm %{buildroot}/%{_includedir}/asoundlib.h
* Wed Nov 13 2019 Jaroslav Kysela <perex@perex.cz> - 1.2.1-3
- Updated to 1.2.1
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 10 2019 Jaroslav Kysela <perex@perex.cz> - 1.1.9-1
- Updated to 1.1.9

View file

@ -1,5 +1,3 @@
SHA512 (alsa-lib-1.2.1.1.tar.bz2) = 8a0b6f1ecc58d60991b4509e791b1581eebae57cd754b0b4829e66b1cfee81d588b04f42a17f598f06310b9658d9f46fd748cca516cc48b6f2989389c22c42e9
SHA512 (alsa-ucm-conf-1.2.1.tar.bz2) = 277e335fff02973628454aca4c8e275e49965cfe1b4a0bc7a6c4833ea14537b39f8175dd0c974577aa98c95e4f7f0981078d70f8a5f083f7c15ab2445f851255
SHA512 (alsa-topology-conf-1.2.1.tar.bz2) = 3480e58f12aeca04b0c1821e074daeb369949acbcf7bc61b09895ee43de84cb716566518a56a4d681babbb3f13faace5a16fff079d8bdaefc7c27fc1382cd41a
SHA512 (alsa-ucm-conf-1.2.1.2.tar.bz2) = e498c4355a765eb6ecd03f03611c8904f757bf73619a3c8159c044f80a4c3ab5cbd343692c227e13c6da307fc2e35259b4726902d3ab8e03eff11aa1c74027d5
SHA512 (alsa-lib-1.2.1.2.tar.bz2) = e8286fd55f63ee0d95513279d0885c287533de89b7af6c338413dec5d38ba4f5a15da1a4a4ce36e052614e4b730e3778782dab9979d82958283be17b48604913
SHA512 (alsa-lib-1.2.15.3.tar.bz2) = 7fc0fa8a5ae02d3404d2c262c6a14fcbb8b08e25993eac86b9e89b8419ed4d293b422da77b3eb7a1930f26c316b638e5aa7bdba78b0ada9908b0362d132a0cc0
SHA512 (alsa-ucm-conf-1.2.15.3.tar.bz2) = 079aeb45bc3f98448f6e48a1267db5d3f46a51d7060eb8275d0a084574e23eec34f07108610538e898c397fa24941ccf1bb7722c6b4bb0fa9c48904addc03973
SHA512 (alsa-topology-conf-1.2.5.tar.bz2) = 2eb4d8baf2dcbf0b631dd11dbf15bffc51694d9cc6931619e51787f3ba58d1a091d266e6721a3b737c040ec74a28270b93f39fb97f30a3227cf340dd646e5d51

10
tests/run_tests.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
set -ex
# a quick PCM API test
str=$(aplay -L | grep -E "^null$")
if [ "$str" != "null" ]; then
echo "The 'null' pcm plugin was not found!"
exit 99
fi

11
tests/tests.yml Normal file
View file

@ -0,0 +1,11 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
required_packages:
- alsa-utils
tests:
- simple:
dir: .
run: ./run_tests.sh