ALSA equalizer not working Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
zackdvd
Posts: 8
Joined: Sun May 09, 2021 9:45 am

Re: ALSA equalizer not working

Post by zackdvd »

Sorry to bother you again, but shairport-sync won't play. From verbose logging:

Code: Select all

0.008741000 "audio_alsa.c:442" *warning: alsa: error -16 ("Device or resource busy") opening alsa device "default".
So I tried a bit:

Code: Select all

# sudo -u shairport-sync aplay piano2.wav
aplay: main:828: audio open error: Operation not permitted

Code: Select all

# sudo -u shairport-sync alsamixer
--> Works

Code: Select all

# sudo -u shairport-sync amixer -D eq
amixer: Mixer attach eq error: Operation not permitted
--> not working

Code: Select all

# groups shairport-sync
shairport-sync : shairport-sync audio
I may can let shairport-sync run as dietpi, but I think others will have the failure and I'm curious what it is.
My first guess was shairport-sync not in audio group, but that was fine from the beginning...


Thanks.
User avatar
MichaIng
Site Admin
Posts: 2987
Joined: Sat Nov 18, 2017 6:21 pm

Re: ALSA equalizer not working

Post by MichaIng »

You mean the above config starting with

Code: Select all

pcm.!default {
	type equal
does not work? That confirms my guess that incoming and outgoing streams must both be piped through a "type plug" plugin, which is also the solution I added to our code.

Hmm, has shairport-sync read access to the equalizer config?

Code: Select all

sudo -u shairport-sync cat /var/lib/dietpi/dietpi-config/.alsaequal.bin
ls -al /var/lib/dietpi/dietpi-config
shao
Posts: 11
Joined: Sun May 23, 2021 9:27 am

Re: ALSA equalizer not working

Post by shao »

Hi,

Same trouble with non working Alsa equalizer.

Quite a difference anyway i use an usb FDA and play sound with raspotify and it works like a charm without eq

Already tried the code posted above, (switching from hw 0 to hw 1 in my case) into asound.conf.

and added OPTIONS= --device eq into the raspotify conf file.

No sound at all.

Have to disable eq with justboom to have it back.
User avatar
MichaIng
Site Admin
Posts: 2987
Joined: Sat Nov 18, 2017 6:21 pm

Re: ALSA equalizer not working

Post by MichaIng »

Which config did you try exactly? That one worked: viewtopic.php?p=34439#p34439
shao
Posts: 11
Joined: Sun May 23, 2021 9:27 am

Re: ALSA equalizer not working

Post by shao »

Hi,
I tested the one you quoted.

raspotify status is sending this :

Code: Select all

mai 23 20:46:51 DietPi librespot[9529]:   17:   0x57b304 - <librespot_playback::
player::PlayerInternal as futures::future::Future>::poll::he6e04a5bccf94e34
mai 23 20:46:51 DietPi librespot[9529]:   18:   0x4df300 - futures::task_impl::s
td::set::hab1c1811473e3998
mai 23 20:46:51 DietPi librespot[9529]:   19:   0x4d5838 - std::sys_common::back
trace::__rust_begin_short_backtrace::h8286c5a0fd04a387
mai 23 20:46:51 DietPi librespot[9529]:   20:   0x4f04f4 - core::ops::function::
FnOnce::call_once{{vtable.shim}}::h76e6c7604d7daced
mai 23 20:46:51 DietPi librespot[9529]:   21:   0x91c940 - <alloc::boxed::Box<F>
 as core::ops::function::FnOnce<A>>::call_once::h6b7ad05f87ff90ae
mai 23 20:46:51 DietPi librespot[9529]:                        at /rustc/7eac88a
bb2e57e752f3302f02be5f3ce3d7adfb4/library/alloc/src/boxed.rs:1042
mai 23 20:46:51 DietPi librespot[9529]:   22:   0x91c940 - <alloc::boxed::Box<F>
 as core::ops::function::FnOnce<A>>::call_once::he9130e675b8d97ee
mai 23 20:46:51 DietPi librespot[9529]:                        at /rustc/7eac88a
bb2e57e752f3302f02be5f3ce3d7adfb4/library/alloc/src/boxed.rs:1042
mai 23 20:46:51 DietPi librespot[9529]:   23:   0x91c940 - std::sys::unix::threa
d::Thread::new::thread_start::h7a3f6590d8e03e95
mai 23 20:46:51 DietPi librespot[9529]:                        at /rustc/7eac88a
bb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/sys/unix/thread.rs:87
User avatar
MichaIng
Site Admin
Posts: 2987
Joined: Sat Nov 18, 2017 6:21 pm

Re: ALSA equalizer not working

Post by MichaIng »

Hmm, does playing a local file via aplay (wav) or mpg123 (mp3) so work?
shao
Posts: 11
Joined: Sun May 23, 2021 9:27 am

Re: ALSA equalizer not working

Post by shao »

Yes it does work, eq too.

Seems to be raspotify librespot issue.

Maybe OPTIONS=--device eq is not the good thing to place into raspotify conf but leaving default settings doesn't work either
User avatar
MichaIng
Site Admin
Posts: 2987
Joined: Sat Nov 18, 2017 6:21 pm

Re: ALSA equalizer not working

Post by MichaIng »

The device is still called "default". "eq" is only used by mixers to control the equalizer settings.
shao
Posts: 11
Joined: Sun May 23, 2021 9:27 am

Re: ALSA equalizer not working

Post by shao »

Ok, so there is nothing to change into raspotify conf ?
Already tried to leave it as it was.
Still no sound with it ans with the error posted previously.
Last edited by shao on Tue May 25, 2021 7:27 pm, edited 1 time in total.
User avatar
MichaIng
Site Admin
Posts: 2987
Joined: Sat Nov 18, 2017 6:21 pm

Re: ALSA equalizer not working

Post by MichaIng »

It should work OOTB. The foreground audio interface is the same, only the middle- and back-end changed. You can try to use OPTIONS=--device=default explicitly, but that indeed should be default when nothing is set.

Can you try to remove slave.channels 2 from /etc/asound.conf? Not sure why we forced stereo in the past, I removed that part to have it based on the actual audio source. Probably that is already the issue Raspotify has, when source channels are not two.

Another thing, when you copy&paste the config. Is card 0 and device 0 actually the correct sound card?
Check the IDs via aplay -l.
Post Reply