Can Shairport coexist with LMS+Squeezelite?

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Can Shairport coexist with LMS+Squeezelite?

Post by Fourdee »

Sciamano wrote:Result of 'aplay -l':

I can't post the results of the speaker test because at the moment I'm not physically present where the Raspberry Pi is. :)
Yep, thats definitely card 1. Should be working fine, bizarre.

Think we'll need to wait for speaker-test results on this one. :)
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: Can Shairport coexist with LMS+Squeezelite?

Post by Sciamano »

Here you go... it seems like the hardware is kept hostage :D

Code: Select all

root@DietRasPi:~# speaker-test -c 2 -D hw:1,0

speaker-test 1.0.28

Playback device is hw:1,0
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Playback open error: -16,Device or resource busy
EDIT: wait a sec... the speaker-test is not working, but somehow now both shairport and squeezelite are working at the same time!! I managed to stream Spotify from my phone to the Pi. The only problem is that it's not a good stream: it's choppy (it works intermittently for a few seconds).
Janis
Posts: 28
Joined: Sun Oct 30, 2016 10:42 am

Re: Can Shairport coexist with LMS+Squeezelite?

Post by Janis »

Sciamano wrote:As Fourdee explained above, it can be done by enabling software mixing in ALSA.
1. SW mixing is degradation audio quality.
2. I think this solution is wrong path, as it doesn't address the root cause.

In my opinion the Squeezelite behaviour should be fixed - why it is blocking for exclusive use the sound card while not playing?, and with this not permitting Shairport to play on it?
Isn't this is root cause of the problem.

FYI, I'm running two other RPIs with Roon Bridge plus Shairport nicely coexisting in same RPI and allowing reach other to play when not playing itself. Root RAAT protocol is high performing, and great tool.
https://roonlabs.com

Only problem I have is RPI Zero with old ARM6, where Roon is not compiled, and I have to use Squeezelite workaround...

FYI, DietPi is highly popular among Roon community. Thank you for great job you guys are doing!
https://community.roonlabs.com/t/dietpi ... e/13908/62

Janis
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: Can Shairport coexist with LMS+Squeezelite?

Post by Sciamano »

I agree that 'freeing' the sound card when not in use would be the right path to follow, but I have no idea how this could be achieved.
Janis
Posts: 28
Joined: Sun Oct 30, 2016 10:42 am

Re: Can Shairport coexist with LMS+Squeezelite?

Post by Janis »

Well I guess the issue should be documents and fix requested to guys that created Squeezelite?
Janis
Posts: 28
Joined: Sun Oct 30, 2016 10:42 am

Re: Can Shairport coexist with LMS+Squeezelite?

Post by Janis »

I was searching Squeezelite set-up on found on its site following
https://github.com/ralph-irving/squeezelite

Squeezelite v1.8, Copyright 2012-2015 Adrian Smith, 2015-2016 Ralph Irving.
Usage: squeezelite [options]
-C <timeout> Close output device when idle after timeout seconds, default is to keep it open while player is 'on'

So, with this option, if I understand correctly, we should be able to release the sound card after lest say 5 sec of not being used by squeezelite

The problems I have on DietPi though:
1. -C <timeout> option doesn't show up in the installed squeezelite option - don't understand why?
2. Also I don't know where are autolaunch script of squeezelite to change its default launch configuration?

Janis
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: Can Shairport coexist with LMS+Squeezelite?

Post by Sciamano »

Janis wrote: The problems I have on DietPi though:
1. -C <timeout> option doesn't show up in the installed squeezelite option - don't understand why?
2. Also I don't know where are autolaunch script of squeezelite to change its default launch configuration?

Janis
Default options are stored in /etc/defaults/squeezelite, I think.
Janis
Posts: 28
Joined: Sun Oct 30, 2016 10:42 am

Re: Can Shairport coexist with LMS+Squeezelite?

Post by Janis »

With v138 update, now it is fixed - both squeezelte and shairport nicely coexist and play one after other on the same Raspberry Pi.

THANK YOU Fourdee for getting it fixed so prompt !
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Can Shairport coexist with LMS+Squeezelite?

Post by Fourdee »

Janis wrote:With v138 update, now it is fixed - both squeezelte and shairport nicely coexist and play one after other on the same Raspberry Pi.

THANK YOU Fourdee for getting it fixed so prompt !
No worries, good to hear :)
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: Can Shairport coexist with LMS+Squeezelite?

Post by Sciamano »

That's great news!
Is upgrading enough to enjoy the fixes or do we need to reinstall squeezelite and/or shairport?
And what about the edits to asound.conf? Do we bring the file back to its original state (no dmix)?
Thanks!
Post Reply