diff --git a/alsa-git.patch b/alsa-git.patch index e69de29..4082c0c 100644 --- a/alsa-git.patch +++ b/alsa-git.patch @@ -0,0 +1,97 @@ +From f44c94f24c2422c5ee1c4c58253ec17412b248a9 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Tue, 7 Dec 2021 09:21:24 +0100 +Subject: [PATCH 1/2] conf: accept '_' character in the variable name + +Fixes: https://github.com/alsa-project/alsa-lib/issues/197 +Signed-off-by: Jaroslav Kysela +--- + src/confeval.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/confeval.c b/src/confeval.c +index a971bf38..be9ac874 100644 +--- a/src/confeval.c ++++ b/src/confeval.c +@@ -190,7 +190,7 @@ int _snd_eval_string(snd_config_t **dst, const char *s, + } else { + e = s + 1; + while (*e) { +- if (!isalnum(*e)) ++ if (!isalnum(*e) && *e != '_') + break; + e++; + } +-- +2.31.1 + + +From 4b22871ee5a3bbc8eef7039bfc8db5e65ff3895f Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Thu, 9 Dec 2021 10:15:29 +0100 +Subject: [PATCH 2/2] conf: fix the device parsing when arguments has no + defaults + +The commit bf528b90 sets the value to an empty string which causes +these errors: + + pcm_hw.c: Invalid type for device + pcm_hw.c: Invalid type for subdevice + +When device arguments (@args) have no default values set, +the field must be skipped to keep the compatibility. + +BugLink: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1246 +Fixes: https://github.com/alsa-project/alsa-lib/issues/199 +Fixes: bf528b90 ("conf: add possibility to evaluate simple integer math expressions") +Signed-off-by: Jaroslav Kysela +--- + src/conf.c | 8 ++++++-- + src/confeval.c | 5 +++++ + 2 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/src/conf.c b/src/conf.c +index 0f6d2ba8..d3597cbc 100644 +--- a/src/conf.c ++++ b/src/conf.c +@@ -4994,8 +4994,10 @@ int snd_config_copy(snd_config_t **dst, + static int _snd_config_expand_vars(snd_config_t **dst, const char *s, void *private_data) + { + snd_config_t *val, *vars = private_data; +- if (snd_config_search(vars, s, &val) < 0) +- return snd_config_make_string(dst, ""); ++ if (snd_config_search(vars, s, &val) < 0) { ++ *dst = NULL; ++ return 0; ++ } + return snd_config_copy(dst, val); + } + +@@ -5060,6 +5062,8 @@ static int _snd_config_expand(snd_config_t *src, + err = snd_config_evaluate_string(dst, s, fcn, vars); + if (err < 0) + return err; ++ if (*dst == NULL) ++ return 0; + err = snd_config_set_id(*dst, id); + if (err < 0) { + snd_config_delete(*dst); +diff --git a/src/confeval.c b/src/confeval.c +index be9ac874..4a6f8c2e 100644 +--- a/src/confeval.c ++++ b/src/confeval.c +@@ -203,6 +203,11 @@ int _snd_eval_string(snd_config_t **dst, const char *s, + free(m); + if (err < 0) + return err; ++ if (tmp == NULL) { ++ err = snd_config_imake_integer(&tmp, NULL, 0); ++ if (err < 0) ++ return err; ++ } + s = e; + } + err = _to_integer(op == LEFT ? &left : &right, tmp); +-- +2.31.1 + diff --git a/alsa-lib.spec b/alsa-lib.spec index e5448f5..28c4a33 100644 --- a/alsa-lib.spec +++ b/alsa-lib.spec @@ -9,7 +9,7 @@ Summary: The Advanced Linux Sound Architecture (ALSA) library Name: alsa-lib Version: %{version_alsa_lib} -Release: 1%{?prever_dot}%{?dist} +Release: 2%{?prever_dot}%{?dist} License: LGPLv2+ URL: http://www.alsa-project.org/ @@ -167,6 +167,9 @@ rm %{buildroot}/%{_includedir}/asoundlib.h %{_datadir}/alsa/topology %changelog +* Thu Dec 9 2021 Jaroslav Kysela - 1.2.6-2 +- device open fixes from upstream + * Mon Dec 6 2021 Jaroslav Kysela - 1.2.6-1 - update to 1.2.6 diff --git a/alsa-ucm-conf.patch b/alsa-ucm-conf.patch index e69de29..b04faba 100644 --- a/alsa-ucm-conf.patch +++ b/alsa-ucm-conf.patch @@ -0,0 +1,28 @@ +From 244fc744e90c85f2816c5baba9fee08a85fec58e Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Thu, 9 Dec 2021 09:00:12 +0100 +Subject: [PATCH] USB-Audio: fix the wrong condition type for + If.realtek-alc1220-vb + +BugLink: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1246 +Signed-off-by: Jaroslav Kysela +--- + ucm2/USB-Audio/USB-Audio.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf +index 878d16d..d9d740e 100644 +--- a/ucm2/USB-Audio/USB-Audio.conf ++++ b/ucm2/USB-Audio/USB-Audio.conf +@@ -15,7 +15,7 @@ If.linked { + If.realtek-alc1220-vb { + + Condition { +- Type Regex ++ Type RegexMatch + String "${CardComponents}" + # 0414:a002 Gigabyte TRX40 Aorus Pro WiFi + # 0b05:1917 ASUS ROG Strix +-- +2.31.1 +