[Solved]How to change default ALSA output to USB sound card?

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

[Solved]How to change default ALSA output to USB sound card?

Postby aliarchi » Thu Jan 28, 2016 10:59 pm

Hi there:

I am trying to use my RPi B 256MB as a music server, and have decided to use mopidy.
So far, I've had success playing music through the default bcm2835 device.

However, I have found an old Xitel DG2 MD-Port USB sound card in my technojunk box which I thought should be able to pump out far better sound that the standard equipment.

I connected it, and to my utter surprise, the kernel recognized it instantly.

However, I have so far failed to redirected the sound output to USB.

Here are some outputs I get:
$this->bbcode_second_pass_code('', '
$ aplay -L | grep :CARD
default:CARD=ALSA
sysdefault:CARD=ALSA
default:CARD=DG2
sysdefault:CARD=DG2
front:CARD=DG2,DEV=0
surround21:CARD=DG2,DEV=0
surround40:CARD=DG2,DEV=0
surround41:CARD=DG2,DEV=0
surround50:CARD=DG2,DEV=0
surround51:CARD=DG2,DEV=0
surround71:CARD=DG2,DEV=0
iec958:CARD=DG2,DEV=0
')
which bothered me as this says that there are two default cards, and evidently, ALSA defaults to onboard!

So, I tried to prevent ALSA from using onboard by editing the folllowing:
$this->bbcode_second_pass_code('', '
/etc/modprobe.d/alsa-base.conf
options snd_bcm2835=-2
options snd_usb_audio=0
')
and
$this->bbcode_second_pass_code('', '
/etc/asound.conf
pcm.|default {
type hw
card DG2
}

ctl.|default {
type hw
card DG2
}
')

then reboot, and still no luck.
When I run alsamixer, it ALWAYS defaults to the onboard card, no matter what I throw at it.

If anyone out there has successfully changed the default sound card, I'd love to hear from you !
Or, should I try to trick the system by using JACK ?

Any comments will be gratefully appreciated.

Alex
Last edited by aliarchi on Thu Jan 28, 2016 11:28 pm, edited 1 time in total.
aliarchi
 
Posts: 3
Joined: Tue Aug 12, 2014 8:23 pm

Re: How to change default ALSA output to USB sound card?

Postby aliarchi » Thu Jan 28, 2016 11:27 pm

And as soon as I had posted this, I found one nice trick:
prevent the onboard card modules from loading by commenting them out in
$this->bbcode_second_pass_code('', '
/etc/modules-load.d/raspberrypi.conf
#bcm2708-rng
#snd-bcm2835
')
then reboot and
$this->bbcode_second_pass_code('', '
$ cat /proc/asound/modules
0 snd_usb_audio
')
Happy me :D

Now, need to get the DG2 to pump out the music to my amp.Bet that'll keep me busy for a while.

Until then...

Alex
aliarchi
 
Posts: 3
Joined: Tue Aug 12, 2014 8:23 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 8 guests