Browse Source

Fix for alsaequal-0.6-r2 dmix.

ALSA lib ctl_equal.c:268:(_snd_ctl_equal_open) Problem with control file .alsaequal.bin, 3.
cannot open mixer: Operation not permitted

https://bugs.gentoo.org/show_bug.cgi?id=499298
Kolan Sh 4 years ago
parent
commit
7a06911205

+ 1
- 0
media-plugins/alsaequal/Manifest View File

@@ -0,0 +1 @@
1
+DIST alsaequal-0.6.tar.bz2 23562 SHA256 916e7d152added24617efc350142438a46099efe062bd8781d36dbf10b4e6ff0 SHA512 53a73469682eb7b641849151d4e91a3ac031daa5f11f7ad328bdd0bcf5251112814c75d27dceb8baf8582c749bf80f055414397259d24b749e7edbc03472bc6a WHIRLPOOL 991467670e6913829b402d6ba46b019317bcc49f98c45620ee2501c950d7b655c72a5dd65a76e68c59b4f2bbedc9c2c4a78d00a6b80bbfd34a37d8845eb43d85

+ 47
- 0
media-plugins/alsaequal/alsaequal-0.6-r2.ebuild View File

@@ -0,0 +1,47 @@
1
+# Copyright 1999-2014 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/alsaequal/alsaequal-0.6-r2.ebuild,v 1.4 2014/08/10 12:59:02 nativemad Exp $
4
+
5
+EAPI=5
6
+inherit eutils multilib toolchain-funcs multilib-minimal
7
+
8
+DESCRIPTION="a real-time adjustable equalizer plugin for ALSA"
9
+HOMEPAGE="http://www.thedigitalmachine.net/alsaequal.html"
10
+SRC_URI="http://www.thedigitalmachine.net/tools/${P}.tar.bz2"
11
+
12
+LICENSE="LGPL-2.1"
13
+SLOT="0"
14
+KEYWORDS="amd64 x86"
15
+IUSE=""
16
+
17
+RDEPEND=">=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}]
18
+	>=media-plugins/caps-plugins-0.9.15[${MULTILIB_USEDEP}]
19
+	abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20130224-r3
20
+					!app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
21
+DEPEND="${RDEPEND}"
22
+
23
+S=${WORKDIR}/${PN}
24
+DOCS=( README )
25
+
26
+src_prepare() {
27
+	epatch "${FILESDIR}"/${P}-asneeded.patch
28
+	epatch "${FILESDIR}"/${P}-eq-name.patch
29
+	epatch "${FILESDIR}"/${P}-mixer.patch
30
+	multilib_copy_sources
31
+}
32
+
33
+multilib_src_compile() {
34
+	emake \
35
+		CC="$(tc-getCC)" \
36
+		CFLAGS="${CFLAGS} -Wall -fPIC -DPIC" \
37
+		LD="$(tc-getCC)" \
38
+		LDFLAGS="${LDFLAGS} -shared" \
39
+		Q= \
40
+		SND_PCM_LIBS="-lasound" \
41
+		SND_CTL_LIBS="-lasound" || die
42
+}
43
+
44
+multilib_src_install() {
45
+	exeinto /usr/$(get_libdir)/alsa-lib
46
+	doexe *.so || die
47
+}

+ 16
- 0
media-plugins/alsaequal/files/alsaequal-0.6-asneeded.patch View File

@@ -0,0 +1,16 @@
1
+--- Makefile
2
++++ Makefile
3
+@@ -29,11 +29,11 @@
4
+ 
5
+ $(SND_PCM_BIN): $(SND_PCM_OBJECTS)
6
+ 	@echo LD $@
7
+-	$(Q)$(LD) $(LDFLAGS) $(SND_PCM_LIBS) $(SND_PCM_OBJECTS) -o $(SND_PCM_BIN)
8
++	$(Q)$(LD) $(LDFLAGS) $(SND_PCM_OBJECTS) -o $(SND_PCM_BIN) $(SND_PCM_LIBS)
9
+ 
10
+ $(SND_CTL_BIN): $(SND_CTL_OBJECTS)
11
+ 	@echo LD $@
12
+-	$(Q)$(LD) $(LDFLAGS) $(SND_CTL_LIBS) $(SND_CTL_OBJECTS) -o $(SND_CTL_BIN)
13
++	$(Q)$(LD) $(LDFLAGS) $(SND_CTL_OBJECTS) -o $(SND_CTL_BIN) $(SND_CTL_LIBS)
14
+ 
15
+ %.o: %.c
16
+ 	@echo GCC $<

+ 63
- 0
media-plugins/alsaequal/files/alsaequal-0.6-eq-name.patch View File

@@ -0,0 +1,63 @@
1
+Description: Fix CAPS Eq plugin name
2
+Origin: vendor
3
+Bug-Debian: http://bugs.debian.org/721355
4
+Forwarded: no
5
+Author: Alessandro Ghedini <ghedo@debian.org>
6
+Last-Update: 2013-08-30
7
+
8
+--- a/ctl_equal.c
9
++++ b/ctl_equal.c
10
+@@ -167,7 +167,7 @@
11
+ 	snd_ctl_equal_t *equal;
12
+ 	const char *controls = ".alsaequal.bin";
13
+ 	const char *library = "/usr/lib/ladspa/caps.so";
14
+-	const char *module = "Eq";
15
++	const char *module = "Eq10";
16
+ 	long channels = 2;
17
+ 	const char *sufix = " Playback Volume";
18
+ 	int err, i, index;
19
+--- a/pcm_equal.c
20
++++ b/pcm_equal.c
21
+@@ -151,7 +151,7 @@
22
+ 	snd_config_t *sconf = NULL;
23
+ 	const char *controls = ".alsaequal.bin";
24
+ 	const char *library = "/usr/lib/ladspa/caps.so";
25
+-	const char *module = "Eq";
26
++	const char *module = "Eq10";
27
+ 	long channels = 2;
28
+ 	int err;
29
+ 	
30
+--- a/README
31
++++ b/README
32
+@@ -1,11 +1,11 @@
33
+ Alsaequal is a real-time adjustable equalizer plugin for ALSA. It can
34
+ be adjusted using any ALSA compatible mixer, e.g. alsamixergui.
35
+ 
36
+-Alsaequal uses the Eq CAPS LADSPA Plugin for audio processing, actually
37
++Alsaequal uses the Eq10 CAPS LADSPA Plugin for audio processing, actually
38
+ alsaequal is a generic LADSPA plugin interface with real-time access to
39
+ the LADSPA controls (the LADSPA plugin included with alsa doesn't allow
40
+ for real-time controls) but it was developed for and only tested with
41
+-Eq CAPS LADSPA plugin. You are welcome to try it with other plugins, it
42
++Eq10 CAPS LADSPA plugin. You are welcome to try it with other plugins, it
43
+ may work. Let me know how it goes, you can reach me at
44
+ <charles@thedigitalmachine.net>.
45
+ 
46
+@@ -66,7 +66,7 @@
47
+ 	library -- location of the LADSPA library, the default is
48
+ 					"/usr/lib/ladspa/caps.so"
49
+ 	module -- module name within the LADSPA library, the deafault
50
+-					is "Eq"
51
++					is "Eq10"
52
+ 	channels -- number of channels, the default is 2
53
+ }
54
+ 
55
+@@ -81,7 +81,7 @@
56
+ 	library -- location of the LADSPA library, the default is
57
+ 					"/usr/lib/ladspa/caps.so"
58
+ 	module -- module name within the LADSPA library, the deafault
59
+-					is "Eq"
60
++					is "Eq10"
61
+ 	channels -- number of channels, the default is 2
62
+ }
63
+ 

+ 68
- 0
media-plugins/alsaequal/files/alsaequal-0.6-mixer.patch View File

@@ -0,0 +1,68 @@
1
+diff -Nur b/ctl_equal.c a/ctl_equal.c
2
+--- b/ctl_equal.c	2009-01-31 23:06:47.000000000 +0100
3
++++ a/ctl_equal.c	2014-09-15 16:14:37.218286376 +0200
4
+@@ -263,7 +263,8 @@
5
+ 	for(i = 0; i < equal->num_input_controls; i++) {
6
+ 		if(equal->control_data->control[i].type == LADSPA_CNTRL_INPUT) {
7
+ 			index = equal->control_data->control[i].index;
8
+-			if(equal->klass->PortDescriptors[index] !=
9
++			if((equal->klass->PortDescriptors[index] & 
10
++					(LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL)) !=
11
+ 					(LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL)) {
12
+ 				SNDERR("Problem with control file %s, %d.", controls, index);
13
+ 				return -1;
14
+@@ -284,12 +285,14 @@
15
+ 	}
16
+ 
17
+ 	/* Make sure that the control file makes sense */
18
+-	if(equal->klass->PortDescriptors[equal->control_data->input_index] !=
19
++	if((equal->klass->PortDescriptors[equal->control_data->input_index] & 
20
++			(LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO))!=
21
+ 			(LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) {
22
+ 		SNDERR("Problem with control file %s.", controls);
23
+ 		return -1;
24
+ 	}
25
+-	if(equal->klass->PortDescriptors[equal->control_data->output_index] !=
26
++	if((equal->klass->PortDescriptors[equal->control_data->output_index] & 
27
++			(LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO))!=
28
+ 			(LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) {
29
+ 		SNDERR("Problem with control file %s.", controls);
30
+ 		return -1;
31
+diff -Nur b/ladspa_utils.c a/ladspa_utils.c
32
+--- b/ladspa_utils.c	2009-01-31 22:57:41.000000000 +0100
33
++++ a/ladspa_utils.c	2014-09-15 16:18:49.061293401 +0200
34
+@@ -354,10 +354,12 @@
35
+ 						default_controls->control[index].type = LADSPA_CNTRL_OUTPUT;
36
+ 					}
37
+ 					index++;
38
+-				} else if(psDescriptor->PortDescriptors[i] ==
39
++				} else if((psDescriptor->PortDescriptors[i] &
40
++						(LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) ==
41
+ 						(LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) {
42
+ 					default_controls->input_index = i;
43
+-				} else if(psDescriptor->PortDescriptors[i] ==
44
++				} else if((psDescriptor->PortDescriptors[i] & 
45
++						(LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) ==
46
+ 						(LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) {
47
+ 					default_controls->output_index = i;
48
+ 				}
49
+diff -Nur b/pcm_equal.c a/pcm_equal.c
50
+--- b/pcm_equal.c	2010-02-01 23:55:00.000000000 +0100
51
++++ a/pcm_equal.c	2014-09-15 16:21:32.892297971 +0200
52
+@@ -231,12 +231,14 @@
53
+ 	}
54
+ 
55
+ 	/* Make sure that the control file makes sense */
56
+-	if(equal->klass->PortDescriptors[equal->control_data->input_index] !=
57
++	if((equal->klass->PortDescriptors[equal->control_data->input_index] &   
58
++			(LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) !=
59
+ 			(LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) {
60
+ 		SNDERR("Problem with control file %s.", controls);
61
+ 		return -1;
62
+ 	}
63
+-	if(equal->klass->PortDescriptors[equal->control_data->output_index] !=
64
++	if((equal->klass->PortDescriptors[equal->control_data->output_index] & 
65
++			(LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) !=
66
+ 			(LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) {
67
+ 		SNDERR("Problem with control file %s.", controls);
68
+ 		return -1;

+ 0
- 2
profiles/desktop/package.mask View File

@@ -1,7 +1,5 @@
1 1
 >=media-fonts/liberation-fonts-2.00.0
2 2
 >=gnome-base/gsettings-desktop-schemas-3.10.1
3
->=media-plugins/caps-plugins-0.9.10 # brokes alsaequal
4
->=media-plugins/alsaequal-0.6-r1
5 3
 =dev-lisp/gcl-2.6.11 # long compilation time
6 4
 
7 5
 # Waiting for udev to be fully populated

+ 0
- 2
profiles/server/package.mask View File

@@ -1,5 +1,3 @@
1
->=media-plugins/caps-plugins-0.9.10 # brokes alsaequal
2
->=media-plugins/alsaequal-0.6-r1
3 1
 =dev-python/routes-2.0 # blocks upgrade of sys-cluster/nova
4 2
 
5 3
 # Waiting for udev to be fully populated

Loading…
Cancel
Save