(resolved) asound.conf for alsaequal

Hello,

I have Squeezelite running fine on DietPi under the added “pi” user in the audio group

However, when I try to add alsaequal it never works.
I changed asound.conf as per Gerrelt’s script :

ctl.equal {
type equal;
controls “/home/pi/.alsaequal.bin”
}

pcm.plugequal {
type equal;
slave.pcm “plughw:0,0”;
controls “/home/pi/.alsaequal.bin”
}

pcm.equal {
type plug;
slave.pcm plugequal;
}

I than rebooted the pi.

alsamixer -D equal is displaying the interface.
Squeezelite is working with the I2S soundcard

Typing aplay -l
I get :
**** Liste des Périphériques Matériels PLAYBACK ****
carte 0: sndrpihifiberry [snd_rpi_hifiberry_dac], périphérique 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []
Sous-périphériques: 1/1
Sous-périphérique #0: subdevice #0

When typing :
sudo /usr/bin/squeezelite-armv6hf -l
I get :
Output devices:
null – Discard all samples (playback) or generate zero samples (capture)
default:CARD=sndrpihifiberry – snd_rpi_hifiberry_dac, – Default Audio Device
sysdefault:CARD=sndrpihifiberry – snd_rpi_hifiberry_dac, – Default Audio Device

no equal ?

If I do :
sudo /usr/bin/squeezelite-armv6hf -o default:CARD=sndrpihifiberry

I get sound playing through the I2S Sound Card but no equalisation

if I do :
sudo /usr/bin/squeezelite-armv6hf -o sysdefault:CARD=sndrpihifiberry

I get sound playing through the I2S Sound Card but no equalisation

if I do :
sudo /usr/bin/squeezelite-armv6hf -o equal

I get the following error :
*** glibc detected *** /usr/bin/squeezelite-armv6hf: double free or corruption (!prev): 0x01559078

Any idea of what is wrong ?

Best regards,
Jean

Hi Jean,

Going to be honest, i have no idea why “I get sound playing through the I2S Sound Card but no equalisation”. I dont own a Hifiberry, so i cant help you debug it either.

The only thing I can suggest, is to try research this issue: http://forums.slimdevices.com/showthread.php?97046-Announce-Squeezelite-a-small-headless-squeezeplay-emulator-for-linux-(alsa-only)&s=3976e668a616a0efadd8b3c2921237d0&p=771767&viewfull=1#post771767 and/or post the issue on the Squeezelite forums.

Also, does this error replicate when using the official Raspbian?

Hello,

Thank you for your reply.

I had it working, but can’t recall if it were under Raspbian or a previous version of Dietpi.
But for sure it was on a Raspberry B v1.

I have also posted the same on Guerrelt’s forum, he has no idea either…

Best regards,
Jean

Hello,

I’m still stuck at this.

Just for the sake of it I have install the latest Raspbian image and I can make the “equal” soundcard working.
Then I have reInstall DietPi, and made the exact same procedure to get the "equal soundcard but no way.

It is behaving as if asound.conf (sudo nano -c /etc/asound.conf) is not taken into acount by DietPi.

Please reder to the attachment the result of sudo /usr/bin/squeezelite-armv6hf -l with both DietPi and Raspbian

Any idea of what I could do to sort this out ?
I really would like to use DietPi as it is much better than Raspbian.

Best regards,
Jean


Hi Jean,

  • Did you install Squeezebox via dietpi-software, or manually?
  • Was there any specific reason for creating the pi user?

Can you paste the following results please:

aplay -l
aplay -L

Thanks.

Hello,

In the first attent on Dietpi I did the full install Squeezeserver from DietPi, Squeezelite manually.
The Second attent on Dietpi, I Solely installed Squeezelite manually.

I did it under the Pi user as on the long run I want to make DietPi Real Time and read somewhere on LinuxAudio that the music process should not be under Root (don’t know why, though) : Raspberry Pi and realtime, low-latency audio [Linux-Sound]

Please find here with the aplay -l and aplay -L results from the Root DietPi config (similar to the Pi DietPi)


Ok, so the hardware and alsa are fine. Alsaequal is the issue.

What is this bin file for?

controls “/home/pi/.alsaequal.bin”

Have you tried forcing the default audio device to use plugequal?

ctl.equal {
  type equal;
}

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

pcm.!default {
  type plug;
  slave.pcm plugequal;
}

How are you installing AlsaEqual, compile or apt-get install?
Have you installed the dependencies as per this page?

If none of the above work, can you do the following as a test:

  • Write a new image of dietpi
  • power on, etc.
  • when dietpi-software appears, select and install SqueezeBox
  • Install alsaequal as you did on the official raspbian.
  • Setup your asound.conf as you did in the raspbian installation.
  • Setup the config.txt to enable your hifiberry card and disable snd-bcm2835 in /etc/modules.
  • Do nothing else to the system. Leave it as root, dont apply any online tutorials.
  • Now test your soundcard.

In the mean time, i will install and test alsaequal on my RPi. I dont own a hifiberry card, but i’ll see if I can replicate your issue using the onboard card.

Hello,

Thank you for your help and patience.

I’ll redo a fresh install as per your instructions asap.
I think .alsaequal.bin is the place where the equalisation is saved.

Yes I have tried forcing the use but it return a glitch error as per first post
"if I do :
sudo /usr/bin/squeezelite-armv6hf -o equal

I get the following error :
*** glibc detected *** /usr/bin/squeezelite-armv6hf: double free or corruption (!prev): 0x01559078"

I have installed alsaequal already compiled as per http://www.gerrelt.nl/RaspberryPi/wordpress/equalizer/

If you want, I can send you for free an I2S sound card (I have one or two laying around that wher for Pi B V1, but can be wired to work on Pi B V2).

If it is ok with you, send me by PM your address for the shipment.

Best regards,
Jean

Hi Jean,

Thats very kind of you to offer your spare I2S, it would make this alot easier at my end to debug :slight_smile:.

I’d like to run some more tests on the onboard RPi card 1st, so please keep the card for now. If I can get alsaequal to work on the RPi’s internal card, it should be easier to gets yours up and running. Currently, i’am leaning on the side of missing libs or incorrect asound.conf.

I’ll let you know how I get on, however, it may be a day or two before I will have the time to have an indepth look.

Thanks Jean,
Dan

Hello Dan,

I have made a new fresh install.
Still not working although the problem is not anymore the same…

What I did, I installed alsa manually not from the dietpi config options.
Now I see my asound.conf equal and mono
however alsamixer -D equal is not anymore working !

root@DietPi:~# alsamixer -D equal
Failed to open controls file:/home/pi/.alsaequal.bin.
cannot open mixer: Operation not permitted

root@DietPi:~# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
equal
mono
plugequal
default:CARD=sndrpihifiberry
snd_rpi_hifiberry_dac,
Default Audio Device
sysdefault:CARD=sndrpihifiberry
snd_rpi_hifiberry_dac,
Default Audio Device
dmix:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Direct sample mixing device
dsnoop:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Direct sample snooping device
hw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Direct hardware device without any conversions
plughw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Hardware device with all software conversions
default:CARD=Device
USB PnP Sound Device, USB Audio
Default Audio Device
sysdefault:CARD=Device
USB PnP Sound Device, USB Audio
Default Audio Device
front:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
Front speakers
surround21:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
Direct sample mixing device
dsnoop:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
Direct sample snooping device
hw:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
Direct hardware device without any conversions
plughw:CARD=Device,DEV=0
USB PnP Sound Device, USB Audio
Hardware device with all software conversions

I suppose it will work one day or another…

Thank you Dan for your efforts.

Ok, I fixed this one !
my asound.conf is referring to /home/pi/.alsaequal.bin
And as per your recommendation I did every steps as root, so, of course I don’t have /home/pi

I changed the directory to root et voilà !

Oh, and I forgot to mention, that this time I choose Jessie as this is the one I had working with the regular Raspbian.

It looks like I was too optimistic…

I have moded my asound.conf as per previous post
And this ok but, still cant make squeezelite working with my asound.conf
Squeezelite work by itself but not with my plugins

root@DietPi:~# /usr/bin/squeezelite-armv6hf -o equal
Failed to open controls file:/home/pi/.alsaequal.bin.
[18:58:28.483271] test_open:124 playback open error: Operation not permitted
[18:58:28.483675] output_init_common:373 unable to open output device

This time I don’t know what to do ???

Thank you Dan and anybody for any idea…

Whatever the result here my offer for a free I2S sound card is still valid Dan !

Ok, now it works, I’m probably too old, I had to modify the directory at two different lines.

So this threads close here !

Don’t loose your time with this anymore Dan !

And don’t forget to send a mail should you want me to send you an I2S sound card.

Best regards,
Jean

Just a quick reply before heading off for the night :slight_smile:

You need to change the following in /etc/asound.conf:
/home/pi/.alsaequal.bin
to
/root/.alsaequal.bin

I’am out of time for today, but I will run the tests at my end tomorrow and get back to you. And thanks for the continued offer, appreciate it.

Haha, i just posted, but you beat me to it. Great to hear its working. Let me know if you have further issues. Thanks Jean for the offer, i’ll be in touch :slight_smile: