Anyone using a Raspberry Pi for optical/digital audio out?

Soldato
Joined
18 Oct 2002
Posts
6,752
I work from home on my laptop but only my desktop is plugged into my amplifier via optical, which is a bit of a power drain being that it's overclocked. I was wondering whether anyone here had got Spotify setup on a Rasberry Pi and outputted via optical / digital output? I figure a digital output would be better so i'm not spending money on an expensive DAC and my amplifier's DAC is great anyway. I can see there are options of a raspberry pis and a few add-on boards but hoped someone might have dared to tread this path already :)

B@
 
Soldato
Joined
6 Sep 2016
Posts
9,504
Guess willing to dork around with pi yeah they ok. If you're into using terminal just to get a audio player setup.

But I use squeezebox with a nas, works well and easy.

I do have a pi3 but I'd only use it for low power computer. Install raspian and use it for browsing. Tried the audio side of it and needed to learn Linux command line can't auto mount on every reboot unless indepth terminal code blah blah so put it in the cupboard.
 
Associate
Joined
28 May 2007
Posts
634
I'm trying to get something similar working at the moment. Got an original raspberry pi (it was in the drawer going spare!). Got volumio on it and using the onboard line-out it seems to be working well - sound quality is the standard grim onboard pi quality though, so I'm waiting for a HDMI to TOSLINK converter to arrive in the post. Will see if that's any better for a budget system!
 
Soldato
OP
Joined
18 Oct 2002
Posts
6,752
I'm trying to get something similar working at the moment. Got an original raspberry pi (it was in the drawer going spare!). Got volumio on it and using the onboard line-out it seems to be working well - sound quality is the standard grim onboard pi quality though, so I'm waiting for a HDMI to TOSLINK converter to arrive in the post. Will see if that's any better for a budget system!
yes! perfect :) please update when you get the chance as outputting via HDMI to Digital Out converter is exactly what i'm looking to do now.

B@
 
Associate
Joined
28 May 2007
Posts
634
yes! perfect :) please update when you get the chance as outputting via HDMI to Digital Out converter is exactly what i'm looking to do now.

B@

So far it seems to work mostly fine! I've overclocked it a little bit (I mean, check the website we're on..) which seems to have helped it out. Also I found it was crashing a bit, but swapped the power cable to a better one and that seems to have fixed it.

Here's my /boot/config.txt with the overclock set:
Code:
initramfs volumio.initrd
arm_freq=950
sdram_freq=500
over_voltage=2


boot_delay=4
gpu_mem=16
max_usb_current=1
dtparam=audio=on
audio_pwm_mode=2
dtparam=i2c_arm=on
disable_splash=1
hdmi_force_hotplug=1

include userconfig.txt

It's currently playing Spotify via the spotify connect plugin, just appears as a device in the Spotify devices screen. I did once manage to trip it up; switched too quickly from spotify to playing from my NAS and it started playing both. A reboot cured that, but the takeaway is that it's not entirely without fault. Not sure if that's down to volumio itself or the fact I'm on a low power system with limited ram (Volumio recommend 1GB, this pi has 256MB - minus 16 for the GPU of course using that config).

Still waiting for that HDMI to toslink adapter to arrive, the sound quality is noticeably a bit crackly and distorted from the headphone socket.
 
Soldato
OP
Joined
18 Oct 2002
Posts
6,752
So far it seems to work mostly fine! I've overclocked it a little bit (I mean, check the website we're on..) which seems to have helped it out. Also I found it was crashing a bit, but swapped the power cable to a better one and that seems to have fixed it.

Here's my /boot/config.txt with the overclock set:
Code:
initramfs volumio.initrd
arm_freq=950
sdram_freq=500
over_voltage=2


boot_delay=4
gpu_mem=16
max_usb_current=1
dtparam=audio=on
audio_pwm_mode=2
dtparam=i2c_arm=on
disable_splash=1
hdmi_force_hotplug=1

include userconfig.txt

It's currently playing Spotify via the spotify connect plugin, just appears as a device in the Spotify devices screen. I did once manage to trip it up; switched too quickly from spotify to playing from my NAS and it started playing both. A reboot cured that, but the takeaway is that it's not entirely without fault. Not sure if that's down to volumio itself or the fact I'm on a low power system with limited ram (Volumio recommend 1GB, this pi has 256MB - minus 16 for the GPU of course using that config).

Still waiting for that HDMI to toslink adapter to arrive, the sound quality is noticeably a bit crackly and distorted from the headphone socket.
Hmmm ok - it's promising though. I don't mind the odd restart and the pi zero w should improve on the specs a little too. Does it boot straight into Spotify or do you need to open it up each time after a reboot?

B@
 
Associate
Joined
28 May 2007
Posts
634
Hmmm ok - it's promising though. I don't mind the odd restart and the pi zero w should improve on the specs a little too. Does it boot straight into Spotify or do you need to open it up each time after a reboot?

B@

So with the spotify connect plugin enabled, it simply appears as a speaker that I can send Spotify to on my phone. Rather like a chromecast icon appears. I'm not home so I can't explain this with screenshots, but when I get home I'll try to remember to take some!

Essentially though the pi has no screen connected, I alter its settings via its web server (much like a router), but in regular use I just use my phone, connect to the wifi & tell spotify to cast to 'Volumio' and that's the end of it!

If you've got any pi's already, I'd suggest getting it installed on one of those, then when you're happy you could purchase the pi zero w as an upgrade :)
 
Soldato
OP
Joined
18 Oct 2002
Posts
6,752
So with the spotify connect plugin enabled, it simply appears as a speaker that I can send Spotify to on my phone. Rather like a chromecast icon appears. I'm not home so I can't explain this with screenshots, but when I get home I'll try to remember to take some!

Essentially though the pi has no screen connected, I alter its settings via its web server (much like a router), but in regular use I just use my phone, connect to the wifi & tell spotify to cast to 'Volumio' and that's the end of it!

If you've got any pi's already, I'd suggest getting it installed on one of those, then when you're happy you could purchase the pi zero w as an upgrade :)
ok cool :)

I don't have any Pis just yet, the zero w seems to be out of stock pretty much everywhere so i'm looking at Pi 3s on ebay which will hopefully come in at around the same sort of price with charger, case, memory card etc..

Any joy with the HDMI splitter?

B@
 
Last edited:
Soldato
OP
Joined
18 Oct 2002
Posts
6,752
Just to update. I've got my pi and just used raspotify (Spotify connect) to play stuff from Spotify and it works great and means I can still use the pi for other things if I want. Just waiting on a hdmi splitter too as I'm using the potato headphone jack atm
 
Associate
Joined
28 May 2007
Posts
634
HDMI splitter finally arrived! Using one that provides optical out, just connected it up and it's sounding heaps better. Optical means that I've got no risk of any nasty ground loops or similar.

For using mostly stuff that I had lying around the house already, I'm definitely a happy chappy!
 
Soldato
OP
Joined
18 Oct 2002
Posts
6,752
HDMI splitter finally arrived! Using one that provides optical out, just connected it up and it's sounding heaps better. Optical means that I've got no risk of any nasty ground loops or similar.

For using mostly stuff that I had lying around the house already, I'm definitely a happy chappy!
I'm gonna have to use the digital coax output on the HDMI extractor, as my PC is already using the single optical spdif input on my amp, and the talk of ground loops has now made me nervous haha. Worse comes to worse I'll get an optical spdif switch i suppose!

B@
 
Associate
Joined
28 May 2007
Posts
634
I'm gonna have to use the digital coax output on the HDMI extractor, as my PC is already using the single optical spdif input on my amp, and the talk of ground loops has now made me nervous haha. Worse comes to worse I'll get an optical spdif switch i suppose!

B@

Don't sweat it - the usual cause would likely be a cheapo USB power supply; branded ones from decent phones are usually okay, so bin off that cheapo you got for a quid in the pound shop and use an Apple / Samsung / Sony one. Equally, if your receiver has a USB socket on the back of it, see if that'll provide sufficient power for the pi & if it's always on. If so, job done!
 
Back
Top Bottom