Q: What is the right way to configure audio interface on a PlexAmp headless RPi?

I’ve got a question regarding the config of the audio interface on my PlexAmp headless RPi:

My DAC is connected to one of the USB ports of the RPi.

Running cat /proc/asound/cards returns results similar to this:

0 [Headphones ]: bcm2835_headpho - bcm2835 Headphones bcm2835 Headphones
1 [vc4hdmi0 ]: vc4-hdmi - vc4-hdmi-0 vc4-hdmi-0
2 [vc4hdmi1 ]: vc4-hdmi - vc4-hdmi-1 vc4-hdmi-1
3 [DAC51060310 ]: USB-Audio - ADI-2 DAC (51060310) RME ADI-2 DAC (51060310) at usb-0000:01:00.0-1.1, high spe

So I created a file /etc/asound.conf with the line:

defaults.pcm.card 3

I tend to shutdown the RPi after use and run into the problem that after restart the number of the USB port connected to my DAC changes.

I know that there is a way to modify the standard audio out by means of the PlexAmp remote control, but this option is not available on the iPad version of PlexAmp.

What am I doing wrong? Does anyone know of a better way to configure the audio interface that works after a shutdown as well?

i’ve had similar issue … as i understand it, linux audio/alsa doesn’t have a standard way of forcing persistent device order across the various card types (usb, on board, etc.)

you can disable hdmi audio on a Pi by finding/editing the line below in /boot/config.txt and rebooting …

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d,noaudio

i think disabling the on-board headphone output requires different changes (blacklisting the snd_bcm2835 module) … haven’t tried this myself

also note, you can use a browser app on the iPad to visit the headless web interface and adjust playback settings

1 Like

Thanks a lot, I will give it a try … but I guess I have to adjust the dtoverlay= parameters to the ones showing up on my RPi?

updated post above … comment line to search for in /boot/config.txt wasn’t showing up initially … hope that helps :slight_smile:

1 Like

Here’s what is working for me on my rpi4 with Raspberry Pi OS Lite (64-bit):

  1. Allow USB audio device to be the default sound card by editing /lib/modprobe.d/aliases.conf and commenting out the line options snd-usb-audio index=-2

  2. Don’t load the onboard sound device by creating the file /etc/modprobe.d/blacklist-snd_bcm2835.conf with the following content: blacklist snd_bcm2835

  3. Don’t allow onboard hdmi to be a sound device by editing /boot/config.txt and changing the line dtoverlay=vc4-kms-v3d to instead read dtoverlay=vc4-kms-v3d,noaudio

Then reboot and if all goes well, your USB dac will be the default (and only) sound card available on your pi.

5 Likes

Perfect! Wonderful! Lovely!

cat /proc/asound/cards is now listing only one sound card, the DAC attached to one of the USB port!

Thank you very, very much, you solved my problem, highly appreciated!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.