LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Sound card problem (https://www.linuxquestions.org/questions/linux-hardware-18/sound-card-problem-722804/)

thermobee 04-30-2009 04:47 PM

Sound card problem
 
Ok so here is the problem im having, i guess you can say its more of an inconvenience Running dual boot with XP and XP recognizes and runs sound out of the external sound card that i have. Ubuntu on the other hand uses the sound card that comes with the mother board ( which i think is called on-board card). Anyway, how can i get ubuntu to switch to the external sound card, since going to the back of my pc and switching them everytime I want to hear something on the opposite OS is kidna incovenient.

Thanks for the help in advance.

00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)
00:01.0 PCI bridge: Intel Corporation 82865G/PE/P PCI to AGP Controller (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2)
00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
01:00.0 VGA compatible controller: ATI Technologies Inc R480 [Radeon X850XT]
01:00.1 Display controller: ATI Technologies Inc R480 [Radeon X850XT] (Secondary)
02:02.0 Ethernet controller: Accton Technology Corporation EN-1216 Ethernet Adapter (rev 11)
02:04.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10)
02:07.0 FireWire (IEEE 1394): Agere Systems FW323 (rev 61)
02:08.0 Ethernet controller: Intel Corporation 82562EZ 10/100 Ethernet Controller (rev 01)

and the kernel im using is - 2.6.28-11-generic

thermobee 04-30-2009 05:42 PM

bump

Shadow_7 05-02-2009 04:57 AM

Quote:

Originally Posted by thermobee (Post 3526200)
00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
02:04.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10)

I'm assuming that one of these internal cards is the external card you're referencing.

$ cat /proc/asound/cards

Whatever is device 0 is your default card. A few work arounds to change the order or to use another card at the configuration / application level. The simplest IMO is the add "defaults.pcm.card 1" to your .asoundrc. But that only works if your application uses alsa natively. Re-indexing the modules is the sure fire way, make your default card register as card 0. Although disabling the onboard soundcard in the bios is probably the second easiest way. And various other ways with esd, artsd, jackd, pulse audio, and other options. And their aoss, esddsp, artsdsp and other methods. Audacity, xmms, and others let you select your card in their gui configurations. So it's difficult to understand what you're considering to be an issue in this case. Even mplayer lets you select the device -ao alsa:device=hw:1. And other means to an end.

thermobee 05-02-2009 10:24 AM

Quote:

Originally Posted by Shadow_7 (Post 3527555)
I'm assuming that one of these internal cards is the external card you're referencing.

$ cat /proc/asound/cards

Whatever is device 0 is your default card. A few work arounds to change the order or to use another card at the configuration / application level. The simplest IMO is the add "defaults.pcm.card 1" to your .asoundrc. But that only works if your application uses alsa natively. Re-indexing the modules is the sure fire way, make your default card register as card 0. Although disabling the onboard soundcard in the bios is probably the second easiest way. And various other ways with esd, artsd, jackd, pulse audio, and other options. And their aoss, esddsp, artsdsp and other methods. Audacity, xmms, and others let you select your card in their gui configurations. So it's difficult to understand what you're considering to be an issue in this case. Even mplayer lets you select the device -ao alsa:device=hw:1. And other means to an end.

Do you mind giving a little more info on how to re-index and/or disable the on board one in bios.

By the way -
Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10) - External one
Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02) - on board

Shadow_7 05-02-2009 09:35 PM

but which one do you want to default?

In the cmos / bios setup (pre-boot) (normally F1, F3, F10, F12, DEL, ESC, SPACE, or some other way to enter it when you first turn on the computer. It should drop a hint when you turn on the computer if you can read that fast. There should be an option to disable the onboard soundcard. It was just about the only option I found to force windows to do my bidding.

Modules at boot happen in a certain sequence. Sometimes reordering the modules in /etc/modules does the trick. Other times you have to be a bit more inventive. Various automated methods of loading modules that might need tweaking, or try the tried and true. /etc/modules.conf or /etc/modprobe.d/alsa-custom.conf with things like "options snd-hda-intel index=1". Or manually unload the alsa modules (lsmod / modprobe / rmmod / modprobe -r) and reload them in the sequence that you want the index to default to. A bit tricky when the devices use the same driver (usb-audio), but doable with a little help from modinfo. And other ways.

thermobee 05-03-2009 01:54 PM

Quote:

Originally Posted by Shadow_7 (Post 3528135)
but which one do you want to default?

In the cmos / bios setup (pre-boot) (normally F1, F3, F10, F12, DEL, ESC, SPACE, or some other way to enter it when you first turn on the computer. It should drop a hint when you turn on the computer if you can read that fast. There should be an option to disable the onboard soundcard. It was just about the only option I found to force windows to do my bidding.

Modules at boot happen in a certain sequence. Sometimes reordering the modules in /etc/modules does the trick. Other times you have to be a bit more inventive. Various automated methods of loading modules that might need tweaking, or try the tried and true. /etc/modules.conf or /etc/modprobe.d/alsa-custom.conf with things like "options snd-hda-intel index=1". Or manually unload the alsa modules (lsmod / modprobe / rmmod / modprobe -r) and reload them in the sequence that you want the index to default to. A bit tricky when the devices use the same driver (usb-audio), but doable with a little help from modinfo. And other ways.

I would like my external and not on board as default. The problem I have with your explanation is that im kinda of a newbie and Ill have trouble following what you said. If you dont mind writing a little bit more detailed instructions that would be greatly appreciated, if not its all good :).

Shadow_7 05-04-2009 05:09 AM

In short the order in which the drivers load determines the order in which the cards are numbered. Device 0 wins most sound issues (the first one seen/handled by alsa). There are ways to control this order of alignment.

For me that means scrapping my Distros alsa configuration (/etc/modprobe.d/alsa-base and friends) and making my own configuration (/etc/modprobe.d/alsa-custom). Note that the onboard soundcard takes to entries, I'm not sure why here, but for my laptop the modem is somehow tied into the onboard sound so alsa gives it two device numbers. Yours might be less detailed. You might get by with just the "options (driver) index=#" lines. For more details see alsa-project.org

HTH


# /etc/modprobe.d/alsa-custom
# ALSA
alias char-major-116 snd

# OSS
alias char-major-14 soundcore

options snd major=116 cards_limit=5
options snd-ice1712 index=0
options snd-usb-audio index=1
options snd-hda-intel index=2
options snd-hda-intel index=3
alias snd-card-0 snd-ice1712
alias snd-card-1 snd-usb-audio
alias snd-card-2 snd-hda-intel

# CARD - Delta 44 (PCI interface)
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

# CARD - M-Audio MobilePre (USB interface)
alias sound-slot-1 snd-card-1
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-1 snd-seq-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-8 snd-seq-oss
alias sound-service-1-12 snd-pcm-oss

## CARD - nVidia MCP61 (Onboard Audio)
alias sound-slot-2 snd-card-2
alias sound-service-2-0 snd-mixer-oss
alias sound-service-2-1 snd-seq-oss
alias sound-service-2-3 snd-pcm-oss
alias sound-service-2-8 snd-seq-oss
alias sound-service-2-12 snd-pcm-oss

## CARD - nVidia MCP61 (Onboard Audio)
alias sound-slot-3 snd-card-3
alias sound-service-3-0 snd-mixer-oss
alias sound-service-3-1 snd-seq-oss
alias sound-service-3-3 snd-pcm-oss
alias sound-service-3-8 snd-seq-oss
alias sound-service-3-12 snd-pcm-oss

## CARD - ATI HDMI Audio (PCIe Video Card)
alias sound-slot-4 snd-card-4
alias sound-service-4-0 snd-mixer-oss
alias sound-service-4-1 snd-seq-oss
alias sound-service-4-3 snd-pcm-oss
alias sound-service-4-8 snd-seq-oss
alias sound-service-4-12 snd-pcm-oss


All times are GMT -5. The time now is 02:40 PM.