6

I tried to set up a USB-Soundcard (Delock) for my RPI. Now made the necessary changes in the alsa-config file to let the USB soundcard be loaded first.

The soundcard is found, as you can see here:

$ cat /proc/asound/cards

0 [Device         ]: USB-Audio - Generic USB Audio Device
                      Generic USB Audio Device at usb-bcm2708_usb-1.2.3, full speed
1 [ALSA           ]: BRCM bcm2835 ALSbcm2835 ALSA - bcm2835 ALSA
                      bcm2835 ALSA

So i tested the output (which is working using analog output) using speakertest, the led on my soundcard blinks, but there is nothing to hear.

What could be the problem?

3
  • 2
    This may sound trivial, but did you unmute it (have a look into alsamixer)?
    – Max
    Mar 16, 2013 at 12:52
  • Thanks for the reply! Yeah, i enabled the sound using alsamixer!
    – anon
    Mar 17, 2013 at 19:06
  • Max, please make an answer that anon can mark as an answer. I think that this is a common sollution to this problem.
    – Anders
    Jul 4, 2013 at 19:46

2 Answers 2

5

The problem might be that your recording or playback volume is set to mute.

You can change it using this command alsamixer, remember to choose the right sound card using F6. Channels can be muted (and un-muted) using M.

Do not forget to save the settings after you change anything,

$ sudo alsactl store 1

If you want to know the detail method to fix your problem then follow this solution,

First of all you do not need to use this command,

$ cat /proc/asound/cards

Simply use this command to see if the Sound card is detected,

$ lsusb

Secondly, There is an issue with the Pi’s USB port that meant it could become overwhelmed with data which causes popping and bubbling noises to be included in your recordings, and sometimes, no output whatsoever. his can be fixed with an update of the Pi’s firmware:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install rpi-update
sudo rpi-update

After the update is complete, Reboot your Raspberry Pi,

$ sudo shutdown -r now

Now, Let's select the default sound card for Recording and Playback, so run this command to see the number of you USB audio card.

arecord --list-devices

You will get something like:

List of CAPTURE Hardware Devices
card 1: U0x41e0x30d3 [USB Device 0x41e:0x30d3], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

Observe the number of your card from previous output, in my case its 1 (card 1:)

Now let's look into your Card's available option and what we can change,

$ amixer --card 1 contents

So I want to turn the Auto Gain Control off, and the recording volume to 14:

amixer -c 1 cset numid=7 0
amixer -c 1 cset numid=6 14

In this case,

numid = 7 , It is the id to control 'Auto Gain Control' numid = 6 , It is the id to set the recording volume.

Store the settings so that they will be used again on a reboot:

$ sudo alsactl store 1

where 1 is the card number.

Remeber your Sound Card number, It will apparently be 1

Let's use this USB card to record the sound now,

arecord -D plughw:1 --duration=10 -f cd -vv ~/rectest.wav

the -vv option displays extra information on the screen as well as a volume meter, this should be peaking at around 95% on the loudest sounds, if it is at 100% all a lot of the time then you are probably recording distortion.

Playback the recording with aplay:

aplay ~/rectest.wav

the default settings will play the wav fie through the TV if it is connected by HDMI, To playback through the USB sound card set the device to the card number, like in arecord:

aplay -D plughw:1 ~/rectest.wav

Remember: plughw:1 , is your card number

This solution is working absolutely fine for me...I have tested it recently. :) Good Luck

2
  • I am getting 00% at the bottom of the screen. When I perform the cmd amixer -c io2 cset numid=7 0 I get amixer: Cannot find the given element from control hw:1 my card is io2 and the same with the recording volume! Why might this be happening?
    – maxisme
    Dec 19, 2014 at 23:18
  • Argh. The question was about "no output". I don't understand why everything I see keeps talking about setting up "record". Are playback and record inseparable? I have no interest in recording, I just want to play my music.
    – Auspex
    Feb 18, 2016 at 21:54
1

I don't know if you made up a solution, but I did similar think with ~/.asoundrc config file. You can force default output there.

Also, there is option to test your sound output with aplay (you can force device and card), maybe your sound card can't be powered with 140mA Raspi USB port?

Your Answer

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

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