View previous topic :: View next topic |
Author |
Message |
jsegrave n00b
Joined: 10 Jun 2012 Posts: 7
|
Posted: Mon Aug 26, 2013 9:51 pm Post subject: alsaequal problems and workaround |
|
|
I'm recently upgraded to gentoo 3.10 and alsamixer -D equal produced the following error
Code: |
jes:/home/jes$ alsamixer -D equal
ALSA lib ctl_equal.c:268:(_snd_ctl_equal_open) Problem with control file .alsaequal.bin, 3 15.
cannot open mixer: Operation not permitted
|
A bit of playing with ebuild to get the source and examine the line in question in
/var/tmp/portage/media-plugins/alsaequal-0.6-r1/work/alsaequal-amd64/ctl_equal.c
Code: |
264 if(equal->control_data->control[i].type == LADSPA_CNTRL_INPUT) {
265 index = equal->control_data->control[i].index;
266 if(equal->klass->PortDescriptors[index] !=
267 (LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL)) {
268 SNDERR("Problem with control file %s, %d.", controls, index);
269 return -1;
270 }
|
Updating the SNDERR line to output the hex value of equal->klass->PortDescriptors[index] on errors showed it had a value of 0x15 which is LADSPA_HINT_LOGARITHMIC | LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL, which triggers the error. Altering that line to be:
Code: |
266 if((0xf & equal->control_data->control[i].type) == LADSPA_CNTRL_INPUT) {
|
then an ebuild compile/preinst/install/merge and a restart of alsasound restored the alsamixer ncurses equaliser to normal operation |
|
Back to top |
|
|
megabaks Apprentice
Joined: 22 Jan 2012 Posts: 253 Location: Russia && Saint-Petersburg
|
Posted: Mon Aug 26, 2013 11:56 pm Post subject: |
|
|
the same problem.
fix don't work _________________ sorry my bad english |
|
Back to top |
|
|
megabaks Apprentice
Joined: 22 Jan 2012 Posts: 253 Location: Russia && Saint-Petersburg
|
Posted: Tue Aug 27, 2013 12:40 am Post subject: |
|
|
caps-plugins-0.4 + 3.10 ---> work fine _________________ sorry my bad english |
|
Back to top |
|
|
lagalopex Guru
Joined: 16 Oct 2004 Posts: 562
|
Posted: Mon Jun 02, 2014 4:38 pm Post subject: Re: alsaequal problems and workaround |
|
|
jsegrave wrote: | Updating the SNDERR line to output the hex value of equal->klass->PortDescriptors[index] on errors showed it had a value of 0x15 which is LADSPA_HINT_LOGARITHMIC | LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL, which triggers the error. |
Its actually a change in media-plugins/caps-plugins which added another value:
Code: | /* extending LADSPA_PORT_* */
#define LADSPA_PORT_GROUP (AUDIO<<1) /* 16 */
#define GROUP LADSPA_PORT_GROUP |
The checks in media-plugins/alsaequal should really only validate the bits they need and not the whole bitset.
/etc/portage/patches/media-plugins/alsaequal/fix-flags.patch:
Code: | diff -Nur a/ctl_equal.c b/ctl_equal.c
--- a/ctl_equal.c 2009-01-31 23:06:47.000000000 +0100
+++ b/ctl_equal.c 2014-06-02 18:42:39.146664059 +0200
@@ -263,7 +263,8 @@
for(i = 0; i < equal->num_input_controls; i++) {
if(equal->control_data->control[i].type == LADSPA_CNTRL_INPUT) {
index = equal->control_data->control[i].index;
- if(equal->klass->PortDescriptors[index] !=
+ if((equal->klass->PortDescriptors[index] &
+ (LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL)) !=
(LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL)) {
SNDERR("Problem with control file %s, %d.", controls, index);
return -1;
@@ -284,12 +285,14 @@
}
/* Make sure that the control file makes sense */
- if(equal->klass->PortDescriptors[equal->control_data->input_index] !=
+ if((equal->klass->PortDescriptors[equal->control_data->input_index] &
+ (LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) !=
(LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) {
SNDERR("Problem with control file %s.", controls);
return -1;
}
- if(equal->klass->PortDescriptors[equal->control_data->output_index] !=
+ if((equal->klass->PortDescriptors[equal->control_data->output_index] &
+ (LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) !=
(LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) {
SNDERR("Problem with control file %s.", controls);
return -1;
diff -Nur a/ladspa_utils.c b/ladspa_utils.c
--- a/ladspa_utils.c 2009-01-31 22:57:41.000000000 +0100
+++ b/ladspa_utils.c 2014-06-02 18:41:33.486663980 +0200
@@ -354,11 +354,13 @@
default_controls->control[index].type = LADSPA_CNTRL_OUTPUT;
}
index++;
- } else if(psDescriptor->PortDescriptors[i] ==
- (LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) {
+ } else if((psDescriptor->PortDescriptors[i] &
+ (LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) ==
+ (LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)){
default_controls->input_index = i;
- } else if(psDescriptor->PortDescriptors[i] ==
- (LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) {
+ } else if((psDescriptor->PortDescriptors[i] &
+ (LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) ==
+ (LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)){
default_controls->output_index = i;
}
}
diff -Nur a/pcm_equal.c b/pcm_equal.c
--- a/pcm_equal.c 2010-02-01 23:55:00.000000000 +0100
+++ b/pcm_equal.c 2014-06-02 18:42:11.607664026 +0200
@@ -231,12 +231,14 @@
}
/* Make sure that the control file makes sense */
- if(equal->klass->PortDescriptors[equal->control_data->input_index] !=
+ if((equal->klass->PortDescriptors[equal->control_data->input_index] &
+ (LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) !=
(LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) {
SNDERR("Problem with control file %s.", controls);
return -1;
}
- if(equal->klass->PortDescriptors[equal->control_data->output_index] !=
+ if((equal->klass->PortDescriptors[equal->control_data->output_index] &
+ (LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) !=
(LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) {
SNDERR("Problem with control file %s.", controls);
return -1;
|
|
|
Back to top |
|
|
dman777 Veteran
Joined: 10 Jan 2007 Posts: 1004
|
Posted: Fri Aug 07, 2015 11:10 pm Post subject: |
|
|
This is still a issue....happened to me just now, a year later. Any ideas?
Code: | localhost ~ # alsamixer -D equal
Failed to create secure directory (/root/.config/pulse): Not a directory
ALSA lib ctl_equal.c:268:(_snd_ctl_equal_open) Problem with control file .alsaequal.bin, 3.
cannot open mixer: Operation not permitted
localhost ~ #
|
_________________ <h5>Checkout <em>#grandmasboy</em> on <em>freenode</em>...chat with jayP bot from the movie!</h5> |
|
Back to top |
|
|
Demonking n00b
Joined: 12 Mar 2007 Posts: 41
|
Posted: Wed Aug 12, 2015 1:27 pm Post subject: |
|
|
same for me, still the same error, someone an idea? _________________ I finally understand why Java's security model is so torturous:
It's to protect everyone else against people who write code like this.
The Answer to Life, the Universe, and Everything = 42 |
|
Back to top |
|
|
hashashini n00b
Joined: 30 Mar 2013 Posts: 5
|
Posted: Sun Aug 30, 2015 3:19 pm Post subject: |
|
|
create alsaequal-0.6-r3.ebuild in folder media-plugins/alsaequal in your local overlay (see wiki) with following content:
Quote: |
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils multilib toolchain-funcs multilib-minimal
DESCRIPTION="a real-time adjustable equalizer plugin for ALSA"
HOMEPAGE="http://www.thedigitalmachine.net/alsaequal.html"
SRC_URI="http://www.thedigitalmachine.net/tools/${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""
RDEPEND=">=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}]
>=media-plugins/caps-plugins-0.9.15[${MULTILIB_USEDEP}]
abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20130224-r3
!app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
DEPEND="${RDEPEND}"
S=${WORKDIR}/${PN}
DOCS=( README )
src_prepare() {
epatch "${FILESDIR}"/${P}-asneeded.patch
epatch "${FILESDIR}"/${P}-eq-name.patch
epatch "${FILESDIR}"/${P}-fixflags.patch
multilib_copy_sources
}
multilib_src_compile() {
emake \
CC="$(tc-getCC)" \
CFLAGS="${CFLAGS} -Wall -fPIC -DPIC" \
LD="$(tc-getCC)" \
LDFLAGS="${LDFLAGS} -shared" \
Q= \
SND_PCM_LIBS="-lasound" \
SND_CTL_LIBS="-lasound" || die
}
multilib_src_install() {
exeinto /usr/$(get_libdir)/alsa-lib
doexe *.so || die
}
|
create alsaequal-0.6-asneeded.patch in folder media-plugins/alsaequal/files in your local overlay with following content:
Quote: |
--- Makefile
+++ Makefile
@@ -29,11 +29,11 @@
$(SND_PCM_BIN): $(SND_PCM_OBJECTS)
@echo LD $@
- $(Q)$(LD) $(LDFLAGS) $(SND_PCM_LIBS) $(SND_PCM_OBJECTS) -o $(SND_PCM_BIN)
+ $(Q)$(LD) $(LDFLAGS) $(SND_PCM_OBJECTS) -o $(SND_PCM_BIN) $(SND_PCM_LIBS)
$(SND_CTL_BIN): $(SND_CTL_OBJECTS)
@echo LD $@
- $(Q)$(LD) $(LDFLAGS) $(SND_CTL_LIBS) $(SND_CTL_OBJECTS) -o $(SND_CTL_BIN)
+ $(Q)$(LD) $(LDFLAGS) $(SND_CTL_OBJECTS) -o $(SND_CTL_BIN) $(SND_CTL_LIBS)
%.o: %.c
@echo GCC $<
|
create alsaequal-0.6-eq-name.patch in folder media-plugins/alsaequal/files in your local overlay with following content:
Quote: |
Description: Fix CAPS Eq plugin name
Origin: vendor
Bug-Debian: http://bugs.debian.org/721355
Forwarded: no
Author: Alessandro Ghedini <ghedo@debian.org>
Last-Update: 2013-08-30
--- a/ctl_equal.c
+++ b/ctl_equal.c
@@ -167,7 +167,7 @@
snd_ctl_equal_t *equal;
const char *controls = ".alsaequal.bin";
const char *library = "/usr/lib/ladspa/caps.so";
- const char *module = "Eq";
+ const char *module = "Eq10";
long channels = 2;
const char *sufix = " Playback Volume";
int err, i, index;
--- a/pcm_equal.c
+++ b/pcm_equal.c
@@ -151,7 +151,7 @@
snd_config_t *sconf = NULL;
const char *controls = ".alsaequal.bin";
const char *library = "/usr/lib/ladspa/caps.so";
- const char *module = "Eq";
+ const char *module = "Eq10";
long channels = 2;
int err;
--- a/README
+++ b/README
@@ -1,11 +1,11 @@
Alsaequal is a real-time adjustable equalizer plugin for ALSA. It can
be adjusted using any ALSA compatible mixer, e.g. alsamixergui.
-Alsaequal uses the Eq CAPS LADSPA Plugin for audio processing, actually
+Alsaequal uses the Eq10 CAPS LADSPA Plugin for audio processing, actually
alsaequal is a generic LADSPA plugin interface with real-time access to
the LADSPA controls (the LADSPA plugin included with alsa doesn't allow
for real-time controls) but it was developed for and only tested with
-Eq CAPS LADSPA plugin. You are welcome to try it with other plugins, it
+Eq10 CAPS LADSPA plugin. You are welcome to try it with other plugins, it
may work. Let me know how it goes, you can reach me at
<charles@thedigitalmachine.net>.
@@ -66,7 +66,7 @@
library -- location of the LADSPA library, the default is
"/usr/lib/ladspa/caps.so"
module -- module name within the LADSPA library, the deafault
- is "Eq"
+ is "Eq10"
channels -- number of channels, the default is 2
}
@@ -81,7 +81,7 @@
library -- location of the LADSPA library, the default is
"/usr/lib/ladspa/caps.so"
module -- module name within the LADSPA library, the deafault
- is "Eq"
+ is "Eq10"
channels -- number of channels, the default is 2
}
|
create alsaequal-0.6-fixflags.patch in folder media-plugins/alsaequal/files in your local overlay with following content:
Quote: |
diff -Nur b/ctl_equal.c a/ctl_equal.c
--- b/ctl_equal.c 2009-01-31 23:06:47.000000000 +0100
+++ a/ctl_equal.c 2014-09-15 16:14:37.218286376 +0200
@@ -263,7 +263,8 @@
for(i = 0; i < equal->num_input_controls; i++) {
if(equal->control_data->control[i].type == LADSPA_CNTRL_INPUT) {
index = equal->control_data->control[i].index;
- if(equal->klass->PortDescriptors[index] !=
+ if((equal->klass->PortDescriptors[index] &
+ (LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL)) !=
(LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL)) {
SNDERR("Problem with control file %s, %d.", controls, index);
return -1;
@@ -284,12 +285,14 @@
}
/* Make sure that the control file makes sense */
- if(equal->klass->PortDescriptors[equal->control_data->input_index] !=
+ if((equal->klass->PortDescriptors[equal->control_data->input_index] &
+ (LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO))!=
(LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) {
SNDERR("Problem with control file %s.", controls);
return -1;
}
- if(equal->klass->PortDescriptors[equal->control_data->output_index] !=
+ if((equal->klass->PortDescriptors[equal->control_data->output_index] &
+ (LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO))!=
(LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) {
SNDERR("Problem with control file %s.", controls);
return -1;
diff -Nur b/ladspa_utils.c a/ladspa_utils.c
--- b/ladspa_utils.c 2009-01-31 22:57:41.000000000 +0100
+++ a/ladspa_utils.c 2014-09-15 16:18:49.061293401 +0200
@@ -354,10 +354,12 @@
default_controls->control[index].type = LADSPA_CNTRL_OUTPUT;
}
index++;
- } else if(psDescriptor->PortDescriptors[i] ==
+ } else if((psDescriptor->PortDescriptors[i] &
+ (LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) ==
(LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) {
default_controls->input_index = i;
- } else if(psDescriptor->PortDescriptors[i] ==
+ } else if((psDescriptor->PortDescriptors[i] &
+ (LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) ==
(LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) {
default_controls->output_index = i;
}
diff -Nur b/pcm_equal.c a/pcm_equal.c
--- b/pcm_equal.c 2010-02-01 23:55:00.000000000 +0100
+++ a/pcm_equal.c 2014-09-15 16:21:32.892297971 +0200
@@ -231,12 +231,14 @@
}
/* Make sure that the control file makes sense */
- if(equal->klass->PortDescriptors[equal->control_data->input_index] !=
+ if((equal->klass->PortDescriptors[equal->control_data->input_index] &
+ (LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) !=
(LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) {
SNDERR("Problem with control file %s.", controls);
return -1;
}
- if(equal->klass->PortDescriptors[equal->control_data->output_index] !=
+ if((equal->klass->PortDescriptors[equal->control_data->output_index] &
+ (LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) !=
(LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) {
SNDERR("Problem with control file %s.", controls);
return -1;
|
cd into the folder where you created alsaequal-0.6-r3.ebuild and issue following commands:
Code: |
# ebuild alsaequal-0.6-r3.ebuild manifest
# emerge -av alsaequal
|
|
|
Back to top |
|
|
cjfonta n00b
Joined: 18 Apr 2016 Posts: 1
|
Posted: Wed May 04, 2016 6:24 pm Post subject: |
|
|
hello, have followed the hashashini method but does not compile, get this error :
Code: | * Failed Patch: alsaequal-0.6-asneeded.patch !
* ( /usr/local/portage/media-plugins/alsaequal/files/alsaequal-0.6-asneeded.patch )
*
* Include in your bugreport the contents of:
*
* /var/tmp/portage/media-plugins/alsaequal-0.6-r3/temp/alsaequal-0.6-asneeded.patch.out
* ERROR: media-plugins/alsaequal-0.6-r3::x-portage failed (prepare phase):
* Failed Patch: alsaequal-0.6-asneeded.patch!
*
* Call stack:
* ebuild.sh, line 133: Called src_prepare
* environment, line 2354: Called epatch '/usr/local/portage/media-plugins/alsaequal/files/alsaequal-0.6-asneeded.patch'
* environment, line 683: Called die
* The specific snippet of code:
* die "Failed Patch: ${patchname}!";
|
how to resolve?
edit: have resolved with the fix bugs page
https://git.backbone.ws/portage/overlay/commit/7a069112054fbb5dc94a857e9c020a38cb1c6fde?diffmode=inline |
|
Back to top |
|
|
dimibyte n00b
Joined: 21 Nov 2017 Posts: 1
|
Posted: Tue Nov 21, 2017 2:11 am Post subject: |
|
|
cjfonta wrote: | hello, have followed the hashashini method but does not compile, get this error :
Code: | * Failed Patch: alsaequal-0.6-asneeded.patch !
* ( /usr/local/portage/media-plugins/alsaequal/files/alsaequal-0.6-asneeded.patch )
*
* Include in your bugreport the contents of:
*
* /var/tmp/portage/media-plugins/alsaequal-0.6-r3/temp/alsaequal-0.6-asneeded.patch.out
* ERROR: media-plugins/alsaequal-0.6-r3::x-portage failed (prepare phase):
* Failed Patch: alsaequal-0.6-asneeded.patch!
*
* Call stack:
* ebuild.sh, line 133: Called src_prepare
* environment, line 2354: Called epatch '/usr/local/portage/media-plugins/alsaequal/files/alsaequal-0.6-asneeded.patch'
* environment, line 683: Called die
* The specific snippet of code:
* die "Failed Patch: ${patchname}!";
|
how to resolve?
edit: have resolved with the fix bugs page
https://git.backbone.ws/portage/overlay/commit/7a069112054fbb5dc94a857e9c020a38cb1c6fde?diffmode=inline |
Fixed alsaequal also can be found here. |
|
Back to top |
|
|
Oniryczny Guru
Joined: 01 Dec 2011 Posts: 419 Location: Poland
|
Posted: Tue Mar 20, 2018 9:29 am Post subject: |
|
|
updated alsaequal but still get error Code: |
$ LANG=C alsamixer -D equal
ALSA lib ctl_equal.c:269:(_snd_ctl_equal_open) Problem with control file .alsaequal.bin, 10.
cannot open mixer: Operation not permitted
$ |
_________________ cogito ergo sum |
|
Back to top |
|
|
The Main Man Veteran
Joined: 27 Nov 2014 Posts: 1166 Location: /run/user/1000
|
Posted: Mon Mar 23, 2020 8:48 pm Post subject: |
|
|
Amazing after all this time, but I have the same problem. |
|
Back to top |
|
|
The Main Man Veteran
Joined: 27 Nov 2014 Posts: 1166 Location: /run/user/1000
|
Posted: Mon Mar 23, 2020 11:11 pm Post subject: |
|
|
btw caps-plugins are bit dated, 0.94 is latest version in the portage, there are 0.95 and 0.96 available.
Didn't try 0.95 but the files directory (the patches) are not needed anymore in 0.96 |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|