Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: Gerrelt 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 (http://www.thedigitalmachine.net/alsaequal.html)
and:
http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=72008&p=519643&hilit=equalizer#p519643 (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.
-
Hi
I will add it.
Béla
-
Great, thanx! :)
-
Added to repo. Just built, not tested. Let me know is it OK or not, need changes, etc.
-
Sounds useful. Mind provide it for x86, too?
-
Sounds useful. Mind provide it for x86, too?
Done, added to repo
-
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:
tce-load -wi alsaequal.tcz
then I made a asound.conf file:
sudo nano -c /etc/asound.conf
with this content:
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:
alsamixer -D equal
I get:
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:
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:
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:
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:
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.
-
I do not see
ldconfig
after creating symlink(s) to .so
-
I've retried it, but now with the ldconfig, but I still get the same error message.
-
It looks like I am running into this bug? :
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=722143 (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=722143)
-
I just noticed that on Raspbian they are using
a test- this version:
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 (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 :
* 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"
-
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.
-
OK, no problem, I will give it a try.
-
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.
-
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:
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:
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.
-
Just remembered Gerrelt, that this was the end last i tried it.
I just swapped the Eq with Eq10 some places in the caps code, instead of.
Hmm.. Will investigate tomorrow :)
Jesper
-
Hi.
I wrote an Email to xxxxx@thedigitalmachine.net
Maybee he can help a bit... lets see if there is an reply?
I sent a link to this thread, and also descripe, what else there has been written around the net :)
/ Jesper
-
Well.
I just tried a working Rasbian alsaequal setup, just to see/hear if its possible at all.
I hereby paste the setup, as to look at the --versions etc... i am a bit stock right now i think :D
pi@raspberrypi ~/audio $ sudo apt-get install libasound2-plugin-equal
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
caps
The following NEW packages will be installed:
caps libasound2-plugin-equal
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 717 kB of archives.
After this operation, 1,071 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main caps armhf 0.4.2-1 [702 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libasound2-plugin-equal armhf 0.6-4 [14.6 kB]
Fetched 717 kB in 1s (489 kB/s)
Selecting previously unselected package caps.
(Reading database ... 69052 files and directories currently installed.)
Unpacking caps (from .../caps_0.4.2-1_armhf.deb) ...
Selecting previously unselected package libasound2-plugin-equal:armhf.
Unpacking libasound2-plugin-equal:armhf (from .../libasound2-plugin-equal_0.6-4_armhf.deb) ...
Setting up caps (0.4.2-1) ...
Setting up libasound2-plugin-equal:armhf (0.6-4) ...
My squeezelite is started with /squeezelite-armv6hf -n Tiny-squeeze -a 80 4 -o equal -z
Up against a .asoundrc file in /home/pi directory
ctl.equal {
type equal;
}
pcm.plugequal {
type equal;
# Modify the line below if you don't
# want to use sound card 0.
slave.pcm "plughw:1,0";
# or if you want to use with multiple applications output to dmix
# slave.pcm "plug:dmix"
}
pcm.equal {
# Or if you want the equalizer to be your
# default soundcard uncomment the following
# line and comment the above line.
# pcm.!default {
type plug;
slave.pcm plugequal;
}
And my USB-card setup :
[ 3.276419] usb 1-1.3: new high-speed USB device number 4 using dwc_otg
[ 3.397148] usb 1-1.3: New USB device found, idVendor=20b1, idProduct=2009
[ 3.405725] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3.414707] usb 1-1.3: Product: DIYINHK USB Audio 2.0
[ 3.421387] usb 1-1.3: Manufacturer: DIYINHK
lsmod :
pi@raspberrypi ~ $ lsmod
Module Size Used by
snd_bcm2835 18169 0
snd_usb_audio 117525 0
snd_soc_bcm2708_i2s 5486 0
snd_hwdep 5980 1 snd_usb_audio
snd_usbmidi_lib 19053 1 snd_usb_audio
regmap_mmio 2818 1 snd_soc_bcm2708_i2s
snd_seq_midi 4694 0
snd_seq_midi_event 6643 1 snd_seq_midi
snd_soc_core 128166 1 snd_soc_bcm2708_i2s
regmap_spi 1913 1 snd_soc_core
snd_pcm_dmaengine 5481 1 snd_soc_core
snd_pcm 81518 4 snd_bcm2835,snd_usb_audio,snd_soc_core,snd_pcm_dmaengine
snd_rawmidi 21517 2 snd_usbmidi_lib,snd_seq_midi
snd_page_alloc 5168 1 snd_pcm
regmap_i2c 1657 1 snd_soc_core
snd_compress 8136 1 snd_soc_core
snd_seq 54581 2 snd_seq_midi_event,snd_seq_midi
snd_timer 20353 2 snd_pcm,snd_seq
leds_gpio 2055 0
led_class 4119 1 leds_gpio
snd_seq_device 6485 3 snd_seq,snd_rawmidi,snd_seq_midi
snd 61518 11 snd_bcm2835,snd_usb_audio,snd_soc_core,snd_hwdep,snd_timer,snd_pcm,snd_seq,snd_rawmidi,snd_usbmidi_lib,snd_seq_device,snd_compress
Cards :
pi@raspberrypi ~ $ cat /proc/asound/cards
0 [ALSA ]: bcm2835 - bcm2835 ALSA
bcm2835 ALSA
1 [D20 ]: USB-Audio - DIYINHK USB Audio 2.0
DIYINHK DIYINHK USB Audio 2.0 at usb-bcm2708_usb-1.3, high speed
-
Hi Jesper,
I've got it working on Raspbian too, works quite well. I plan on writing a little tutorial on my site on how to set it up.
But it is not finished yet.
Did the "-o equal" as squeezelite parameter work?
PS: did you receive the reply on your PM?
Greetings,
Gerrelt.
-
Hi pal...
Yes the squeezelite-armv6hf -n Tiny-squeeze -a 80 4 -o equal -z
is working fine on rasbian.
Yes i got you're PM, thanx!
// Jesper.
-
I've just tried it too, yes it works!! That's a better solution then setting it as default soundcard! 8)
Thanks.
-
Good then 8)
I will try tomorrow to compile upto Picore 3.14.4 The Caps, and alsaequal --versions ::
Setting up caps (0.4.2-1) ...
Setting up libasound2-plugin-equal:armhf (0.6-4) ...
They caps are "pretty" old build, compared to the picore caps 0.9.23
If i can find the sources ?
/Jesper.
-
Sorry for resuscitating this long dead thread - but i have the very same problem.
Has anyone been able to use alsaequal? How?!
-
Hi Flixxi,
Recently somebody else asked me about this via my website too. That resulted in me de-bugging the code. I've made a change to the code, and it seems to work now.
I plan to propose a change to Béla for this extension, I will create a new version of the extension and offer it to him.
If you are interested, you can test this new version for me. If so, I will post the instructions here once I get the extension finished.
Greetings,
Gerrelt.
-
Hi gerrelt.
This is good news, actually I planned to start looking into this now the new piCorePlayer version was released yesterday.
So if you already have fixed the problem this is great.
Please share the knowledge, or even better a tcz package
-
Hi sbp,
Here are the instructions and the links to the test-tcz packages.
One thing to note, this package uses an older version of caps. I tried to use the newer version of caps with alsaequal, and I almost got it working. I got to the point that I could start the equalizer. But when I started squeezelite with the equalizer, I got an segmentation fault.. :'( So, I parked that one for a later date.
Anyway, here are the instructions for alsaequal with caps version 0.4.5, both compiled on piCore-7.0beta1:
Download the tcz packages, and add them to the onboot list:
cd /home/tc
wget http://www.gerrelt.nl/RaspberryPi/alsaequal.tcz -P /mnt/mmcblk0p2/tce/optional
wget http://www.gerrelt.nl/RaspberryPi/caps-0.4.5.tcz -P /mnt/mmcblk0p2/tce/optional
sudo echo "alsaequal.tcz" >> /mnt/mmcblk0p2/tce/onboot.lst
sudo echo "caps-0.4.5.tcz" >> /mnt/mmcblk0p2/tce/onboot.lst
Create a new file called asound.conf in the /etc directory:
sudo nano /etc/asound.conf
and copy-paste this content to it:
ctl.equal {
type equal;
controls "/home/tc/.alsaequal.bin"
library "/usr/local/lib/ladspa/caps.so"
}
pcm.plugequal {
type equal;
slave.pcm "plughw:0,0";
controls "/home/tc/.alsaequal.bin"
library "/usr/local/lib/ladspa/caps.so"
}
pcm.equal {
type plug;
slave.pcm plugequal;
}
Check if "plughw:0,0" contains the correct soundcard number, see this chapter of my equalizer tutorial for more info (http://www.gerrelt.nl/RaspberryPi/wordpress/equalizer/#Find_the_right_soundcard_number).
Save and exit the file.
And add it to the .filetool.lst:
sudo echo etc/asound.conf >> /opt/.filetool.lst
Open the squeezelite settings file (this part might be different on your setup):
sudo nano -c /usr/local/bin/squeezelite_settings.sh
And change the SL_SOUNDCARD value to "equal" .
Save and exit the file, and don't forget to backup all the files now! :
filetool.sh -b
Do a reboot:
sudo reboot
Squeezelite should be up and running after the reboot....
Now, open the equalizer:
sudo alsamixer -D equal
And change some settings. To check if it is working, set all values to zero except the base. You should now hear a horrible muffled sound...
After you did your settings to your liking, exit the equalizer with escape, and don't forget to create a backup now!! :
filetool.sh -b
Otherwise your settings will be set to default after a reboot.
Let me know if this is working for you.
Greetings,
Gerrelt.
-
I plan to propose a change to Béla for this extension, I will create a new version of the extension and offer it to him.
The best if you can submit a tcz for the repo with these audio extensions. In fact I'm using sound very randomly on Pi (usually not) so better if tcz creation and testing made by one who is more involved in the audio bussiness :)
-
OK, will do. After I receive some test results.
So, just post an extension request here (http://forum.tinycorelinux.net/index.php/board,46.0.html)?
-
Hi Gerrelt.
Thanks for the detailed explanation.
It is working perfect in piCorePlayer.
I used an older version build on kernel 4.1.12, so I suspect it will be working on most versions of piCore.
I haven't observed any problems so I think you should send the two *.tcz packages to Bela so he can add them to the repro.
Good work
Steen
-
Hi Gerrelt,
your files plus the instructions worked perfectly.
Thank you very much!
(/edit: piCorePlayer 1.21b)
-
Great! Thank you both for testing! 8)
@Béla: For submitting a tcz, do I mail to: picoresubmit _at_ gmail _dot_ com ? (found at the bottom of this wiki page (http://wiki.tinycorelinux.net/wiki:creating_extensions#submission))
Or did you mean that I had to e-mail it to the general mailbox: tcesubmit _at_ gmail _dot_ com ?
-
picoresubmit _at_ gmail _dot_ com
-
Thanks! The tcz's are submitted. :)
-
Great.
Gerrelt, just to learn from you - what did you change in order to build a working version?
Steen
-
Hi Steen,
I've sent you a personal message with the code and the details.
Greetings,
Gerrelt.
-
Hello everybody,
I've added a tutorial to my website on how to get Alsaequal running on piCore: piCore: the great Equalizer (http://www.gerrelt.nl/RaspberryPi/wordpress/picore-the-great-equalizer/)
I will change the links to my own alsaequal tcz's to the repository ones, when they come available.
Greetings,
Gerrelt.
-
Thanks Gerrelt
-
Without wishing to revive an older thread, I followed Gerrelts instructions on his piCore the great equaliser page but when it came to editing the squeezelite_setting.sh file, I found that the file did not exist.
I added the required line anyway, saved and rebooted, I could run the alsa equaliser, but it had no effect on the sound.
Any ideas?
-
Hi there all,
I know this ticket hasn't has any comments for some time now BUT I'm keen to know if the alsa equalizer was ever actually added to the repo?
I can't seem to find it? I'm actually wanting to use the LADSPA plugin
http://alsa.opensrc.org/Ladspa_%28plugin%29
But thought this could be related so would start asking here for any thoughts?
Looking forward to any feedback.
Thank you!
-
Hi
I had issues compiling it in piCore-8. Most probably version in 7.x or 6.x repo works in 8.x, try it.
Béla
-
Great - I've pulled it over from 7.X and loads all well. But I'm now trying to access some of the LADSPA plugins. Would you know how I go about getting the "DysonCompressor" working. From what I can see it's part of the swh suite. This is on Debian and Raspbian but doubt in TCZ format yet.
https://packages.qa.debian.org/s/swh-plugins.html
http://alsa.opensrc.org/Ladspa_%28plugin%29
The only LADSPA plugin that loads with the alsaequal.tcz from what I can see is "caps".
Any ideas?
Thanks :)