Hi guys!
I’m trying to get opensuse 11 to recognize my usb sound card as the default, but having no luck. It recognizes that its there, according to yast, and the /etc/modprobe.d/sound file assigned values 0 for usb and 1 for hda, yet the virtual file /proc/asound/modules says that my usb card is card #2 while hda is card #0, a.k.a. the default. I don’t know how to manually change this, setting my usb to sound card 0. Some people have suggested that i can modify /etc/modprobe.d/acpi-base (wait, I think it’s called acpi-base, something like that…acpi-(something)) but that file doesn’t exist on my system.
How can I make usb sound card my default? Thanks in advance…
Taylor
An appropriate edit to your /etc/modprobe.d/sound file should do this. Can you post here the output of:
cat /etc/modprobe.d/sound
and also run a diagnostic script, and post here the output URL it provides. i.e. … with your PC connected to the internet, please start by copy and pasting the following diagnostic script into a gnome-terminal or konsole with your PC connected to the internet:
wget http://home.cfl.rr.com/infofiles/tsalsa && su -c 'bash ./tsalsa'
and when prompted for a password enter your root password. Please try to accurately estimate the number of jacks/plug you have when asked (for example, I have 3 i/o sound jacks on my PC), and when the script is complete it will give you a URL. Please post that URL on this thread.
With that information it may be possible to make a recommendation.
Okay sorry for the delay. Wow i had no idea there existed a diagnostic tool like that! Unfortunately I didn not know the answers to alot of the questions. Here is the url:
tsalsa.txt - nopaste.com (beta)
…and here is my /etc/…/sound file:
options snd slots=snd-usb-audio,snd-hda-intel
uniq.unknown_key:USB Audio
alias snd-card-0 snd-usb-audio
u1Nb.uP_yB40zFCD:82801G (ICH7 Family) High Definition Audio Controller
alias snd-card-1 snd-hda-intel
Seems to me that usb is set as default, and hda-intel as secondary, but I have yet to get sound through my usb cound card. Here is the output of cat /proc/asound/modules:
0 snd_hda_intel
2 snd_usb_audio
Thanks for everything!
I don’t have multiple sound devices (so my experience is limited) … but I find that confusing. Did you manually edit your /etc/modprobe.d/sound file? From the /proc/asound/modules, and also from the diagnostic script, your motherboard sound should be sound-card-0, and your usb device sound-card-2. … Now if your usb device was sound card-2, I would try creating the following /user/home/.asoundrc file (and then restart/reload alsa):
pcm.usb-audio {
type hw
card 2
}
ctl.usb-audio {
type hw
card 2
}
Reference: Matrix:Module-usb-audio - AlsaProject
You could try “card 0” in place of “card 2” since you have assigned card 0 in your /etc/modprobe.d/sound file. But your card assignments are confusing to me.
Hi again,
so I don’t totally understand what you mean by that. I tried creating a file like that in my home directory, and used values of 2, 0 and -2 (logging out and back in each time to restart alsa). nothing seems to work. I thought I would have to modify an existing file, rather than create a new one…how will my OS know to look for this new file that I’ve created? Thanks!
Taylor
I believe the alsa driver is coded to automatically look for that file. Typically that file is not provided, as some time back in tbd version of alsa the need for that file for basic audio setups was removed. However that file can provide very advanced audio capabilities, … the main problem with the idea of assigning your being is syntax is obscure and I have only seen examples and no guide explaining how to “program” / “custom code” the file. Here are some more examples (one needs to look for the example of the .asoundrc file specific to their problem):
infofiles - asoundrc file examples on irc freenode #alsa user gnubian’s web site
If one searches google on “asoundrc” one gets many hits.
Reference your attempts, if it were me (and this is speculation on my part) I would try:
options snd slots=snd-usb-audio,snd-hda-intel
# uniq.unknown_key:USB Audio
alias snd-card-2 snd-usb-audio
# u1Nb.uP_yB40zFCD:82801G (ICH7 Family) High Definition Audio Controller
alias snd-card-0 snd-hda-intel
together with the .asoundrc file that I recommended. Restart alsa to test. Or if that fails, I would try:
options snd slots=snd-usb-audio,snd-hda-intel
# uniq.unknown_key:USB Audio
alias snd-card-0 snd-usb-audio
# u1Nb.uP_yB40zFCD:82801G (ICH7 Family) High Definition Audio Controller
alias snd-card-1 snd-hda-intel
options snd-usb-audio index=2 enable=1
options snd-hda-intel index=0 enable=1
together with the .asoundrc file that I recommended. Restart alsa to test.
The idea is to use “index” to reassign your card numbers, … so I think you get the idea and you could try different possibilities. I think enable=1 activates the device, … and I suspect enable=0 would de-activate the device (speculation again on my part).
But in truth, this is just me speculating, as I do not have two sound devices, so I have never been able to teach myself how to do this properly.
Hi again. I’ve been on hiatus for a while, trying all kinds of things. Still can’t get my external usb sound card to be the default. It seems that no matter what options I change using Yast, or making manual changes to my .asoundrc file and my /etc/modprobe.d/sound file, cat /proc/asound/modules STILL tells me that my usb card is not the default, but that the hda card is instead. This is super annoying.
Even when I unconfigure my hda sound card, i cannot get anything through the usb card even if it is the only sound device enabled.
IMHO the correct .asoundrc file edit will do what you want.
Can you be more specific as to what .asoundrc file edits you tried? Perhaps paste the various edits to general pastebin - simplified internet collaboration so we can check the edits and come up with a recommendation?
Hi. Here are some of my files:
/etc/modprobe.d/sound:
options snd slots=snd-usb-audio,snd-hda-intel
uniq.unknown_key:USB Audio
alias snd-card-0 snd-usb-audio
u1Nb.uP_yB40zFCD:82801G (ICH7 Family) High Definition Audio Controller
alias snd-card-1 snd-hda-intel
I have tried adding things to the end of that files, like changing the index value for the cards, that sort of thing. Here are some other files:
/home/.asoundrc:
pcm.snd-usb-audio {
type hw
card 0
}
ctl.snd-usb-audio {
type hw
card 0
}
pcm.!default front:Xmod
the last line there I added because someone recommended it (i have an external ‘xmod’ usb sound card), but it doesn’t seem to do anything. I have also used yast to set the default audio card to usb, but it doesn’t make any difference. I should mention that i have playe with the card numbers in the above file, changing them between -2, 0 and 2, and everything in between. Despite all of this, here is the output of /proc/asound/modules:
0 snd_hda_intel
2 snd_usb_audio
BAH! It’s not just that i cannot set my usb to be the default, it’s that i can’t get any sound out of it at all. So even if I unconfigure the hda-intel card but leave the usb one, i still don’t get sound from it. Oddly enough, the computer seems to recognize the presence of the xmod. It shows up in KMix, although selecting it doesn’t do anything, and the xmod’s volume knob controls the master volume through kmix (so playing with the usb card’s volume changes the hda-intel volume). Strange eh?
What happens if you do not have that last line? Also, are you certain snd-usb-audio is the correct syntax? I do not think it is correct.
I assume you restarted alsa after each edit attempt with something like: su -c 'rcalsasound restart’Did you try my recommendation from above with this:
pcm.usb-audio {
type hw
card 0
}
ctl.usb-audio {
type hw
card 0
}
This is the one thing that confuses me, as here your usb-audio is 2, and your snd-hda-intel is 0.
Did you try the following .asoundrc and /etc/modprobe.d/sound file combo:
/home/.asoundrc:
pcm.usb-audio {
type hw
card 2
}
ctl.usb-audio {
type hw
card 2
}
with this /etc/modprobe.d/sound file:
options snd slots=snd-usb-audio,snd-hda-intel
# uniq.unknown_key:USB Audio
alias snd-card-2 snd-usb-audio
# u1Nb.uP_yB40zFCD:82801G (ICH7 Family) High Definition Audio Controller
alias snd-card-0 snd-hda-intel
and then restart your alsa.
Also, with the same /etc/modprobe.d/sound file, you could try this .asoundrc file:
usb.default
# usb.default begins ###
pcm.!default {
type hw
card 2
}
ctl.!default {
type hw
card 2
}
# usb.default ends ###
A final question. Is this Xmod USB device a Creative Xfi ? If so, its quite possible it is NOT supported under Linux. I note this: Audio where the PCI Xfi is noted as not being supported/functional with Linux - and it would not surprise me if the USB Xfi is also NOT supported/functional with Linux.
Check, check, check.Yes, it is a creative Xmod, and I know that officially it isn’t supported, but I had it working jsut fine with opensuse 10.2, before i upgraded to 11.0.
Thank you for all the help though!
Anyone else have any last minute suggestions? Even something prototypical?
Given you note this worked before under 10.2, I did have a speculative thought … Do you have ESD (esound) installed? It is very useful when trying to share multiple sound devices.
I had thought it always installed by default, … but maybe not with 11.0. Its possible pulse audio does not work well with your USB device and hence ESD needed instead.
There are also various pulse audio / ESD compatibility packages available on webpin, although I do not know if any (and which if any) will help: Webpin esound search results I suspect you may need both “esound” and “pulseaudio-esound-compat”
This is rather gnome specific, and I don’t use gnome, so it is not something I am familiar with.