diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2020-05-02 17:01:14 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2020-05-02 19:11:39 +0200 |
commit | bfc291932bcbb73cce8aebf8d522778e1a417b1b (patch) | |
tree | 391eb5e902aeb919da0ae9d280e5c6162f40195e /media-libs/alsa-lib/files | |
parent | Revert "sys-apps/flashrom: switch to building with meson" (diff) | |
download | gentoo-bfc291932bcbb73cce8aebf8d522778e1a417b1b.tar.gz gentoo-bfc291932bcbb73cce8aebf8d522778e1a417b1b.tar.bz2 gentoo-bfc291932bcbb73cce8aebf8d522778e1a417b1b.zip |
media-libs/alsa-lib: Fix PCM device reordering bug
Thanks-to: Alan Swanson <reiver@improbability.net>
Closes: https://bugs.gentoo.org/718106
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-libs/alsa-lib/files')
-rw-r--r-- | media-libs/alsa-lib/files/alsa-lib-1.2.2-change-order-of-pcm-devices.patch | 80 | ||||
-rw-r--r-- | media-libs/alsa-lib/files/alsa-lib-1.2.2-namehint-add-omit_noargs.patch | 108 |
2 files changed, 188 insertions, 0 deletions
diff --git a/media-libs/alsa-lib/files/alsa-lib-1.2.2-change-order-of-pcm-devices.patch b/media-libs/alsa-lib/files/alsa-lib-1.2.2-change-order-of-pcm-devices.patch new file mode 100644 index 000000000000..b21e184f8770 --- /dev/null +++ b/media-libs/alsa-lib/files/alsa-lib-1.2.2-change-order-of-pcm-devices.patch @@ -0,0 +1,80 @@ +From 27c7927842a691ef13724cd16fb26264680c6aa2 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela <perex@perex.cz> +Date: Sat, 29 Feb 2020 10:30:37 +0100 +Subject: [PATCH] conf: change the order of PCM devices in alsa.conf + +Appearently, some applications use the first device for probe or so. + +Fixes: https://github.com/alsa-project/alsa-lib/issues/27 + +Signed-off-by: Jaroslav Kysela <perex@perex.cz> +--- + src/conf/alsa.conf | 46 +++++++++++++++++++++++----------------------- + 1 file changed, 23 insertions(+), 23 deletions(-) + +diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf +index 0998058..a091b81 100644 +--- a/src/conf/alsa.conf ++++ b/src/conf/alsa.conf +@@ -119,29 +119,6 @@ defaults.timer.subdevice 0 + # PCM interface + # + +-# redirect to load-on-demand extended pcm definitions +-pcm.cards cards.pcm +- +-pcm.default cards.pcm.default +-pcm.sysdefault cards.pcm.default +-pcm.front cards.pcm.front +-pcm.rear cards.pcm.rear +-pcm.center_lfe cards.pcm.center_lfe +-pcm.side cards.pcm.side +-pcm.surround21 cards.pcm.surround21 +-pcm.surround40 cards.pcm.surround40 +-pcm.surround41 cards.pcm.surround41 +-pcm.surround50 cards.pcm.surround50 +-pcm.surround51 cards.pcm.surround51 +-pcm.surround71 cards.pcm.surround71 +-pcm.iec958 cards.pcm.iec958 +-pcm.spdif iec958 +-pcm.hdmi cards.pcm.hdmi +-pcm.dmix cards.pcm.dmix +-pcm.dsnoop cards.pcm.dsnoop +-pcm.modem cards.pcm.modem +-pcm.phoneline cards.pcm.phoneline +- + pcm.hw { + @args [ CARD DEV SUBDEV ] + @args.CARD { +@@ -323,6 +300,29 @@ pcm.null { + } + } + ++# redirect to load-on-demand extended pcm definitions ++pcm.cards cards.pcm ++ ++pcm.default cards.pcm.default ++pcm.sysdefault cards.pcm.default ++pcm.front cards.pcm.front ++pcm.rear cards.pcm.rear ++pcm.center_lfe cards.pcm.center_lfe ++pcm.side cards.pcm.side ++pcm.surround21 cards.pcm.surround21 ++pcm.surround40 cards.pcm.surround40 ++pcm.surround41 cards.pcm.surround41 ++pcm.surround50 cards.pcm.surround50 ++pcm.surround51 cards.pcm.surround51 ++pcm.surround71 cards.pcm.surround71 ++pcm.iec958 cards.pcm.iec958 ++pcm.spdif iec958 ++pcm.hdmi cards.pcm.hdmi ++pcm.dmix cards.pcm.dmix ++pcm.dsnoop cards.pcm.dsnoop ++pcm.modem cards.pcm.modem ++pcm.phoneline cards.pcm.phoneline ++ + # + # Control interface + # +-- +1.8.3.1 diff --git a/media-libs/alsa-lib/files/alsa-lib-1.2.2-namehint-add-omit_noargs.patch b/media-libs/alsa-lib/files/alsa-lib-1.2.2-namehint-add-omit_noargs.patch new file mode 100644 index 000000000000..34ffa01f1055 --- /dev/null +++ b/media-libs/alsa-lib/files/alsa-lib-1.2.2-namehint-add-omit_noargs.patch @@ -0,0 +1,108 @@ +From 09e78da4cade7b8fecb8f36717b85c456f2e5487 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela <perex@perex.cz> +Date: Sun, 1 Mar 2020 19:57:06 +0100 +Subject: [PATCH] conf: namehint - add omit_noargs to the hint section + +Do not list simple surround devices in the namehint function by default. + +Fixes: https://github.com/alsa-project/alsa-lib/issues/27 + +Signed-off-by: Jaroslav Kysela <perex@perex.cz> +--- + src/conf/pcm/surround21.conf | 1 + + src/conf/pcm/surround40.conf | 1 + + src/conf/pcm/surround41.conf | 1 + + src/conf/pcm/surround50.conf | 1 + + src/conf/pcm/surround51.conf | 1 + + src/conf/pcm/surround71.conf | 1 + + src/control/namehint.c | 6 +++++- + 7 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/conf/pcm/surround21.conf b/src/conf/pcm/surround21.conf +index 1cf1b7a..ad19507 100644 +--- a/src/conf/pcm/surround21.conf ++++ b/src/conf/pcm/surround21.conf +@@ -57,5 +57,6 @@ pcm.!surround21 { + hint { + description "2.1 Surround output to Front and Subwoofer speakers" + device_output $DEV ++ omit_noargs true + } + } +diff --git a/src/conf/pcm/surround40.conf b/src/conf/pcm/surround40.conf +index 9788ad4..7c61502 100644 +--- a/src/conf/pcm/surround40.conf ++++ b/src/conf/pcm/surround40.conf +@@ -55,5 +55,6 @@ pcm.!surround40 { + hint { + description "4.0 Surround output to Front and Rear speakers" + device_output $DEV ++ omit_noargs true + } + } +diff --git a/src/conf/pcm/surround41.conf b/src/conf/pcm/surround41.conf +index 7b4ef3b..cb6c044 100644 +--- a/src/conf/pcm/surround41.conf ++++ b/src/conf/pcm/surround41.conf +@@ -61,5 +61,6 @@ pcm.!surround41 { + hint { + description "4.1 Surround output to Front, Rear and Subwoofer speakers" + device_output $DEV ++ omit_noargs true + } + } +diff --git a/src/conf/pcm/surround50.conf b/src/conf/pcm/surround50.conf +index 7d9a9e7..70d5406 100644 +--- a/src/conf/pcm/surround50.conf ++++ b/src/conf/pcm/surround50.conf +@@ -61,5 +61,6 @@ pcm.!surround50 { + hint { + description "5.0 Surround output to Front, Center and Rear speakers" + device_output $DEV ++ omit_noargs true + } + } +diff --git a/src/conf/pcm/surround51.conf b/src/conf/pcm/surround51.conf +index e67f007..d0236e4 100644 +--- a/src/conf/pcm/surround51.conf ++++ b/src/conf/pcm/surround51.conf +@@ -57,5 +57,6 @@ pcm.!surround51 { + hint { + description "5.1 Surround output to Front, Center, Rear and Subwoofer speakers" + device_output $DEV ++ omit_noargs true + } + } +diff --git a/src/conf/pcm/surround71.conf b/src/conf/pcm/surround71.conf +index a26c3f3..66792dd 100644 +--- a/src/conf/pcm/surround71.conf ++++ b/src/conf/pcm/surround71.conf +@@ -59,5 +59,6 @@ pcm.!surround71 { + hint { + description "7.1 Surround output to Front, Center, Side, Rear and Woofer speakers" + device_output $DEV ++ omit_noargs true + } + } +diff --git a/src/control/namehint.c b/src/control/namehint.c +index 60c48ae..169bd42 100644 +--- a/src/control/namehint.c ++++ b/src/control/namehint.c +@@ -287,10 +287,14 @@ static int try_config(snd_config_t *config, + err = -EINVAL; + goto __cleanup; + } ++ if (list->card < 0 && ++ snd_config_search(cfg, "omit_noargs", &n) >= 0 && ++ snd_config_get_bool(n) > 0) ++ goto __skip_add; + if (level == 1 && + snd_config_search(cfg, "show", &n) >= 0 && + snd_config_get_bool(n) <= 0) +- goto __skip_add; ++ goto __skip_add; + if (buf1 == NULL && + snd_config_search(cfg, "description", &n) >= 0 && + snd_config_get_string(n, &str) >= 0) { +-- +1.8.3.1 |