Skip to contentSkip to conversation

How to debug?

DISCUSSION Ronny Standtke 2 participants 5 messages Jan 30, 2007 – Feb 6, 2007

lore
Share & tools
lore
#0 lore raw

Hi all,

I am desperately trying to use a webcam and a headset with my Linux-Desktop (KDE). You can read the whole thread here:
http://lists.kde.org/?l=kde-linux&m=116749763322140&w=2
At the end someone from the KDE camp suggested that I come over here...

So I asked for help at the alsa-user mailing list:
http://www.mail-archive.com/alsa-user%40lists.sourceforge.net/msg18711.html
At the end nobody could tell me how to get more debugging info.

So please, how do I get more debugging info when reloading alsa? Or even better, does anybody know why my on-board soundcard disappears when I use the index options?

Greetings & Thank you

Ronny Standtke

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#1 lore raw

At Tue, 30 Jan 2007 22:51:28 +0100,

Quoted 7 lines · Ronny Standtke

Hi all,

I am desperately trying to use a webcam and a headset with my Linux-Desktop (KDE). You can read the whole thread here:
http://lists.kde.org/?l=kde-linux&m=116749763322140&w=2
At the end someone from the KDE camp suggested that I come over here...

Would have been better to put the questions here instead of URL to save the time of readers :) Anyway...

Quoted 8 lines

So I asked for help at the alsa-user mailing list:
http://www.mail-archive.com/alsa-user%40lists.sourceforge.net/msg18711.html
At the end nobody could tell me how to get more debugging info.

So please, how do I get more debugging info when reloading alsa? Or even better, does anybody know why my on-board soundcard disappears when I use the index options?

It's because your system loads the modules in a parallel manner. How did you set index options? Setting index=0 to snd-intel8x0, and index=-2 to snd-usb-audio would work. -2 means the next free slot except from the first slot (bit 0).

If this doesn't work, too, check whether the index options are really passed correctly. You can see the values in /sys/modules/snd*/parameters/index files.

Takashi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#2 lore raw

Hi Takashi,

Thank you very much for your reply.

Quoted 1 line

How did you set index options?

Here is what I did just now:

I removed all customizations from /etc/modprobe.d/alsa-base and reloaded alsa. Then all my soundcards are visible:

-----------

dhcppc0:~# cat /proc/asound/cards
 0 [I82801DBICH4   ]: ICH4 - Intel 82801DB-ICH4
                      Intel 82801DB-ICH4 with AD1980 at 0xeb000000, irq 217
 1 [Headset        ]: USB-Audio - Logitech USB Headset
                      Logitech Logitech USB Headset at usb-0000:00:1d.0-2, 
full speed
 2 [U0x46d0x8ce    ]: USB-Audio - USB Device 0x46d:0x8ce
                      USB Device 0x46d:0x8ce at usb-0000:00:1d.7-4, high speed
dhcppc0:~# cat /sys/module/snd_intel8x0/parameters/index
-1
dhcppc0:~# cat /sys/module/snd_usb_audio/parameters/index
-1,-1,-1,-1,-1,-1,-1,-1
-----------

The many "-1" indices for the snd_usb_audio module look strange. Is this normal?

Then I appended the following lines at the end of /etc/modprobe.d/alsa-base:
-----------
alias snd-card-0 snd-intel8x0
options snd-intel8x0 index=0
alias snd-card-1 snd-usb-audio
options snd-usb-audio index=-2
alias snd-card-2 snd-usb-audio
options snd-usb-audio index=-2
options snd cards_limit=3
-----------

Then I looked at the visible soundcards and the passed index options. Unfortunately the on-board soundcard is gone again!

-----------

dhcppc0:~# /etc/init.d/alsa reload
Unloading ALSA sound driver modules: snd-usb-audio snd-usb-lib snd-rawmidi 
snd-seq-device snd-hwdep snd-intel8x0 snd-ac97-codec snd-ac97-bus snd-pcm-oss 
snd-mixer-oss snd-pcm snd-timer snd-page-alloc.
Loading ALSA sound driver modules: snd-usb-audio snd-usb-lib snd-rawmidi 
snd-seq-device snd-hwdep snd-intel8x0 snd-ac97-codec snd-ac97-bus snd-pcm-oss 
snd-mixer-oss snd-pcm snd-timer snd-page-alloc.
dhcppc0:~# cat /proc/asound/cards
 0 [U0x46d0x8ce    ]: USB-Audio - USB Device 0x46d:0x8ce
                      USB Device 0x46d:0x8ce at usb-0000:00:1d.7-4, high speed
 1 [Headset        ]: USB-Audio - Logitech USB Headset
                      Logitech Logitech USB Headset at usb-0000:00:1d.0-2, 
full speed
dhcppc0:~# cat /sys/module/snd_intel8x0/parameters/index
0
dhcppc0:~# cat /sys/module/snd_usb_audio/parameters/index
-2,-1,-1,-1,-1,-1,-1,-1
-----------

So what can I do next? I would really like to help fixing this issue.

Greetings and Thank you again!

Ronny

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#3 lore raw

At Fri, 2 Feb 2007 21:44:47 +0100,

Quoted 27 lines · Ronny Standtke

Hi Takashi,

Thank you very much for your reply.

Quoted 1 line

How did you set index options?

Here is what I did just now:

I removed all customizations from /etc/modprobe.d/alsa-base and reloaded alsa. Then all my soundcards are visible:

-----------

dhcppc0:~# cat /proc/asound/cards
 0 [I82801DBICH4   ]: ICH4 - Intel 82801DB-ICH4
                      Intel 82801DB-ICH4 with AD1980 at 0xeb000000, irq 217
 1 [Headset        ]: USB-Audio - Logitech USB Headset
                      Logitech Logitech USB Headset at usb-0000:00:1d.0-2, 
full speed
 2 [U0x46d0x8ce    ]: USB-Audio - USB Device 0x46d:0x8ce
                      USB Device 0x46d:0x8ce at usb-0000:00:1d.7-4, high speed
dhcppc0:~# cat /sys/module/snd_intel8x0/parameters/index
-1
dhcppc0:~# cat /sys/module/snd_usb_audio/parameters/index
-1,-1,-1,-1,-1,-1,-1,-1
-----------
Quoted 2 lines

The many "-1" indices for the snd_usb_audio module look strange. Is this normal?

No, the first one should be -2, as you can see below.
I checked my system (with openSUSE 10.3-alpha) and it works fine. The module parameter gets the value in /etc/modprobe.d/sound file. So, apparently your system loads the module somehow uniquely without referring the modprobe config files.

Quoted 26 lines

Then I appended the following lines at the end of /etc/modprobe.d/alsa-base:
-----------
alias snd-card-0 snd-intel8x0
options snd-intel8x0 index=0
alias snd-card-1 snd-usb-audio
options snd-usb-audio index=-2
alias snd-card-2 snd-usb-audio
options snd-usb-audio index=-2
options snd cards_limit=3
-----------

Then I looked at the visible soundcards and the passed index options. Unfortunately the on-board soundcard is gone again!

-----------

dhcppc0:~# /etc/init.d/alsa reload
Unloading ALSA sound driver modules: snd-usb-audio snd-usb-lib snd-rawmidi 
snd-seq-device snd-hwdep snd-intel8x0 snd-ac97-codec snd-ac97-bus snd-pcm-oss 
snd-mixer-oss snd-pcm snd-timer snd-page-alloc.
Loading ALSA sound driver modules: snd-usb-audio snd-usb-lib snd-rawmidi 
snd-seq-device snd-hwdep snd-intel8x0 snd-ac97-codec snd-ac97-bus snd-pcm-oss 
snd-mixer-oss snd-pcm snd-timer snd-page-alloc.
dhcppc0:~# cat /proc/asound/cards
 0 [U0x46d0x8ce    ]: USB-Audio - USB Device 0x46d:0x8ce
                      USB Device 0x46d:0x8ce at usb-0000:00:1d.7-4, high speed
Quoted 8 lines
 1 [Headset        ]: USB-Audio - Logitech USB Headset
                      Logitech Logitech USB Headset at usb-0000:00:1d.0-2, 
full speed
dhcppc0:~# cat /sys/module/snd_intel8x0/parameters/index
0
dhcppc0:~# cat /sys/module/snd_usb_audio/parameters/index
-2,-1,-1,-1,-1,-1,-1,-1
-----------

If you have two usb devices, pass index=-2,-2. Otherwise the secondary usb device will occupy the first slot.

Takashi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#4 lore raw

Hi Takashi,

Thank you again very much for your help. The last hint was crucial.

So all I actually had to do to solve my problem was to add the following two lines to /etc/modprobe.d/alsa-base:
--------------
options snd-intel8x0 index=0
options snd-usb-audio index=-2,-2
--------------

It just took me two months to find out... I still think that it is the job of the desktop environment to search the configured soundcard at startup instead of letting poor users change system configuration files as root to hardcode the soundcard order. Maybe one day Linux can do this as user-friendly as the competition already does for several years now.

Greetings and thank you again

Ronny

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642