Conflict among Squeezelite, avahi and alsaequal

Ask questions about Arch Linux ARM. Please search before making a new topic.

Conflict among Squeezelite, avahi and alsaequal

Postby chiz » Tue Nov 19, 2013 6:44 am

Background
I successfully installed ALARM, Squeezebox, Squeezelite and SAMBA into a POGO-E02 using grayman4hire's excellent guide. I'm a newbie in Linux but the guide got me a working archlinux server the first time I tried setting one! Thanks grayman4hire!

Using my newly found experience (and joy) on setting up archlinux, and since I want to improve the sound coming from the Logitech Z323 speakers I connected to this squeezelite player, I immediately searched the wiki how to add a software equalizer to the system. The Z323 speakers provides good sound quality however the bass muddies the highs and no controls for treble is provided so I thought only an equalizer can resolve my issue.

ALSAEqual Installation Woes
After searching the net on how to install alsaequal, I was finally able to compile, build and install this package. Even the caps plug-in is a pain to build and install but I managed to get it built and installed and I could say it's worth the trouble.

For my benefit, in case I need to reinstall alsaequal and caps once again, and to benefit those who are also struggling in getting the same installed, I prepared the guide below:

$this->bbcode_second_pass_code('', '
# Building and installing ALSAEqual and CAPS

# download alsaequal 0.6-9 from AUR
mkdir -p /media/usb/share/build
cd /media/usb/share/build
mkdir -p alsaequal

wget https://aur.archlinux.org/packages/al/alsaequal/alsaequal.tar.gz
tar -xzf alsaequal.tar.gz
cd alsaequal

# Edit the PKGBUILD file for ARM build:
# Replace line arch=(i686 x86_64) with arch=('arm')
nano PKGBUILD

# if not installed yet in your system, get necessary build tools for building alsaequal
pacman -S binutils ladspa patch make gcc python

# compile and build alsaequal
makepkg --asroot

# install freshly built alsaequal :)
pacman -U alsaequal-0.6-9-arm.pkg.tar.xz

# edit alsa config file to use the equalizer
nano /etc/asound.conf

# before we can use alsaequal, we need to install CAPS (C Audio Plugin Suite)
mkdir -p /media/usb/share/build/caps
cd /media/usb/share/build/caps

# Either build the caps package yourself
# or download the package I just compiled
# wget https://www.dropbox.com/s/xpw1xq9ugzjyiyj/caps-0.4.5-1-arm.pkg.tar.xz

# Below are the steps for building the caps package yourself
#
# download the PKGBUILD file (revised for ARM/pogoplug)
# Note: This is for caps v0.4.5. I can't compile v0.9.10 due to missing xxmintrin.h
wget https://www.dropbox.com/s/8vc4va8y8g0ocp2/PKGBUILD

# build caps! - this will take a while
makepkg --asroot

# install freshly built caps package :)
pacman -U caps-0.4.5-1-arm.pkg.tar.xz

# check if alsaequal is successfully installed
# If you see the equalizer window, congratulations and you can now configure your equalizer!
alsamixer -D equal

# Test out some mp3's using the equalizer.
# Open another putty window and play an mp3 file using alsaequal as output device
# Try changing the equalizer settings on the other putty window
mpg123 -a equal some-music.mp3
')

Alsaequal does make a huge difference in sound quality!
I can now hear the midranges and highs while having just enough amount of bass. I can already imagine, changing the equalizer settings depending on my mood and type of music I want to listen to. :mrgreen:

For those wanting to find out the best alsaequal settings, you may refer to this guide that talks about equalizer basics.

Squeezelite, avahi and alsaequal conflicts
Now, this is the tricky part. While I was able to use the equalizer using mpg123 and squeezelite in the command line, e.g., squeezelite -o equal, I can't get squeezelite use alsaequal when started as a service.

Below is my squeezelite.service file:
$this->bbcode_second_pass_code('', '[Unit]
Description=Squeezelite lightweight headless squeezebox emulator
After=sound.target
Requires=avahi-daemon.service
After=network.target
After=avahi-daemon.service

[Service]
ExecStart=/usr/local/bin/squeezelite -n SqzLite1 -m 00:00:00:00:00:00 -o equal
Restart=always

[Install]
WantedBy=multi-user.target')

This is the result of systemctl command:

$this->bbcode_second_pass_code('', '[root@alarm ~]# systemctl
UNIT LOAD ACTIVE SUB JOB DESCRIPTION
.
.
.
avahi-daemon.service loaded activating start start Avahi mDNS/DNS-SD Stack
.
.
.
.
squeezelite.service loaded inactive dead start Squeezelite lightweight headless
.
.
.
.
')

But if I remove the -o equal in the Squeezelite service file, I can get squeezelite to run as service but I don't get the sound routed to the equalizer. :(

Anyone else having the same issue? Appreciate any help on this.
Last edited by chiz on Fri Dec 06, 2013 3:26 am, edited 1 time in total.
chiz
 
Posts: 7
Joined: Fri Nov 15, 2013 7:04 am

Re: Conflict among Squeezelite, avahi and alsaequal

Postby grayman4hire » Wed Nov 20, 2013 1:39 am

Thanks for the kudos!

A few questions...

- What does the "-o equal" in squeezelite do?
- What's the output of "systemctl status squeezelite"
- What USB DAC are you using? Just curious, because if you're using a cheap <$2, your sound quality will definitely suffer.

BTW, if you use a MAC Address of 00:04:20:XX:XX:XX, you can stream Pandora to Squeezelite. Otherwise it doesn't work.
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA

Re: Conflict among Squeezelite, avahi and alsaequal

Postby chiz » Wed Nov 20, 2013 3:19 am

Hi grayman4hire,

Thanks for the reply! Your guide actually made one archlinux fan in me! I've never bothered to look into Linux but it's your guide that got me to try linux. Notice the influence on the mini how-to that I posted? :D

Anyways, see below answers to your questions:

$this->bbcode_second_pass_quote('', '-') What does the "-o equal" in squeezelite do?

Taken from the Squeezelite Project Home page:
.
.
-o <output device> Specify output device, default "default"

So basically, I was successful in running Squeezelite using "default" sound device or through alsaequal. I can verify this since I can dynamically change the equalizer settings on another putty window and notice the dramatic change in the sound quality.

$this->bbcode_second_pass_quote('', '-') What's the output of "systemctl status squeezelite"

$this->bbcode_second_pass_code('', '[root@alarm ~]# systemctl
UNIT LOAD ACTIVE SUB JOB DESCRIPTION
.
.
.
avahi-daemon.service loaded activating start start Avahi mDNS/DNS-SD Stack
.
.
.
.
squeezelite.service loaded inactive dead start Squeezelite lightweight headless
.
.
')

If I modify the squeezelite.service file and remove the "-o equal" parameter, I can get Squeezelite to run in the background. Below is the systemctl output:
$this->bbcode_second_pass_code('', 'UNIT LOAD ACTIVE SUB JOB DESCRIPTION
.
.
avahi-daemon.service loaded failed failed Avahi mDNS/DNS-SD Stack
.
.
.
logitechmediaserver.service loaded active running Logitech Media Server Daemon
.
.
squeezelite.service loaded active running Squeezelite lightweight headless squeezebox emulator')

$this->bbcode_second_pass_code('', '- What USB DAC are you using? Just curious, because if you're using a cheap <$2, your sound quality will definitely suffer.')
It's the Behringer U-CONTROL UCA202 DAC as you recommended! :D I picked this one since it's plug-n-play as you tested it.

$this->bbcode_second_pass_quote('', 'B')TW, if you use a MAC Address of 00:04:20:XX:XX:XX, you can stream Pandora to Squeezelite. Otherwise it doesn't work.

Thanks for this tip! I'll try this.

Thanks again in advance for your help!
chiz
 
Posts: 7
Joined: Fri Nov 15, 2013 7:04 am
Top

Re: Conflict among Squeezelite, avahi and alsaequal

Postby grayman4hire » Fri Nov 22, 2013 6:49 pm

@chiz,

What's the output of "systemctl status squeezelite" (not just "systemctl").
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA

Re: Conflict among Squeezelite, avahi and alsaequal

Postby chiz » Sat Nov 23, 2013 4:21 am

If the "-o" is omitted in the service file:
$this->bbcode_second_pass_code('', '[root@alarm ~]# systemctl status squeezelite
squeezelite.service - Squeezelite lightweight headless squeezebox emulator
Loaded: loaded (/etc/systemd/system/squeezelite.service; enabled)
Active: active (running) since Wed 1969-12-31 17:00:25 MST; 43 years 10 months ago
Main PID: 131 (squeezelite)
CGroup: /system.slice/squeezelite.service
└─131 /usr/local/bin/squeezelite -n SqzLite1 -m 00 04 20 00 89 e1

Dec 31 17:00:25 alarm systemd[1]: Started Squeezelite lightweight headless squeezebox emulator.
')

Then I edited the squeezelite service file to add the "-o" parameter:
$this->bbcode_second_pass_code('', '
[root@alarm ~]# nano /etc/systemd/system/squeezelite.service
[root@alarm ~]# systemctl stop squeezelite
Warning: Unit file of squeezelite.service changed on disk, 'systemctl daemon-reload' recommended.

# I got a warning so I followed the the prompt
[root@alarm ~]# systemctl daemon-reload

[root@alarm ~]# systemctl start squeezelite

[root@alarm ~]# systemctl status squeezelite -l
squeezelite.service - Squeezelite lightweight headless squeezebox emulator
Loaded: loaded (/etc/systemd/system/squeezelite.service; enabled)
Active: inactive (dead) (Result: core-dump) since Fri 2013-11-22 21:14:46 MST; 120ms ago
Process: 660 ExecStart=/usr/local/bin/squeezelite -n SqzLite1 -m 00:04:20:00:89:e1 -o equal (code=dumped, signal=ABRT)
Main PID: 660 (code=dumped, signal=ABRT)
CGroup: /system.slice/squeezelite.service

Nov 22 21:14:35 alarm systemd[1]: squeezelite.service holdoff time over, scheduling restart.
Nov 22 21:14:35 alarm systemd[1]: Stopping Squeezelite lightweight headless squeezebox emulator...
Nov 22 21:14:35 alarm systemd[1]: Starting Squeezelite lightweight headless squeezebox emulator...
Nov 22 21:14:35 alarm systemd[1]: Started Squeezelite lightweight headless squeezebox emulator.
Nov 22 21:14:35 alarm systemd[1]: squeezelite.service: main process exited, code=dumped, status=6/ABRT
Nov 22 21:14:35 alarm systemd[1]: Unit squeezelite.service entered failed state.
[root@alarm ~]#')
chiz
 
Posts: 7
Joined: Fri Nov 15, 2013 7:04 am


Return to User Questions

Who is online

Users browsing this forum: No registered users and 5 guests