ALSA set plughw as default
9,822
Backup your ~/.asoundrc - if you have one - and add the following, to a new ~/.asoundrc:
pcm.!default {
type plug
slave {
pcm "hw:0,0"
}
}
Related videos on Youtube
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Author by
Admin
Updated on September 18, 2022Comments
-
Admin almost 2 years
I have a USB audio device, configured as the default device at card 0.
I have a 3rd party application that is attempting to play wav files, which fail with the following:
Playing WAVE 'sound.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono aplay: set_params:1239: Channels count non available
If I try to manually play the very same wav, I get no error but also no sound:
aplay sound.wav Playing WAVE 'sound.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
If I specify device
plughw:0,0
, the sound plays correctly!aplay -D plughw:0,0 sound.wav Playing WAVE 'sound.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
I have tried various attemps at configuring
~/.asoundrc
to setplughw:0,0
as the default, without success.How can I apply the
-D plughw:0,0
be default to all sound playback?-
Admin about 7 yearsThat 3rd-party app calls
aplay
, and uses some wrong parameter(s). Can you configure it somehow? Otherwise, you have to find out what happens there; try replacing/usr/bin/aplay
with a script that logs its parameters. -
Admin about 7 yearsPlease explain in detail what 3rd party application you use, what ALSA device it uses, and if you can configure it to use other devices. Without any
~/.asoundrc
, thedefault
device already is equivalent toplughw
+dmix
, so there's probably nothing you can do in your~/.asoundrc
alone.
-