As a result of a drive failure I have had to rebuild my Plex Server running on a Raspberry Pi, which also had PlexAmp running on it - it’s all built into a unit containing amplifiers etc.
I had been using PlexAmp V1 previously, but decided to try V2B2 again, it is up and running and I can redirect to it from phone etc.
The problem I have is it has decided it wants to use the HDMI for sound rather the the IQAudio sound card that is attached to the Pi and I can’t find how to change this. I did find a post about doing it on V1, there being a mpd.conf file in a resources dir, but this doesn’t exist under V2.
The PlexServer works fine on the IQAudio, as does using VLC.
I do wonder if this is related to device locking I saw previously and other have commented on, has it taken HDMI because the IQAudio is in use by something else?
It’s chuffing annoying as I’m having to make do with the browser being open on the Pi at the moment, but every so often it throws a wobbly then I have to log in and reload the web page.
Playing from VLC the sound is delivered to IQAudio
Playing from Plex in the browser is delivered to IQAudio
Playing from PlexAmp the sound is delivered to HDMI
pi@raspberrypi:/ $ aplay -L
default
Playback/recording through the PulseAudio sound server
null
Discard all samples (playback) or generate zero samples (capture)
jack
JACK Audio Connection Kit
pulse
PulseAudio Sound Server
sysdefault:CARD=b1
bcm2835 HDMI 1, bcm2835 HDMI 1
Default Audio Device
dmix:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Direct sample mixing device
dsnoop:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Direct sample snooping device
hw:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Direct hardware device without any conversions
plughw:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Hardware device with all software conversions
usbstream:CARD=b1
bcm2835 HDMI 1
USB Stream Output
sysdefault:CARD=Headphones
bcm2835 Headphones, bcm2835 Headphones
Default Audio Device
dmix:CARD=Headphones,DEV=0
bcm2835 Headphones, bcm2835 Headphones
Direct sample mixing device
dsnoop:CARD=Headphones,DEV=0
bcm2835 Headphones, bcm2835 Headphones
Direct sample snooping device
hw:CARD=Headphones,DEV=0
bcm2835 Headphones, bcm2835 Headphones
Direct hardware device without any conversions
plughw:CARD=Headphones,DEV=0
bcm2835 Headphones, bcm2835 Headphones
Hardware device with all software conversions
usbstream:CARD=Headphones
bcm2835 Headphones
USB Stream Output
sysdefault:CARD=IQaudIODAC
IQaudIODAC, IQaudIO DAC HiFi pcm512x-hifi-0
Default Audio Device
dmix:CARD=IQaudIODAC,DEV=0
IQaudIODAC, IQaudIO DAC HiFi pcm512x-hifi-0
Direct sample mixing device
dsnoop:CARD=IQaudIODAC,DEV=0
IQaudIODAC, IQaudIO DAC HiFi pcm512x-hifi-0
Direct sample snooping device
hw:CARD=IQaudIODAC,DEV=0
IQaudIODAC, IQaudIO DAC HiFi pcm512x-hifi-0
Direct hardware device without any conversions
plughw:CARD=IQaudIODAC,DEV=0
IQaudIODAC, IQaudIO DAC HiFi pcm512x-hifi-0
Hardware device with all software conversions
usbstream:CARD=IQaudIODAC
IQaudIODAC
USB Stream Output
I am far from ALSA knowledgeable… But it looks like your DAC is card #2, so create the /etc/asound.conf file (sudo nano /etc/asound.conf) with the 2 lines below and then reboot the Pi. It should globally set card #2 as default.
Hi again! I suspect that now you need a “mixer” in ALSA to support multiple applications playing sound… First application “steals” the interface. (all the things )
Just a little test: If you reboot the RPi. Start VLC first - will VLC then play sound? But Plexamp not?
I get no sound at all. If I right click the speaker and choose profiles and choose HDMI VLC & Plex in the browser uses that.
But for some reason whilst the Pi is on the network, can access the internet and has the IP I expect, it is now no longer available from other machines on the network, so I can’t VNC, SSH or use PlexAmp!
PlexAmp from the browser version of Plex on the Pi appears 3 times, but none of them produce output anywhere.
Wish there was some way of resetting the sound system back to basic install, or for that matter the entire OS, I’m beginning to think a reinstall might be the only approach.
Appears that you have additional network related problems. If you go for the route of reinstalling from scratch, consider following this script, provided by another forum member:
OK, after some playing around this morning, it appears the network issue is tied to one Windows 10 machine no longer being able to SSH/VNC to the Pi - while weird, it’s a relief that a network issue on the Pi hadn’t mysteriously appeared as a result of trying to fix the sound issue.
Checking the /boot/config.txt I noticed that the overlay for the IQAudio wasn’t there, adding that and commenting out dtparam=audio-on and rebooting, when I now check aplay -l only the IQAudio is listed. Under the speaker in the top right however, the only device listed for audio output is the bluetooth earphones, choosing profiles only lists the earphone also.
Playing music from anything yields nothing from the sounds card however.
Too many unknowns for me with your installation… I was not aware that you run PulseAudio on top of ALSA. I’m not familiar with PulseAudio. Also, I don’t use a desktop environment with my PI, just headless. (Actually I don’t use desktop for any of my linux machines ). So I’m not sure what is referred to or what is “behind” what you refer to as the “speaker in the top right”. Is PulseAudio necessary?
Now that you have disabled the built-in audio - have you changed the ALSA /etc/asound.conf file accordingly? I guess your DAC is now indexed as Card 0? In that case the /etc/asound.conf should be modified to:
Also, I see now from your response above, when you quote the /etc/asound.conf file, that the complete file is not include? The last part up to and including the pcm.!default section in the configuration is not included in the quote - but it is present in your file?
Again, I’m not familiar with PulseAudio at all - sorry for not being able to help out more.
Raspbian comes as default with PulseAudio these days.
I removed pulse, and for a while all was fine, then after a restart I have no sounds at all. Everything I try to play music with on the Pi says the device is already in use, trying to play via PlexAmp seems to be playing to nothing.
I currently don’t have the asound.conf, though I’m going to try adding it back before I get really cheesed off with this mess and have to pull the whole thing apart and do a fresh install.
According to @elan there is a config option in the server.json file that will allow you to select which audio device is used by Plexamp:
},
"audio: {
“device”: “device name here”
}
I have been wrangling with this for hours trying to find the right voodoo incantation to place in “device name” to get my USB Dac working, but to no avail. I used the wording from the log for mine (FiiO USB DAC E17K". But audio continues to be pushed thru the on-board headphone jack in mono.