raspberry pi / aplay / default sound card

Franky picture Franky · Sep 18, 2016 · Viewed 9.9k times · Source

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

Answer

Franky picture Franky · Sep 18, 2016

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 :)