jbuski / squeezelite

Automatically exported from code.google.com/p/squeezelite
Other
0 stars 0 forks source link

Feature request: disable USB on poweroff #66

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Currently as soon as Squeezelite is started it will send silence (all zeros) 
out the USB port. It seems it would be better to send nothing out the USB port 
when squeezelite is "powered off" 

The LMS web interface and iPeng etc have a power on/off button for the player. 
Even though squeezelite is not a hardware player it can receive the "power off" 
command.

One of my (VortexBox) forum a user has a Wavelength Proton USB DAC. This is a 
battery powered DAC that recharges it battery through the USB port when it's 
not in use. Because with Squeezelite the output is always "on" it will never 
recharge.

Original issue reported on code.google.com by and...@vortexbox.org on 8 Apr 2014 at 1:00

GoogleCodeExporter commented 8 years ago
Hi Andrew

Squeezelite will disable the audio output if the player is powered off.  What 
is currently not supported is avoiding opening the output device for the short 
period of time from when squeezelite starts to when it connects to a server and 
gets the message that the player is "powered off".  If this is a problem then I 
could look at it, but if the player is permanently connected to the server I am 
not sure this is a serious issue?

Original comment by trio...@btinternet.com on 8 Apr 2014 at 7:34

GoogleCodeExporter commented 8 years ago
After reading email chain above, I have experimented to use a TosLink optical 
splitter to connect my TV and server running LMS+squeezelite to a single input 
on my amp. This should work, as long as only one of the optical links is 
active. Initially the optical output of my server is off, when i start SL, it 
turns on. Turning SL off through web interface does not deactivate the optical 
link. Neither does killing the SL process. In Alsa Mixer I can see the volume 
for the SPDIF is 00. When switching SPDIF volume to [M]ute in Alsa Mixer, the 
optical link goes off again. I would be interested in looking into coding a 
mixer call to (un)mute the SPDIF output when SL switches "power" state.

Any suggestions on how to accomplish the desired effect to deactivate the SPDIF 
when SL is "powered off"?

Original comment by dave.mun...@gmail.com on 9 Apr 2014 at 1:57

GoogleCodeExporter commented 8 years ago
Are you using hw:CARD=XXXX as the squeezelite output?  I suspect that anything 
going through an alsa mixer may keep the output port open.

Original comment by trio...@btinternet.com on 12 Apr 2014 at 9:14

GoogleCodeExporter commented 8 years ago
No but I'm using plughw:0,0. I think this is the same thing.

Original comment by and...@vortexbox.org on 13 Apr 2014 at 4:35

GoogleCodeExporter commented 8 years ago
check with -d output=debug, is the device opened and closed; if so this is the 
best squeezelite can do, the rest is subject to the alsa config you have.

Original comment by trio...@btinternet.com on 13 Apr 2014 at 6:56