WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Equalizer, alsaequal  (Read 21111 times)

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #15 on: September 01, 2014, 01:31:42 PM »
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

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #16 on: September 02, 2014, 12:16:45 AM »
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

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer // RASPBIAN setup Linux raspberrypi 3.12.22+ #691 PREEMPT //
« Reply #17 on: September 02, 2014, 03:00:41 AM »
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

Quote
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
Quote
/squeezelite-armv6hf -n Tiny-squeeze -a 80  4  -o equal -z

Up against a .asoundrc file in /home/pi directory
Quote
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 :

Quote
[    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 :

Quote
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 :

Quote
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


Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #18 on: September 02, 2014, 10:41:57 AM »
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.
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #19 on: September 02, 2014, 10:53:42 AM »
Hi pal...

Yes the
Quote
squeezelite-armv6hf -n Tiny-squeeze -a 80  4  -o equal -z
is working fine on rasbian.

Yes i got you're PM, thanx!

// Jesper.

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #20 on: September 02, 2014, 11:00:06 AM »
I've just tried it too, yes it works!! That's a better solution then setting it as default soundcard! 8)
Thanks.
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #21 on: September 02, 2014, 11:51:18 AM »
Good then  8)

I will try tomorrow to compile upto Picore 3.14.4 The Caps, and alsaequal --versions ::

Quote
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.

Offline flixxi

  • Newbie
  • *
  • Posts: 6
Re: Equalizer, alsaequal
« Reply #22 on: December 11, 2015, 04:19:20 PM »
Sorry for resuscitating this long dead thread - but i have the very same problem.
Has anyone been able to use alsaequal? How?!

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #23 on: December 13, 2015, 09:08:48 AM »
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.
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Equalizer, alsaequal
« Reply #24 on: December 13, 2015, 11:15:12 AM »
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

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #25 on: December 13, 2015, 12:19:52 PM »
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:
Code: [Select]
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:
Code: [Select]
sudo nano /etc/asound.conf
and copy-paste this content to it:

Code: [Select]
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.

Save and exit the file.
And add it to the .filetool.lst:
Code: [Select]
sudo echo etc/asound.conf >> /opt/.filetool.lst
Open the squeezelite settings file (this part might be different on your setup):
Code: [Select]
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! :
Code: [Select]
filetool.sh -b
Do a reboot:
Code: [Select]
sudo reboot
Squeezelite should be up and running after the reboot....
Now, open the equalizer:
Code: [Select]
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!! :
Code: [Select]
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.
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Equalizer, alsaequal
« Reply #26 on: December 14, 2015, 03:26:31 AM »

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 :)
Béla
Ham Radio callsign: HA5DI

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

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: Equalizer, alsaequal
« Reply #27 on: December 14, 2015, 04:21:55 AM »
OK, will do. After I receive some test results.

So, just post an extension request here?
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Equalizer, alsaequal
« Reply #28 on: December 14, 2015, 12:27:46 PM »
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

Offline flixxi

  • Newbie
  • *
  • Posts: 6
Re: Equalizer, alsaequal
« Reply #29 on: December 14, 2015, 02:24:34 PM »
Hi Gerrelt,
your files plus the instructions worked perfectly.
Thank you very much!

(/edit: piCorePlayer 1.21b)
« Last Edit: December 14, 2015, 02:29:20 PM by flixxi »