Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

raspberry pi / aplay / default sound card

I purchased a the "Sound Blaster Play! 2" soundcard for my raspberry pi 3. The OS is raspbian jessie.

The audio on my raspberry pi works when I run

 $ aplay /usr/share/sounds/alsa/Front_Center.wav -D sysdefault:CARD=S2

But only when I use -D. When I use

$ aplay /usr/share/sounds/alsa/Front_Center.wav

it shows:

aplay: set_params:1239: Channels count non available

I need this for node-speaker.

Here is the output of the ALSA Information script: http://www.alsa-project.org/db/?f=bdefa248fdedb34929d492e65ea941f2af40dcb2

like image 640
Franky Avatar asked Sep 17 '16 22:09

Franky


People also ask

Does Raspberry Pi have a sound card?

High quality sound with the Raspberry Pi sound card You also don't need tube amplifiers that deliver high quality sound. You can build your private media center using the Raspberry Pi and a sound card, which is necessary in this case, without it it is impossible to play the sounds.

How do I change my ALSA default sound card?

Set default sound card... Open alsa mixer with sudo press F6 or S select your card then type sudo alsactl store. sudo alsamixer sudo alsactl store and OR Setting the default sound device Find your desired card with: cat /proc/asound/cards You will need to be root for this and then create or edit your /etc/asound.

How do I know if my Raspberry Pi has a sound card?

The simplest way to test the sound is to use the speaker-test command. Enter the following to test sound from your default configured audio device. You should hear an alternating sound coming from your left and right speakers. If you're using a USB sound device you first need to check its device id/number.


1 Answers

OK, I found the solution..

My new ~/.asoundrc:

pcm.!default {
        type plug
        slave {
                pcm "hw:0,0"
        }
}

ctl.!default {
        type hw
        card 0
}

instead of

pcm.!default {
        type hw
        card 0
}

ctl.!default {
        type hw
        card 0
}

does the magic :)

like image 135
Franky Avatar answered Oct 22 '22 18:10

Franky