Note
Note: The following did not work but I took the notes to review if we ever revisit this

My father wanted to have a Raspberry Pi setup on his television for friends to come over and watch Youtube videos as well as displaying the lyrics to music being played on his music system. Since he uses his own DAC, we want to pipe the audio out of the Raspberry Pi to said device.

Making The Television Display Readable At A Distance

One of the first things we did was enabled “pixel doubling” on the Raspberry Pi to make the UI more readable on the TV.

Outputting Audio Through The USB

Then we ran the command $ lsusb to find out which USB device the Raspberry Pi was seeing the DAC connected too. Ours was

Bus 001 Device 007: ID 6b42:0042.

We discovered this by running $ lsusb with the DAC unplugged and running it again with it plugged in.

We than ran $ aplay -a to see the media devices:

card 1: MSBMQA1v2 [MSB-MQA-1v2], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

this was the DAC we wanted to utilize.

We modified the configuration file responsible for selecting the default media output using the command

sudo vim /usr/share/alsa/alsa.conf

We modified the lines from:

defaults.ctl.card 0
defaults.pcm.card 0
defaults.ctl.card 1
defaults.pcm.card 1

where the 1 comes from the card number above when we ran $ aplay -a.

We than added the following text to the file /etc/asound.conf, which didn’t exist before.

pcm.!default {
 type hw
 card 1
}

ctl.!default {
 type hw
 card 1
}

Verifying Settings

The following command will output the settings of your selected audio output device

$ amixer

Testing Audio Output

We used the following two commands to test the audio output

One

  • $ speaker-test -c2

Two

  • $ wget https://www.kozco.com/tech/piano2.wav
  • $ aplay piano2.wav

Install Roon Controller

We followed this project’s README.md to install the web controller.

I added cd [path to cloned repository && npm start] to a ~/.rc.local script and made it executable with chmod +x ~/.rc.local to have the server start on boot.

References