3

I bought an external USB sound card for my Raspberry Pi because the sound quality of the built-in 3.5mm audio jack is not that good and I experienced a lot of noise.

The retailer of the sound card is called Ugreen and a lot of reviews on the internet state that the device should instantly work with the Raspberry Pi 3 without further configuration.

This is the output of aplay -l:

**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I'm running a fresh installation of 2017-01-11-raspbian-jessie on my Pi. If I run raspi-config and check the audio settings, I only have the following options:

0 Auto
1 Force 3.5mm ('headphone') jack
2 Force HDMI

I already tried all the options without any success. My speakers are working perfectly fine with the built-in 3.5mm connector. But not with the USB sound card. The speakers are powered via USB and the audio signal goes directly to the 3.5mm slot of the USB sound card which is connected to a USB slot on my Raspberry Pi.

I don't know what I can do now to get the sound card working.

4
  • 1
    Would it be possible for you to change the language in Raspbian and post the output of aplay -l in English?
    – Darth Vader
    Commented Jan 29, 2017 at 15:37
  • 1
    Done, sorry for the circumstances.
    – baumlol
    Commented Jan 29, 2017 at 16:43
  • 1
    Thank you, I understand that English might not be your native language, but its the language used by default on the site. I appreciate that you took the time to make the edit and I hope your problem gets resolved.
    – Darth Vader
    Commented Jan 29, 2017 at 16:51
  • What applications are you intending to use for sound playback? Is there a reason to stick to Jessie (8) instead of Buster (10)?
    – 0__
    Commented Mar 13, 2020 at 13:54

3 Answers 3

1

All Sound Cards should require at the very least 1 line of configuration in the /boot/config.txt

You have 2 options of getting things to work

  1. Edit your /boot/config.txt and find the line dtparam=audio=on and change it to dtparam=audio=off

  2. Create a file /etc/asound.conf or ~/.asoundrc with the following:

pcm.!default {
    type hw
    card 1
}
ctl.!default {
    type hw
    card 1
}
3
  • Can you describe what that dtparam is doing? (I.e. why does disabling audio work?) Also, now the alsa.config is in /usr/share/alsa/alsa.conf.
    – not2qubit
    Commented Mar 5, 2018 at 17:26
  • USB audio interfaces do not require any modification to boot configuration. They work automatically if they are class compliant.
    – 0__
    Commented Mar 13, 2020 at 13:51
  • 1
    Option 1 did not work after reboot, but Option 2 worked after ALSA restart. I used sudo /etc/init.d/alsa-utils stop; sudo /etc/init.d/alsa-utils start to reload the new ~/.asoundrc instead of rebooting. [Debian bookworm/sid + Openbox running on PI-4B]
    – Paul
    Commented Sep 9, 2022 at 0:18
0

Your system is setup to have hw:1,0 as the USB device. I get this hw string by noting the output of aplay -l, where card 1 is the USB card and device 0 is the only listed device.

You should be able to playback over the USB card using :

aplay -D hw:1,0

Incidentally you may be interested in various other GPIO sound cards available for this Pi, check here for a short list : http://elinux.org/index.php?title=RPi_Expansion_Boards#Sound

5
  • Is there no way to get my sound card into the raspi-config? I don't know what aplay -D hw:1,0 is supposed to do but nothing happens. And the aplay man page doesn't help me either.
    – baumlol
    Commented Jan 30, 2017 at 20:20
  • aplay is ALSA player, an audio play command. Did you specify the file name you want to play ? aplay -D hw:1,0 file.wav
    – Matt
    Commented Jan 31, 2017 at 22:32
  • I need to play mp3 because the wave files are to big and they cause stuttering.
    – baumlol
    Commented Feb 1, 2017 at 18:57
  • Oh ok, try to use play (sox), mplayer or avplay for files which aplay doesn't handle.
    – Matt
    Commented Feb 3, 2017 at 3:09
  • omxplayer is also plays mp3. try: omxplayer -o alsa:plughw:1,0 yourmp3.mp3 Commented Jul 6, 2021 at 13:56
0

I tried aplay -D plughw:1 file.wav, and this command worked for me. This "plug" before "hw" for me is necessary.

1
  • "plug" lets you make software conversation about samplerate etc. Commented Jul 6, 2021 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.