Get An External USB Audio DAC Working On Raspberry Pi

Updated about 9 yrs, 3 mths ago (September 23, 2015). Know a better answer? Let me know!

Get an External USB Audio DAC working on Raspberry Pi

You are using a USB Audio DAC on a Raspberry Pi, and it does not work properly.

The “white-noise” hiss seems to be a bug when using GPU acceleration for resampling. It depends on your USB video card. To fix mine, I created an asound.conf file that creates an audio device (so that OSMC doesn’t die if the USB DAC is turned off) and that explicitly disables resampling (I’m only using mine to run music).
My asound.conf is as follows:

pcm.Audio
{
	type hw
	card "Audio"
}

ctl.!default {
        type hw
        card "Audio"
}

pcm.!default {
	type plug
	slave {
		#pcm "hw:1,0"
		pcm "Audio"
		rate "unchanged"
	}
}

I got the info for this from http://www.alsa-project.org/main/index.php/Asoundrc1 and http://www.audiokarma.org/forums/showthread.php?t=5753081 (and a few more hints from http://openelec.tv/forum/124-raspberry-pi/74575-usb-dac-stopped-working-in-version-5-02 ) so that i could pass through bit-perfect music. I got the name of my device by running “cat /proc/asound/card1/id” because my USB DAC is the first card. “aplay -l” should give you any other info you need.

Once you’ve created the asound.conf file and rebooted, OSMC shows a new audio output device “ALSA Default...” and I selected that. Now my RPi with OSMC can be used to feed bit-perfect audio data to my hifi USB DAC.
Hopefully this is helpful to anyone with the same / a similar problem (hence adding my reference links).

More Information

For more information:

 

Updated about 9 yrs, 3 mths ago (September 23, 2015). Know a better answer? Let me know!

Related categories [coloured].

User submitted comments:

Hugh, about 8 yrs, 8 mths ago
Monday April 11, 2016 12:53 PM

Just curious where you find/put the asound.conf file?

I'm having lots of loud static when I select SPDIF for my USB DAC and the analog option resamples on my RPi2. I know that linux is capable of bit streaming this because I can get the DAC to work fine with my laptop running kodibuntu, but not on the Pi2, and I've gotten volumio to do it with the RPi2, but the interface for volumio is sluggish. Anyhow, whatever help is welcome! Thanks!

Comment on this article (no HTML, max 1200 characters):