1 |
commit: bfc291932bcbb73cce8aebf8d522778e1a417b1b |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 2 15:01:14 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 2 17:11:39 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bfc29193 |
7 |
|
8 |
media-libs/alsa-lib: Fix PCM device reordering bug |
9 |
|
10 |
Thanks-to: Alan Swanson <reiver <AT> improbability.net> |
11 |
Closes: https://bugs.gentoo.org/718106 |
12 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
13 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
14 |
|
15 |
media-libs/alsa-lib/alsa-lib-1.2.2-r1.ebuild | 83 ++++++++++++++++ |
16 |
...lsa-lib-1.2.2-change-order-of-pcm-devices.patch | 80 +++++++++++++++ |
17 |
.../alsa-lib-1.2.2-namehint-add-omit_noargs.patch | 108 +++++++++++++++++++++ |
18 |
3 files changed, 271 insertions(+) |
19 |
|
20 |
diff --git a/media-libs/alsa-lib/alsa-lib-1.2.2-r1.ebuild b/media-libs/alsa-lib/alsa-lib-1.2.2-r1.ebuild |
21 |
new file mode 100644 |
22 |
index 00000000000..d00305137f2 |
23 |
--- /dev/null |
24 |
+++ b/media-libs/alsa-lib/alsa-lib-1.2.2-r1.ebuild |
25 |
@@ -0,0 +1,83 @@ |
26 |
+# Copyright 1999-2020 Gentoo Authors |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
+ |
29 |
+EAPI=7 |
30 |
+ |
31 |
+PYTHON_COMPAT=( python2_7 python3_{6,7,8} ) |
32 |
+inherit autotools multilib-minimal python-single-r1 |
33 |
+ |
34 |
+DESCRIPTION="Advanced Linux Sound Architecture Library" |
35 |
+HOMEPAGE="https://alsa-project.org/" |
36 |
+SRC_URI="https://www.alsa-project.org/files/pub/lib/${P}.tar.bz2" |
37 |
+ |
38 |
+LICENSE="LGPL-2.1" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" |
41 |
+IUSE="alisp debug doc elibc_uclibc python +thread-safety" |
42 |
+ |
43 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
44 |
+ |
45 |
+BDEPEND="doc? ( >=app-doc/doxygen-1.2.6 )" |
46 |
+RDEPEND="python? ( ${PYTHON_DEPS} )" |
47 |
+DEPEND="${RDEPEND}" |
48 |
+ |
49 |
+PATCHES=( |
50 |
+ "${FILESDIR}/${PN}-1.1.6-missing_files.patch" #652422 |
51 |
+ "${FILESDIR}/${P}-change-order-of-pcm-devices.patch" #718106 |
52 |
+ "${FILESDIR}/${P}-namehint-add-omit_noargs.patch" #718106 |
53 |
+) |
54 |
+ |
55 |
+pkg_setup() { |
56 |
+ use python && python-single-r1_pkg_setup |
57 |
+} |
58 |
+ |
59 |
+src_prepare() { |
60 |
+ find . -name Makefile.am -exec sed -i -e '/CFLAGS/s:-g -O2::' {} + || die |
61 |
+ # https://bugs.gentoo.org/509886 |
62 |
+ if use elibc_uclibc ; then |
63 |
+ sed -i -e 's:oldapi queue_timer:queue_timer:' test/Makefile.am || die |
64 |
+ fi |
65 |
+ # https://bugs.gentoo.org/545950 |
66 |
+ sed -i -e '5s:^$:\nAM_CPPFLAGS = -I$(top_srcdir)/include:' test/lsb/Makefile.am || die |
67 |
+ default |
68 |
+ eautoreconf |
69 |
+} |
70 |
+ |
71 |
+multilib_src_configure() { |
72 |
+ local myeconfargs=( |
73 |
+ --disable-maintainer-mode |
74 |
+ --disable-resmgr |
75 |
+ --enable-aload |
76 |
+ --enable-rawmidi |
77 |
+ --enable-seq |
78 |
+ --enable-shared |
79 |
+ # enable Python only on final ABI |
80 |
+ $(multilib_native_use_enable python) |
81 |
+ $(use_enable alisp) |
82 |
+ $(use_enable thread-safety) |
83 |
+ $(use_with debug) |
84 |
+ $(usex elibc_uclibc --without-versioned '') |
85 |
+ ) |
86 |
+ |
87 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
88 |
+} |
89 |
+ |
90 |
+multilib_src_compile() { |
91 |
+ emake |
92 |
+ |
93 |
+ if multilib_is_native_abi && use doc; then |
94 |
+ emake doc |
95 |
+ grep -FZrl "${S}" doc/doxygen/html | \ |
96 |
+ xargs -0 sed -i -e "s:${S}::" || die |
97 |
+ fi |
98 |
+} |
99 |
+ |
100 |
+multilib_src_install() { |
101 |
+ multilib_is_native_abi && use doc && local HTML_DOCS=( doc/doxygen/html/. ) |
102 |
+ default |
103 |
+} |
104 |
+ |
105 |
+multilib_src_install_all() { |
106 |
+ find "${ED}" -type f \( -name '*.a' -o -name '*.la' \) -delete || die |
107 |
+ dodoc ChangeLog doc/asoundrc.txt NOTES TODO |
108 |
+} |
109 |
|
110 |
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 |
111 |
new file mode 100644 |
112 |
index 00000000000..b21e184f877 |
113 |
--- /dev/null |
114 |
+++ b/media-libs/alsa-lib/files/alsa-lib-1.2.2-change-order-of-pcm-devices.patch |
115 |
@@ -0,0 +1,80 @@ |
116 |
+From 27c7927842a691ef13724cd16fb26264680c6aa2 Mon Sep 17 00:00:00 2001 |
117 |
+From: Jaroslav Kysela <perex@×××××.cz> |
118 |
+Date: Sat, 29 Feb 2020 10:30:37 +0100 |
119 |
+Subject: [PATCH] conf: change the order of PCM devices in alsa.conf |
120 |
+ |
121 |
+Appearently, some applications use the first device for probe or so. |
122 |
+ |
123 |
+Fixes: https://github.com/alsa-project/alsa-lib/issues/27 |
124 |
+ |
125 |
+Signed-off-by: Jaroslav Kysela <perex@×××××.cz> |
126 |
+--- |
127 |
+ src/conf/alsa.conf | 46 +++++++++++++++++++++++----------------------- |
128 |
+ 1 file changed, 23 insertions(+), 23 deletions(-) |
129 |
+ |
130 |
+diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf |
131 |
+index 0998058..a091b81 100644 |
132 |
+--- a/src/conf/alsa.conf |
133 |
++++ b/src/conf/alsa.conf |
134 |
+@@ -119,29 +119,6 @@ defaults.timer.subdevice 0 |
135 |
+ # PCM interface |
136 |
+ # |
137 |
+ |
138 |
+-# redirect to load-on-demand extended pcm definitions |
139 |
+-pcm.cards cards.pcm |
140 |
+- |
141 |
+-pcm.default cards.pcm.default |
142 |
+-pcm.sysdefault cards.pcm.default |
143 |
+-pcm.front cards.pcm.front |
144 |
+-pcm.rear cards.pcm.rear |
145 |
+-pcm.center_lfe cards.pcm.center_lfe |
146 |
+-pcm.side cards.pcm.side |
147 |
+-pcm.surround21 cards.pcm.surround21 |
148 |
+-pcm.surround40 cards.pcm.surround40 |
149 |
+-pcm.surround41 cards.pcm.surround41 |
150 |
+-pcm.surround50 cards.pcm.surround50 |
151 |
+-pcm.surround51 cards.pcm.surround51 |
152 |
+-pcm.surround71 cards.pcm.surround71 |
153 |
+-pcm.iec958 cards.pcm.iec958 |
154 |
+-pcm.spdif iec958 |
155 |
+-pcm.hdmi cards.pcm.hdmi |
156 |
+-pcm.dmix cards.pcm.dmix |
157 |
+-pcm.dsnoop cards.pcm.dsnoop |
158 |
+-pcm.modem cards.pcm.modem |
159 |
+-pcm.phoneline cards.pcm.phoneline |
160 |
+- |
161 |
+ pcm.hw { |
162 |
+ @args [ CARD DEV SUBDEV ] |
163 |
+ @args.CARD { |
164 |
+@@ -323,6 +300,29 @@ pcm.null { |
165 |
+ } |
166 |
+ } |
167 |
+ |
168 |
++# redirect to load-on-demand extended pcm definitions |
169 |
++pcm.cards cards.pcm |
170 |
++ |
171 |
++pcm.default cards.pcm.default |
172 |
++pcm.sysdefault cards.pcm.default |
173 |
++pcm.front cards.pcm.front |
174 |
++pcm.rear cards.pcm.rear |
175 |
++pcm.center_lfe cards.pcm.center_lfe |
176 |
++pcm.side cards.pcm.side |
177 |
++pcm.surround21 cards.pcm.surround21 |
178 |
++pcm.surround40 cards.pcm.surround40 |
179 |
++pcm.surround41 cards.pcm.surround41 |
180 |
++pcm.surround50 cards.pcm.surround50 |
181 |
++pcm.surround51 cards.pcm.surround51 |
182 |
++pcm.surround71 cards.pcm.surround71 |
183 |
++pcm.iec958 cards.pcm.iec958 |
184 |
++pcm.spdif iec958 |
185 |
++pcm.hdmi cards.pcm.hdmi |
186 |
++pcm.dmix cards.pcm.dmix |
187 |
++pcm.dsnoop cards.pcm.dsnoop |
188 |
++pcm.modem cards.pcm.modem |
189 |
++pcm.phoneline cards.pcm.phoneline |
190 |
++ |
191 |
+ # |
192 |
+ # Control interface |
193 |
+ # |
194 |
+-- |
195 |
+1.8.3.1 |
196 |
|
197 |
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 |
198 |
new file mode 100644 |
199 |
index 00000000000..34ffa01f105 |
200 |
--- /dev/null |
201 |
+++ b/media-libs/alsa-lib/files/alsa-lib-1.2.2-namehint-add-omit_noargs.patch |
202 |
@@ -0,0 +1,108 @@ |
203 |
+From 09e78da4cade7b8fecb8f36717b85c456f2e5487 Mon Sep 17 00:00:00 2001 |
204 |
+From: Jaroslav Kysela <perex@×××××.cz> |
205 |
+Date: Sun, 1 Mar 2020 19:57:06 +0100 |
206 |
+Subject: [PATCH] conf: namehint - add omit_noargs to the hint section |
207 |
+ |
208 |
+Do not list simple surround devices in the namehint function by default. |
209 |
+ |
210 |
+Fixes: https://github.com/alsa-project/alsa-lib/issues/27 |
211 |
+ |
212 |
+Signed-off-by: Jaroslav Kysela <perex@×××××.cz> |
213 |
+--- |
214 |
+ src/conf/pcm/surround21.conf | 1 + |
215 |
+ src/conf/pcm/surround40.conf | 1 + |
216 |
+ src/conf/pcm/surround41.conf | 1 + |
217 |
+ src/conf/pcm/surround50.conf | 1 + |
218 |
+ src/conf/pcm/surround51.conf | 1 + |
219 |
+ src/conf/pcm/surround71.conf | 1 + |
220 |
+ src/control/namehint.c | 6 +++++- |
221 |
+ 7 files changed, 11 insertions(+), 1 deletion(-) |
222 |
+ |
223 |
+diff --git a/src/conf/pcm/surround21.conf b/src/conf/pcm/surround21.conf |
224 |
+index 1cf1b7a..ad19507 100644 |
225 |
+--- a/src/conf/pcm/surround21.conf |
226 |
++++ b/src/conf/pcm/surround21.conf |
227 |
+@@ -57,5 +57,6 @@ pcm.!surround21 { |
228 |
+ hint { |
229 |
+ description "2.1 Surround output to Front and Subwoofer speakers" |
230 |
+ device_output $DEV |
231 |
++ omit_noargs true |
232 |
+ } |
233 |
+ } |
234 |
+diff --git a/src/conf/pcm/surround40.conf b/src/conf/pcm/surround40.conf |
235 |
+index 9788ad4..7c61502 100644 |
236 |
+--- a/src/conf/pcm/surround40.conf |
237 |
++++ b/src/conf/pcm/surround40.conf |
238 |
+@@ -55,5 +55,6 @@ pcm.!surround40 { |
239 |
+ hint { |
240 |
+ description "4.0 Surround output to Front and Rear speakers" |
241 |
+ device_output $DEV |
242 |
++ omit_noargs true |
243 |
+ } |
244 |
+ } |
245 |
+diff --git a/src/conf/pcm/surround41.conf b/src/conf/pcm/surround41.conf |
246 |
+index 7b4ef3b..cb6c044 100644 |
247 |
+--- a/src/conf/pcm/surround41.conf |
248 |
++++ b/src/conf/pcm/surround41.conf |
249 |
+@@ -61,5 +61,6 @@ pcm.!surround41 { |
250 |
+ hint { |
251 |
+ description "4.1 Surround output to Front, Rear and Subwoofer speakers" |
252 |
+ device_output $DEV |
253 |
++ omit_noargs true |
254 |
+ } |
255 |
+ } |
256 |
+diff --git a/src/conf/pcm/surround50.conf b/src/conf/pcm/surround50.conf |
257 |
+index 7d9a9e7..70d5406 100644 |
258 |
+--- a/src/conf/pcm/surround50.conf |
259 |
++++ b/src/conf/pcm/surround50.conf |
260 |
+@@ -61,5 +61,6 @@ pcm.!surround50 { |
261 |
+ hint { |
262 |
+ description "5.0 Surround output to Front, Center and Rear speakers" |
263 |
+ device_output $DEV |
264 |
++ omit_noargs true |
265 |
+ } |
266 |
+ } |
267 |
+diff --git a/src/conf/pcm/surround51.conf b/src/conf/pcm/surround51.conf |
268 |
+index e67f007..d0236e4 100644 |
269 |
+--- a/src/conf/pcm/surround51.conf |
270 |
++++ b/src/conf/pcm/surround51.conf |
271 |
+@@ -57,5 +57,6 @@ pcm.!surround51 { |
272 |
+ hint { |
273 |
+ description "5.1 Surround output to Front, Center, Rear and Subwoofer speakers" |
274 |
+ device_output $DEV |
275 |
++ omit_noargs true |
276 |
+ } |
277 |
+ } |
278 |
+diff --git a/src/conf/pcm/surround71.conf b/src/conf/pcm/surround71.conf |
279 |
+index a26c3f3..66792dd 100644 |
280 |
+--- a/src/conf/pcm/surround71.conf |
281 |
++++ b/src/conf/pcm/surround71.conf |
282 |
+@@ -59,5 +59,6 @@ pcm.!surround71 { |
283 |
+ hint { |
284 |
+ description "7.1 Surround output to Front, Center, Side, Rear and Woofer speakers" |
285 |
+ device_output $DEV |
286 |
++ omit_noargs true |
287 |
+ } |
288 |
+ } |
289 |
+diff --git a/src/control/namehint.c b/src/control/namehint.c |
290 |
+index 60c48ae..169bd42 100644 |
291 |
+--- a/src/control/namehint.c |
292 |
++++ b/src/control/namehint.c |
293 |
+@@ -287,10 +287,14 @@ static int try_config(snd_config_t *config, |
294 |
+ err = -EINVAL; |
295 |
+ goto __cleanup; |
296 |
+ } |
297 |
++ if (list->card < 0 && |
298 |
++ snd_config_search(cfg, "omit_noargs", &n) >= 0 && |
299 |
++ snd_config_get_bool(n) > 0) |
300 |
++ goto __skip_add; |
301 |
+ if (level == 1 && |
302 |
+ snd_config_search(cfg, "show", &n) >= 0 && |
303 |
+ snd_config_get_bool(n) <= 0) |
304 |
+- goto __skip_add; |
305 |
++ goto __skip_add; |
306 |
+ if (buf1 == NULL && |
307 |
+ snd_config_search(cfg, "description", &n) >= 0 && |
308 |
+ snd_config_get_string(n, &str) >= 0) { |
309 |
+-- |
310 |
+1.8.3.1 |