Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

Alsa Defaults to Wrong Soundcard

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
16 posts • Page 1 of 1
Author
Message
niffs
Apprentice
Apprentice
User avatar
Posts: 212
Joined: Sun Apr 25, 2004 12:08 am
Location: The Wired
Contact:
Contact niffs
Website

Alsa Defaults to Wrong Soundcard

  • Quote

Post by niffs » Sun Dec 31, 2006 5:59 am

Well, here's the story. I have two sound cards: An integrated NVidia AC'97 type thing, and a PCI SoundBlaster Live! EMU10k1 based card. I much prefer the EMU10k1 to the AC'97, but for some reason the modules for the AC'97 are always loaded, and it gets set as the default soundcard by alsa. This is undesirable.

There must be a simple way to disable the AC'97 or set the EMU10k1 as the default, no? I could go through and recompile my kernel without support for the AC'97, but I would sort of like to still have support for it, just in case the EMU10k1 gets fried next time I dissect my box, or something. Is there a file (hotplug or modprobe perhaps?) that I could edit to make it prefer the EMU10k1?

Any help is appreciated. Thanks in advance.
No matter where you are... everyone is always connected.
[ .: my website :. ]
Top
desultory
Bodhisattva
Bodhisattva
User avatar
Posts: 9410
Joined: Fri Nov 04, 2005 6:07 pm

  • Quote

Post by desultory » Sun Dec 31, 2006 6:18 am

niffs wrote:Is there a file (hotplug or modprobe perhaps?) that I could edit to make it prefer the EMU10k1?
Yes, /etc/modules.d/alsa. There are other ways.
Top
niffs
Apprentice
Apprentice
User avatar
Posts: 212
Joined: Sun Apr 25, 2004 12:08 am
Location: The Wired
Contact:
Contact niffs
Website

  • Quote

Post by niffs » Sun Dec 31, 2006 6:31 am

Well... /etc/modules.d/alsa:

Code: Select all

alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
alias snd-card-0 snd-emu10k1
alias sound-slot-0 snd-emu10k1
and still...

I get the impression the AC'97 modules are being autoloaded and are taking over...
No matter where you are... everyone is always connected.
[ .: my website :. ]
Top
desultory
Bodhisattva
Bodhisattva
User avatar
Posts: 9410
Joined: Fri Nov 04, 2005 6:07 pm

  • Quote

Post by desultory » Sun Dec 31, 2006 6:43 am

Post the contents of /etc/modules.autoload.d/kernel-2.6.
Top
niffs
Apprentice
Apprentice
User avatar
Posts: 212
Joined: Sun Apr 25, 2004 12:08 am
Location: The Wired
Contact:
Contact niffs
Website

  • Quote

Post by niffs » Sun Dec 31, 2006 6:50 am

Tis empty. Should emu10k1 modules go in there?

But the problem isn't that the modules aren't being loaded... its just that the ac97 modules load as well, and take over...
No matter where you are... everyone is always connected.
[ .: my website :. ]
Top
desultory
Bodhisattva
Bodhisattva
User avatar
Posts: 9410
Joined: Fri Nov 04, 2005 6:07 pm

  • Quote

Post by desultory » Sun Dec 31, 2006 7:04 am

niffs wrote:Tis empty. Should emu10k1 modules go in there?
It might be worth trying.
niffs wrote:But the problem isn't that the modules aren't being loaded...
I realize that, my interest was in the order in which the modules are loaded.
niffs wrote:its just that the ac97 modules load as well, and take over...
Take over how?
Top
niffs
Apprentice
Apprentice
User avatar
Posts: 212
Joined: Sun Apr 25, 2004 12:08 am
Location: The Wired
Contact:
Contact niffs
Website

  • Quote

Post by niffs » Sun Dec 31, 2006 7:08 am

Nevermind. I'm being a moron. Solution was creating /etc/asound.conf:

Code: Select all

pcm.!default {
 type hw
 card 1
}
ctl.!default {
 type hw
 card 1
}
I think what was happening was, modules for both cards were loaded, and when alsa found I hadn't specified a default in asound.conf, it just chose card #0, i.e. the AC97. Thanks for the help, and sorry for being stupid :oops:
No matter where you are... everyone is always connected.
[ .: my website :. ]
Top
djselbeck
n00b
n00b
User avatar
Posts: 34
Joined: Mon Oct 10, 2005 11:31 am
Location: Germany

  • Quote

Post by djselbeck » Sun Dec 31, 2006 12:16 pm

Hello,

i think you can also make the emu10k1 to card 0 if you edit the /etc/modules.d/alsa and add a new line at the end with this

Code: Select all

options snd-emu10k1 index=0 
. If you do this you need to change your /etc/asound.conf to use card 0 instead of card 1. This is the way i make my Delta1010LT default instead of my SB Live.

DJSelbeck
Top
niffs
Apprentice
Apprentice
User avatar
Posts: 212
Joined: Sun Apr 25, 2004 12:08 am
Location: The Wired
Contact:
Contact niffs
Website

  • Quote

Post by niffs » Sun Dec 31, 2006 3:47 pm

Interesting... I'll try this.
No matter where you are... everyone is always connected.
[ .: my website :. ]
Top
niffs
Apprentice
Apprentice
User avatar
Posts: 212
Joined: Sun Apr 25, 2004 12:08 am
Location: The Wired
Contact:
Contact niffs
Website

  • Quote

Post by niffs » Sun Dec 31, 2006 3:59 pm

Well, I tried it out, but it didn't really do much to help... so I'm just going back to using /etc/asound.conf to set card 1 as default.
No matter where you are... everyone is always connected.
[ .: my website :. ]
Top
slyyls
Tux's lil' helper
Tux's lil' helper
Posts: 89
Joined: Fri Aug 27, 2004 9:09 pm
Location: Ottawa

  • Quote

Post by slyyls » Fri Jan 05, 2007 6:47 pm

Hey everybody,

Alright, i have a similar problem, so instead of starting a new threat, i'm posting in this one.

My setup:

on-board sound card: via82xx
Quickcam pro 3000: snd-usb-audio

Problem:

The logitech quickcam becomes card0 (default) because it gets loaded first. No sound works because it tries to play to the quickcam which is a mic.

Code: Select all

cat /proc/asound/cards
 0 [U0x46d0x8b0    ]: USB-Audio - USB Device 0x46d:0x8b0
                      USB Device 0x46d:0x8b0 at usb-0000:00:10.0-1, full speed
 1 [V8235          ]: VIA8233 - VIA 8235
                      VIA 8235 with ALC650D at 0xdc00, irq 18
Possible solutions:

Code: Select all

/etc/modules.d/alsa
# OSS/Free portion - card #1
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
# OSS/Free portion - card #2
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-12 snd-pcm-oss

alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss

# Set this to the correct number of cards.
#option snd-via82xx index=-2

# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF version 1.0.13 ---
alias snd-card-1 snd-via82xx
alias sound-slot-1 snd-via82xx
alias snd-card-0 snd-usb-audio
alias sound-slot-0 snd-usb-audio
# --- END: Generated by ALSACONF, do not edit. ---
Tried fiddling with index=-2, index=0, ..., does not work.

Next, tried

Code: Select all

 /etc/asound.conf
pcm.!default {
 type hw
 card 1
}
ctl.!default {
 type hw
 card 1
}
when i run mplayer, i get the following error

Code: Select all

alsa-init: playback open error: Permission denied
Any help would be greatly appreciated,

Thanks

Sly
Top
slyyls
Tux's lil' helper
Tux's lil' helper
Posts: 89
Joined: Fri Aug 27, 2004 9:09 pm
Location: Ottawa

  • Quote

Post by slyyls » Fri Jan 05, 2007 6:57 pm

Hey,

Never mind, it was an operator error.

I was fixing this problem at the same time as fixing the Webcam/PVR problem (adding custom rules to udev because sometimes Quickcam was /dev/video0 and PVR was /dev/video1, other times it would be the opposite) and was using ssh. Problem was this ssh user was not in the audio group. I changed users and it seems to work now.

Thanks anyways,

Sly
Top
lramos85
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 141
Joined: Tue Jun 29, 2004 10:58 pm
Location: Riverside, Ca

  • Quote

Post by lramos85 » Wed Mar 28, 2007 4:38 am

I also have a similar problem with my usb-audio device. The problem is that I can't get any sound playback through my usb-audio device.

This is what I have:

Code: Select all

cat /proc/asound/cards
 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xefffc000 irq 50
 1 [Audio          ]: USB-Audio - USB Audio
                      USB Audio at usb-0000:00:1d.7-6.1.4, full speed
This is my alsa configuration file. I think this is where I'm doing things wrong. I manually added the lines for snd-usb-audio because I could not do that with the alsaconf. Is this a Problem?

Code: Select all

# Set this to the correct number of cards.
/etc/modules.d/alsa
# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF version 1.0.14rc1 ---
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel
alias snd-card-1 snd-usb-audio
alias sound-slot-1 snd-usb-audio
# --- END: Generated by ALSACONF, do not edit

Code: Select all

 /etc/asound.conf
pcm.!default {
 type hw
 card 1
}
ctl.!default {
 type hw
 card 1
}
this is my device:

Code: Select all

Bus 001 Device 009: ID 0d8c:0006 C-Media Electronics, Inc.

Code: Select all

lsmod | grep -i snd
snd_seq                60800  0
snd_usb_audio          87968  1
snd_usb_lib            20736  1 snd_usb_audio
snd_rawmidi            25600  1 snd_usb_lib
snd_seq_device         11924  2 snd_seq,snd_rawmidi
snd_hwdep              12552  1 snd_usb_audio
snd_hda_intel          20380  1
snd_hda_codec         191232  1 snd_hda_intel
snd_pcm                83976  3 snd_usb_audio,snd_hda_intel,snd_hda_codec
snd_timer              25864  2 snd_seq,snd_pcm
snd                    52656  13 snd_seq,snd_usb_audio,snd_rawmidi,snd_seq_device,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_pcm,snd_timer
soundcore              13216  1 snd
snd_page_alloc         12688  2 snd_hda_intel,snd_pcm

Code: Select all

dmesg | grep -i snd
snd-usb-audio 1-6.1.4:1.0: usb_probe_interface
snd-usb-audio 1-6.1.4:1.0: usb_probe_interface - got id
usbcore: registered new driver snd-usb-audio
It correctly changes my default audio device to snd-usb-audio (from my port replicator) but there is no sound. I get errors about not being able to use that device. Any idea?

Code: Select all

alsa-init: unable to set hw-parameters: Broken pipe
Registered Linux User #328996
Register Now!
Adpot an unanswered post today!
Top
Dominique_71
Veteran
Veteran
User avatar
Posts: 1957
Joined: Wed Aug 17, 2005 1:01 pm
Location: Switzerland (Romandie)

  • Quote

Post by Dominique_71 » Wed Mar 28, 2007 3:47 pm

If you read the f. doc, you will find the answer in ALSA-Configuration.txt in both the kernel sources and in alsa-driver doc (at the end of the file). You MUST have an index=x option for each sound card AND a cards_limit=y statement in /etc/modules.d/alsa. Don't forget to run modules_update. To test if it work, move or remove any .asoundrc file. Such a file is normally not needed and in all cases, it is not the place to define the default sound card. If it doesn't work (but it work), it is a bug and must be reported. Simple no?
"Confirm You are a robot." - the singularity
Top
lramos85
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 141
Joined: Tue Jun 29, 2004 10:58 pm
Location: Riverside, Ca

  • Quote

Post by lramos85 » Wed Mar 28, 2007 8:22 pm

I read the Documentation and did what you suggested, Although it is more clean now, it still doesn't work.

This is my new Config:

Code: Select all

options snd cards_limit=2
alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-usb-audio
options snd-hda-intel index=1
options snd-usb-audio index=0
alias sound-slot-0 snd-hda-intel
alias sound-slot-1 snd-usb-audio
Again, I'm able to switch to the snd-usb-audio perfectly, but it won't play any sound. I still get the same error:

Code: Select all

alsa-init: unable to set hw-parameters: Broken pipe
I also tried both the software and the kernel alsa with the same results. I have no idea what is wrong, Alsa recognizes the device (its a port replicator audio out plugs from C-Media) and it shows fine on the Mixer and everything. Guess its time for reporting a bug?
Registered Linux User #328996
Register Now!
Adpot an unanswered post today!
Top
lramos85
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 141
Joined: Tue Jun 29, 2004 10:58 pm
Location: Riverside, Ca

  • Quote

Post by lramos85 » Wed Mar 28, 2007 8:43 pm

:D Finally I got it to work. Turns out since I'm using a port replicator, and the sound device is inside of it, the snd-usb-audio device is technically connected through a USB Hub. I found out that this caused problems when I searched around the bug trackers and found that I needed to have this option SET in the kernel:

Code: Select all

# CONFIG_USB_EHCI_SPLIT_ISO
After setting that Option to YES, and make && make modules_install everything worked fine, thanks for everything.
Registered Linux User #328996
Register Now!
Adpot an unanswered post today!
Top
Post Reply

16 posts • Page 1 of 1

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic