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.
One of the first things we did was enabled “pixel doubling” on the Raspberry Pi to make the UI more readable on the TV.
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:
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:
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.
The following command will output the settings of your selected audio output device
We used the following two commands to test the audio output
$ speaker-test -c2
$ wget https://www.kozco.com/tech/piano2.wav
$ aplay piano2.wav
We followed this project’s README.md to install the web controller.
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.