LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Default Sound Card In Ubuntu (http://www.linuxquestions.org/questions/linux-hardware-18/default-sound-card-in-ubuntu-564006/)

alan.me 06-23-2007 03:51 PM

Default Sound Card In Ubuntu
 
I have a Ubuntu 7.04 system with a few sound cards.

There is an onboard Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02) which is 5.1 and the one I want for the default card.

There is also a PCI C-Media Electronics Inc CM8738 (rev 10).

And a TV Card Brooktree Corporation Bt878 Audio Capture (rev 02).

I change the default in System -> Preferences -> Sound but after a restart or two it returns to the C-Media instead of the Intel and even returning to the Sound preferences it shows the Intel as default. But using the command alsamixer it shows C-Media as the current sound card in use.

Is there anyway to change the sound to Intel without it returning to C-Media?

vixol 10-30-2007 06:15 PM

Maybe this helps?
 
In terminal type

less /proc/asound/modules

That will show you which soundcards occupy which slot and what're their names.

My output is
0 snd_au8830
1 snd_intel8x0
so it should look something like that.

Now identify which cards you don't wanna use and take their names.

In terminal now type

sudo gedit /etc/modprobe.d/alsa-base

Find the place where it says something like
# Prevent abnormal drivers from grabbing index 0
and in the list below add
options snd_whateveryourcardnameswere index=-2

Since you have two card you want to blacklist you add two lines with different names then.

Now save /etc/modprobe.d/alsa-base and reboot the computer. It *should* now set the "wrong" sound cards to slot -2 (thus, making them disabled) and the correct soundcard should thus grab slot 0 and work.

It has been suggested that instead of blacklisting the wrong ones one could manually assign slots in the same /etc/modprobe.d/alsa-base file (at the start of the file, where it says "# autoloader aliases" but that didn't work for me at least.

Let me know if it worked!

/vix

ejac 11-20-2007 08:21 PM

Thx, this worked for me :)

J.W. 11-21-2007 04:25 PM

An alternative solution if you want to use the onboard soundcard would be to just remove the standalone card from the mobo.

Along these lines, if the opposite issue occurred (ie, here the system kept defaulting to the onboard card when you instead want it to use the standalone sound card) you can fix that by disabling the onboard soundcard in BIOS. That setting is typically in one of the 'advanced' BIOS menus, but just toggle the onboard sound to Off and that should do it

pimpsquash 11-29-2007 08:30 AM

Thanks a lot, vixol! I couldn't find any solution to fix my problem. My onboard sound card had taken the default spot and the device manager on Ubuntu isn't the greatest. I knew I had to disable the onboard and you have solved my issue.

Many thanks, m8!
Dave

drerling 10-16-2008 05:51 PM

Solved for me! Thanks!
 
I know its an old thread but its spot on for my problem...

Asus HD2600pro graphics, AMD 64 4600+, 2GiB, Asus M3A32-mvp deluxe mainboard and ESI Juli@ soundcard. I plan to use the digital optial SPDIF output of the Juli@ card connected to my EAD DSP-1000 DAC.

The cards are listed by default as quoted:
Code:

htpc@htpc-xbmc:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Juli [ESI Juli@], device 0: ICE1724 [ICE1724]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Juli [ESI Juli@], device 1: IEC1724 IEC958 [IEC1724 IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I went down the "less /proc/asound/modules" road and got:
Code:

0 snd_hda_intel
1 snd_ice1724
/proc/asound/modules (END)

I edited the alsa base entering "sudo gedit /etc/modprobe.d/alsa-base", filling in "options snd_hda_intel index=-2" under "# Prevent abnormal drivers from grabbing index 0"

Rebooted. Ran aplay -l again which produced:
Code:

htpc@htpc-xbmc:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Juli [ESI Juli@], device 0: ICE1724 [ICE1724]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Juli [ESI Juli@], device 1: IEC1724 IEC958 [IEC1724 IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

This means, at least, that my Juli@ now is device0. But no sound yet. I know for a fact that it is the "card 0, device 1" that gives sound. But now, when my soundcard is set as default, how can I make the digital optical output on that card default? (IEC1724 IEC958).

I guess I found the sollution! Finally! After three re-installs and countless hours of testing/googling/terrorizing forums/asking the white out of the eye of #xbmc-linux members...
I found it here.
Just edited the code a bit to fit my hardware-problem.

I had to edit the .asoundrc and change default soundcard from what seems to be the usual (0,0) to 0,1 by inserting this into .asoundrc:
Code:

pcm.!default {
        type asym
        playback.pcm {
                type plug
                slave.pcm "hw:0,1"
        }
 }

and edit the output from XBMC from default/iec958 to default/default.

When testing after this I was almost in heaven hearing terrible noise in my speakers, because then I knew that my DAC was fed with AC3 which it does not support :wink: (sollution was to remove support for AC3 and DD in XBMC output settings)

Last night I gave up. When I came home this night and the only thing I did was editing the output of XBMC I finally understand how frustrated one can be over something one does not understand (in this case, Linux)

Sweeet!

snowdonkey 07-06-2009 03:54 PM

Quote:

Originally Posted by vixol (Post 2942716)
In terminal type

less /proc/asound/modules

That will show you which soundcards occupy which slot and what're their names.

My output is
0 snd_au8830
1 snd_intel8x0
so it should look something like that.

Now identify which cards you don't wanna use and take their names.

In terminal now type

sudo gedit /etc/modprobe.d/alsa-base

Find the place where it says something like
# Prevent abnormal drivers from grabbing index 0
and in the list below add
options snd_whateveryourcardnameswere index=-2

Since you have two card you want to blacklist you add two lines with different names then.

Now save /etc/modprobe.d/alsa-base and reboot the computer. It *should* now set the "wrong" sound cards to slot -2 (thus, making them disabled) and the correct soundcard should thus grab slot 0 and work.

It has been suggested that instead of blacklisting the wrong ones one could manually assign slots in the same /etc/modprobe.d/alsa-base file (at the start of the file, where it says "# autoloader aliases" but that didn't work for me at least.

Let me know if it worked!

/vix

This solution worked for me perfectly, but is there a way for the changes to take effect without restarting the computer? A command of some kind? Restarting alsa doesn't work for me.

tegrat 09-25-2012 11:47 PM

works for me except add ".conf" to "alsa-base" (ubuntu studio 12.04)
 
Quote:

Originally Posted by vixol (Post 2942716)
In terminal type

less /proc/asound/modules

That will show you which soundcards occupy which slot and what're their names.

My output is
0 snd_au8830
1 snd_intel8x0
so it should look something like that.

Now identify which cards you don't wanna use and take their names.

In terminal now type

sudo gedit /etc/modprobe.d/alsa-base

Find the place where it says something like
# Prevent abnormal drivers from grabbing index 0
and in the list below add
options snd_whateveryourcardnameswere index=-2

Since you have two card you want to blacklist you add two lines with different names then.

Now save /etc/modprobe.d/alsa-base and reboot the computer. It *should* now set the "wrong" sound cards to slot -2 (thus, making them disabled) and the correct soundcard should thus grab slot 0 and work.

It has been suggested that instead of blacklisting the wrong ones one could manually assign slots in the same /etc/modprobe.d/alsa-base file (at the start of the file, where it says "# autoloader aliases" but that didn't work for me at least.

Let me know if it worked!

/vix

Works except I had to edit "alsa-base.conf", using ubuntu studio 12.04 (xfce desktop, pulse disabled to the best of my limited ability). Thanks! Don't understand why onboard sound disbled in bios is still present, but...


All times are GMT -5. The time now is 01:44 PM.