WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Equalizer, alsaequal  (Read 23225 times)

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Equalizer, alsaequal
« on: August 30, 2014, 04:59:19 AM »
Hi all, Béla,  ;)

Somebody asked me a question about running an equalizer with squeezelite. This person used "Alsaequal".
I've looked into it, and it works quite nice.

See:
http://www.thedigitalmachine.net/alsaequal.html

and:

http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=72008&p=519643&hilit=equalizer#p519643

I've searched the repo, but it isn't available on piCore. Would it be possible to get it running on piCore? 

Greetings,
    Gerrelt.
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Equalizer, alsaequal
« Reply #1 on: August 30, 2014, 06:24:05 AM »
Hi

I will add it.

Béla
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #2 on: August 30, 2014, 07:22:32 AM »

Great, thanx!  :)

my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Equalizer, alsaequal
« Reply #3 on: August 30, 2014, 11:01:23 PM »
Added to repo. Just built, not tested. Let me know is it OK or not, need changes, etc.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Equalizer, alsaequal
« Reply #4 on: August 30, 2014, 11:08:07 PM »
Sounds useful. Mind provide it for x86, too?
Download a copy and keep it handy: Core book ;)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Equalizer, alsaequal
« Reply #5 on: August 31, 2014, 05:04:00 AM »
Sounds useful. Mind provide it for x86, too?

Done, added to repo
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #6 on: August 31, 2014, 07:27:17 AM »
Hi Béla,

 Thank you for your fast response.

I've tested it, but it does not seem to work. This is how I tried it:

First I installed it with tce:

Code: [Select]
tce-load -wi alsaequal.tcz
then I made a asound.conf file:

Code: [Select]
sudo nano -c /etc/asound.conf
with this content:

Code: [Select]
ctl.equal {
   type equal;
}

pcm.plugequal {
    type equal;
    slave.pcm "plughw:0,0";
}

pcm.!default{
         type plug;
         slave.pcm plugequal;
}
but when I try to use it with this command:
Code: [Select]
alsamixer -D equal
I get:

Code: [Select]
ALSA lib dlmisc.c:252:(snd1_dlobj_cache_get) Cannot open shared library /usr/local/lib/alsa-lib/libasound_module_ctl_equal.so
cannot open mixer: No such device or address

Then I tried to fix this by creating a symbolic link:

Code: [Select]
cd /usr/local/lib/alsa-lib/
sudo ln -s /tmp/tcloop/alsaequal/usr/local/lib/libasound_module_ctl_equal.so libasound_module_ctl_equal.so

But then I get this error:

Code: [Select]
Failed to load plugin "/usr/lib/ladspa/caps.so": /usr/lib/ladspa/caps.so: cannot open shared object file: No such file or directory
This one I tried to fix with this:

Code: [Select]
cd /usr/lib
sudo mkdir ladspa
cd ladspa
sudo ln -s /tmp/tcloop/caps/usr/local/lib/ladspa/caps.so caps.so

But then I get this error:
Code: [Select]
Unable to find label "Eq" in plugin library file "/usr/lib/ladspa/caps.so".
and now I am stuck..
Are the fixes I do correct? If so, is there a problem with this caps.so module?

Greetings,
    Gerrelt.

my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Equalizer, alsaequal
« Reply #7 on: August 31, 2014, 07:56:26 AM »
I do not see

Code: [Select]
ldconfig
after creating symlink(s) to .so
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #8 on: August 31, 2014, 10:06:46 AM »

I've retried it, but now with the ldconfig, but I still get the same error message.

my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #9 on: August 31, 2014, 10:11:38 AM »
It looks like I am running into this bug?  :

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=722143

my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #10 on: August 31, 2014, 10:28:18 AM »
I just noticed that on Raspbian they are using a test- this version:
Code: [Select]
pi@2-Blueberry-Keuken ~ $ sudo apt-cache show libasound2-plugin-equal
Package: libasound2-plugin-equal
Source: alsaequal
Version: 0.6-4
Architecture: armhf
According to this site this is a "TestingStable Version": https://packages.qa.debian.org/a/alsaequal.html
The one offered on the "DigitalMachine" site is probably an older "stable" version?

And this is interesting, this is from the releasenotes from 0.6-6 :

Code: [Select]
* Fix Eq CAPS plugin name (Closes: #721355)
I think we need version 0.6-6 for this to work.


edit: just noticed 0.6-4 is called "stable"
« Last Edit: August 31, 2014, 10:49:44 AM by Gerrelt »
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Equalizer, alsaequal
« Reply #11 on: September 01, 2014, 03:23:15 AM »
There may be an issue with location where ALSA expect the plugin or version. I'm not familiar with such deails of ALSA and no time to investigate. I kindly advice you and other members interesting to play with it. They are small apps, easy to build, even not using the GNU autotools.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #12 on: September 01, 2014, 12:20:16 PM »
OK, no problem, I will give it a try.
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #13 on: September 01, 2014, 03:19:32 PM »
I had same experience, when i tried compiling the alsaequal myself, last week.

I ended up, with the conclusion, that the Eq must be renamed to Eq10 in the "makefiles" etc... in the build directory.

I tried some changes, but didnt work out... i will try tomorrow again i think, an post the results here

Jesper.

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #14 on: September 01, 2014, 04:04:08 PM »
Hi Jesper,

 I just discovered, by browsing through the sourcecode, you can tell alsaequal to use Eq10 instead of Eq.

You would have to ad a "module" to the asound.conf. My asound.conf now looks like this:

Code: [Select]
ctl.equal {
   type equal;
   module "Eq10";
}

pcm.plugequal {
    type equal;
    slave.pcm "plughw:0,0";
    module "Eq10";
}

pcm.!default{
         type plug;
         slave.pcm plugequal;
}
Note that I added the module line twice.

But now I encounter a different, move vague problem. And the last time I did some programming in C is about 15 years ago...   ;D  (it's Java an C# I am using now)
So, understanding the code is a bit time consuming.

The error message I have now is:
Code: [Select]
ALSA lib ctl_equal.c:268:(_snd_ctl_equal_open) Problem with control file .alsaequal.bin, 3.
cannot open mixer: Operation not permitted

Sidenote: I also notice one can set the path to caps.so in the asound.conf. Might be usefull too.
my Raspberry Pi page: http://raspberry.gerrelt.nl