You are not logged in.

#1 2012-03-04 20:40:22

aardwolf
Member
From: Belgium
Registered: 2005-07-23
Posts: 310

Multiple sound devices mayhem (wiki not helping)

In my computer, there are 3 things wanting to pretend to be sound devices:

*) The motherboard (HDA Intel PCH ALC892)
*) The USB webcam, logitec quickcam 9000 Pro --> Microphone only, yet this thing manages to confuse Linux into thinking it's a soundcard, thereby disabling all sound
*) The nvidia graphics card. Don't ask me how a graphics card can make sound, but does a hdmi port maybe have the ability to make sound or so??

Anyway, while using Skype, sometimes microphone works, sometimes it doesn't. I want my own microphone (plugged into the motherboard on the rear side) as mic, NOT the webcam, and definitely not the graphics card. Sometimes, the microphone is device 0,0, sometimes it's 1,0, and sometimes it's called "default".

Also, whenever booting into KDE, it gives some window about "forgetting" sound devices it detected last time.

Every boot, they're all there, but I think they sometimes swap positions or names.

I actually want ONLY the motherboard as sound device, and want Linux to treat the webcam as video only, and the graphics card as graphics only. And I want it to stabilize, so that I make it work in alsamixer, xmms and skype ONCE, and then it remains working forever without randomly changing.

Any ideas what I can do here? Thanks!

The wiki (https://wiki.archlinux.org/index.php/Ad … chitecture) isn't helping, it's asking to edit a file /etc/modprobe.d/alsa.conf that doesn't exist and isn't very clear about what format the name of the sound device to give should be, and the alsaconf they mention in the wiki is now disabled in arch...

EDIT: Here's the output of some commands from the wiki:


$lsmod | grep '^snd' | column -t

snd_hda_codec_hdmi     24121   4
snd_hda_codec_realtek  195514  1
snd_usb_audio          93493   5
snd_hda_intel          23375   5
snd_usbmidi_lib        18936   1   snd_usb_audio
snd_hda_codec          89160   3   snd_hda_intel,snd_hda_codec_realtek,snd_hda_codec_hdmi
snd_rawmidi            19458   1   snd_usbmidi_lib
snd_seq_device         5300    1   snd_rawmidi
snd_hwdep              6389    2   snd_hda_codec,snd_usb_audio
snd_pcm                74780   5   snd_hda_codec,snd_hda_intel,snd_usb_audio,snd_hda_codec_hdmi
snd_page_alloc         7153    2   snd_pcm,snd_hda_intel
snd_timer              19544   1   snd_pcm
snd                    59214   30  snd_timer,snd_pcm,snd_hwdep,snd_seq_device,snd_hda_codec,snd_rawmidi,snd_usbmidi_lib,snd_hda_intel,snd_usb_audio,snd_hda_codec_realtek,snd_hda_codec_hdmi

$ls -l /dev/snd

total 0
drwxr-xr-x 2 root root       60 Mar  4 21:11 by-id
drwxr-xr-x 2 root root      100 Mar  4 21:11 by-path
crw-rw---- 1 root audio 116,  3 Mar  4 21:11 controlC0
crw-rw---- 1 root audio 116,  9 Mar  4 21:11 controlC1
crw-rw---- 1 root audio 116, 18 Mar  4 21:11 controlC2
crw-rw---- 1 root audio 116,  8 Mar  4 21:11 hwC1D0
crw-rw---- 1 root audio 116, 17 Mar  4 21:11 hwC2D0
crw-rw---- 1 root audio 116, 16 Mar  4 21:11 hwC2D1
crw-rw---- 1 root audio 116, 15 Mar  4 21:11 hwC2D2
crw-rw---- 1 root audio 116, 14 Mar  4 21:11 hwC2D3                                                                                                                           
crw-rw---- 1 root audio 116,  2 Mar  4 21:36 pcmC0D0c                                                                                                                       
crw-rw---- 1 root audio 116,  7 Mar  4 21:36 pcmC1D0c                                                                                                                       
crw-rw---- 1 root audio 116,  6 Mar  4 21:46 pcmC1D0p                                                                                                                       
crw-rw---- 1 root audio 116,  5 Mar  4 21:36 pcmC1D1p                                                                                                                         
crw-rw---- 1 root audio 116,  4 Mar  4 21:36 pcmC1D2c
crw-rw---- 1 root audio 116, 13 Mar  4 21:11 pcmC2D3p
crw-rw---- 1 root audio 116, 12 Mar  4 21:11 pcmC2D7p
crw-rw---- 1 root audio 116, 11 Mar  4 21:11 pcmC2D8p
crw-rw---- 1 root audio 116, 10 Mar  4 21:11 pcmC2D9p
crw-rw---- 1 root audio 116,  1 Mar  4 21:11 seq
crw-rw---- 1 root audio 116, 33 Mar  4 21:11 timer

Last edited by aardwolf (2012-03-04 21:07:53)

Offline

#2 2012-03-04 22:24:19

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: Multiple sound devices mayhem (wiki not helping)

The most basic but somewhat stupid approach is to blacklist all non-required sound modules in your startup script.
Unless you do not use sound over HDMI (e.g. PC is connected to TV via HDMI for video plackback) you can for shure blacklist the corresponding module. The same should apply for the sound module in your webcam.

I did something similar back then:
https://bbs.archlinux.org/viewtopic.php?id=103495

Last edited by Darksoul71 (2012-03-04 22:25:54)


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#3 2012-03-05 22:07:21

masutu
Member
Registered: 2010-01-30
Posts: 40

Re: Multiple sound devices mayhem (wiki not helping)

You can also give your different sound devices fixed indices (fixed order). If not exists, create a file /etc/modprobe.d/alsa.conf or /etc/modprobe.d/sound.conf or whatever .conf and define the order of sound slots:

#/etc/modprobe.d/alsa.conf
options snd slots=snd-hda-intel,snd-usb-audio,...

First slot: card 0, second slot: card 1, ...
There is another handy option to give your devices neat custom names like

#/etc/modprobe.d/alsa.conf
options snd slots=snd-hda-intel,snd-usb-audio,...
options snd-hda-intel id="onboard"
options snd-usb-audio id="logitec"
...

Hope this helps!

Edit: more about multiple sound devices here at the alsa wiki.

Last edited by masutu (2012-03-05 22:11:44)

Offline

#4 2012-03-05 22:20:33

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: Multiple sound devices mayhem (wiki not helping)


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

Board footer

Powered by FluxBB