Click to See Complete Forum and Search --> : Setting the Default Notebook Sound Card?


raid517
12-17-2006, 02:34 AM
Hi I have a Toshiba Satellite A100-225 laptop and am running Kubuntu 6.10.

Anyway the thing is that my laptop has onboard sound which is an Intel HD Audio Chip (which I believe is based on a Realtek design). The chip for this card is called snd_hda_intel. However I also have an Audigy 2 ZS PCMCIA notebook card. The driver for this card is called snd_emu10k1.

Originally with both cards active my Intel HDA card was being loaded as the default card. This was relatively easy to resolve (though not as easy as it should be) by following these guides:

http://ubuntuforums.org/showthread.php?t=282175

http://www.debianhelp.co.uk/sound.htm

This essentially involved entering the following code:

options snd_emu10k1 index=0
options snd_hda_intel index=1

Into these files:

/etc/modutils/options

/etc/modprobe.d/sound

In order to cause my Audigy card to be loaded first. (Which is my preference)

The first of these guides didn't work - however the second did - and my Audigy card is now listed as the default card under Kmix in KDE.

However unfortunately the *majority* (and by majority I mean all of KDE, all of my Media Players, the event notification system and pretty much everything really, is still defaulting to trying to playback via the onboard Intel HDA chip.

There are a couple of applications I can configure (like LastFM player) and tell them to explicitly use my Audigy card - and if I can do this the sound does play back normally and as expected.

However there are only a very few applications that will allow me to select my audio device in this way - and in any case, it is far from ideal as the ideal scenario would clearly to be able to use the Audigy card as my default system wide audio playback device - rather than just having a few applications use it, while the rest of the system uses the Intel chip.

There are a couple of conditions that might be wort considering in my attempts to get my set up to work.

Firstly I cannot simply turn the Intel chip off in my bios - as my laptop will not allow this. (I guess it was never envisaged that I might use a different sound card). Nor is this quite a solution as it does not resolve the ordering and default device dilemma that I am facing now. Secondly I cannot simply remove the module from /etc/modules so that it does not get loaded when I reboot - since most hardware detection is now done by HAL. Nor can I compile my kernel to remove the driver - as this has the undesirable effect of meaning that I cannot use my Intel chip at all. Nor would I want to do any of this - as there are several scenarios - where for example I may wish to remove my Audigy PCMCIA card and insert a TV card, or insert a PCMCIA SATA card (so that I can load an alternative OS) and still have sound without having to hack through various configuration files.

So predominantly all I want is to set my Audigy card as the default system wide card that all my applications will default to and my Intel chip as the fall back card that my system will revert to if the Audigy card is removed.

Can anyone suggest how I might achieve this?

I originally presumed that the above methodology would have achieved this, but this does not seem to have been the case. (And yes I did reboot after making these changes).

XiaoKJ
12-17-2006, 10:54 AM
you can blacklist the intel HDA card.

And I believe the problem also lies in udev's hardware detection. You can check it up to see if you can define the detection rules.

raid517
12-17-2006, 04:02 PM
Hi sorry I know my post is kind of long. But if you read it you will see why blacklisting isn't really an option. Basically both cards are used for different scenarios - so it doesn't make much sense to disable a card - as really having paid for both my laptop sound and the creative card it is a tad frustrating that the only solution might be to disable one of them to force the other to be recognised.

raid517
12-17-2006, 04:10 PM
Edit:

NM - I got both card working - or at least it turns out they were working all along and the above guide did work. Unfortunately, the real issue (and what made me think that the Audigy card wasn't working correctly) is that the sound refuses to play though my laptop's onboard speakers.

It's a long shot - and I have done some reading, but I don't suppose anyone knows how to get my laptop onboard speakers with the Audigy 2 PCMCIA card?

bwkaz
12-17-2006, 06:29 PM
Wouldn't you have to plug speakers directly into any sound card before that card will send output to those speakers? Or are PCMCIA sound cards different than ISA and PCI cards? (I've never used a PCMCIA sound card, so maybe I'm barking up the wrong tree here. But if your card has a plug for speakers, you'll have to use that plug.)

Also, I have to note that udev is the wrong place to modify Alsa card ordering, basically because Alsa predates udev by several years, and is complicated enough that it's impossible to get it to work perfectly. You can rename the pcmC?D?[cp] devices using udev, and this will sort-of-reorder your cards. But it won't change the "default" alsa device; "default" is not always pcmC0D0[cp]. Rather, "default" is the device whose module was given the parameter index=0, or the only device loaded at the time. Part of the issue is that Alsa's libraries use files in /proc/asound/ as well as devices in /dev to figure out what to do.

Basically, it's much better to use the "index" parameter (as you're doing) than to play with udev for Alsa devices. The only problem is if you have two cards that use the same driver; then as far as I know, you have no control over which card is "default". Yes, this is bad, but I'm not sure how to change it...

raid517
12-17-2006, 06:54 PM
It appears to be possible to do it in Sabayon Linux (which is a Gentoo live CD) where my Audigy card is listed as the default audio device and all sound does play through my onboard speakers.

It is also possible to do it in Windows XP.

However the reason I never stuck with Sabayon - is that I don't want to waste my time on the complexity of maintaining a Gentoo system.

So it is possible - and I have seen it working. The question is, why did it work in this instance - but not in Ubuntu?

XiaoKJ
12-18-2006, 12:59 AM
Actually I had trouble following you on some parts, but not the blacklisting. What I mean is that, if you have the audigy card, blacklist, or else you can manually load the onboard card.

The part I'm lost is whether you want to use both cards at once, or use audigy default or use audigy default with onboard speakers.

Well, if Gentoo's system works for you, either study how it works or get used to it. And gentoo's mainentance complexity?? Gentoo's designed to be a PITA to set up but easy to maintain... (bias: I'm a gentoo user)

And bwakz: Thanks for the correction. Or else I'll be teaching the wrong thing. :)

raid517
12-18-2006, 02:11 AM
To save on an overly wordy explanation, no I didn't want to blacklist, or otherwise disable any of my cards, nor did I want to have to manually insert or remove modules in order for them to work.

My objective was to set the Audigy card as default, get the sound from my onboard speakers to work through it - and still be able to use my Intel HDA chip whenever I wanted to temporarily swap out the Audigy card, with say for example a TV card or a Serial ATA card (or whatever) and sill have some sound available.

Well anyway as it turns out after a lot of effort and a lot of research (too much to go into here really) that is kind of what I now have. (Or at least I have a good enough working solution).

As for Gentoo, been there done that (for nearly 2 years). I guess I like Debian as I don't like the idea of waiting 2 days + to install the next Open Office release, or having to work though and trouble shoot the roughly 10 to 20% (depending on what way the wind is blowing) of applications in portage that typically refuse to compile cleanly. It's a matter of taste of course - even Debian in't perfect. But at least it saves time.