Bug 247224 - usb audio device hides my NVidia CK804 audio
usb audio device hides my NVidia CK804 audio
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
7
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-06 00:29 EDT by Tom Horsley
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-09 11:19:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/var/log/messages when booting with no webcam plugged in (46.45 KB, text/plain)
2007-07-06 09:43 EDT, Tom Horsley
no flags Details
/var/log/messages booting with webcam plugged in (45.04 KB, text/plain)
2007-07-06 09:44 EDT, Tom Horsley
no flags Details
/var/log/dmesg booting with no webcam (24.61 KB, text/plain)
2007-07-06 09:45 EDT, Tom Horsley
no flags Details
/var/log/dmesg booting with webcam plugged in (24.82 KB, text/plain)
2007-07-06 09:45 EDT, Tom Horsley
no flags Details
scsconfig.log from working system (55.52 KB, text/plain)
2007-07-06 14:41 EDT, Tom Horsley
no flags Details
scsconfig.log from busted system (50.43 KB, text/plain)
2007-07-06 14:44 EDT, Tom Horsley
no flags Details

  None (edit)
Description Tom Horsley 2007-07-06 00:29:06 EDT
Description of problem:

Boot the system with a Logitech QuickCam Ultra Vision webcam plugged into
a usb port at boot time, and the motherboard native sound system vanishes
from the machine. ALSA doesn't see a speaker, or any of the CK804 inputs
it normally sees. (At first I thought this had something to do with the
uvcvideo driver, but the same thing happens if the uvcvideo driver is
not installed). Apparently strictly an issue with the USB microphone that
is part of the webcam. I see this message in the messages log:

usbcore: registered new interface driver snd-usb-audio

If I boot without the webcam plugged in, all the normal CK804 audio
devices show up OK, and then if I plug in the webcam, the USB mic
shows up in addition to the CK804.

Version-Release number of selected component (if applicable):

2.6.21-1.3194.fc7 and 2.6.21-1.3228.fc7 both exhibit the problem.

How reproducible:

Happens every time the device is plugged in at boot time.

Steps to Reproduce:
1. see description
  
Actual results:

no CK804 audio.

Expected results:

CK804 audio plus the USB audio

Additional info:

Here's the lsusb info for the cam:
Bus 002 Device 009: ID 046d:08c9 Logitech, Inc. 

The smolt profile for the machine is:
UUID: a601e213-cc4e-49cf-a786-7487b5849b92

No doubt someone will want lots of logs. Let me know which ones,
and I'll attach them to the bug report.
Comment 1 Tom Horsley 2007-07-06 09:42:20 EDT
I've gathered /var/log/messages and dmesg booting with and without the webcam
plugged in, and the most interesting bit of /var/log/messages seems to be here
without the webcam plugged in:

Jul  6 09:04:27 zooty kernel: parport0: Printer, Hewlett-Packard HP LaserJet 6L
Jul  6 09:04:27 zooty kernel: eth0: forcedeth.c: subsystem: 01565:2501 bound to
0000:00:0a.0
Jul  6 09:04:27 zooty kernel: shpchp: Standard Hot Plug PCI Controller Driver
version: 0.4
Jul  6 09:04:27 zooty kernel: EDAC MC0: Giving out device to k8_edac
Athlon64/Opteron: DEV 0000:00:18.2
Jul  6 09:04:27 zooty kernel: ACPI: PCI Interrupt Link [APC3] enabled at IRQ 18
Jul  6 09:04:27 zooty kernel: ACPI: PCI Interrupt 0000:01:0a.0[A] -> Link [APC3]
-> GSI 18 (level, low) -> IRQ 18
Jul  6 09:04:27 zooty kernel: fw_ohci: Added fw-ohci device 0000:01:0a.0, OHCI
version 1.0
Jul  6 09:04:27 zooty kernel: ACPI: PCI Interrupt Link [APCJ] enabled at IRQ 22
Jul  6 09:04:27 zooty kernel: ACPI: PCI Interrupt 0000:00:04.0[A] -> Link [APCJ]
-> GSI 22 (level, low) -> IRQ 22
Jul  6 09:04:27 zooty kernel: intel8x0_measure_ac97_clock: measured 51678 usecs
Jul  6 09:04:27 zooty kernel: intel8x0: clocking to 46803
Jul  6 09:04:27 zooty kernel: fw_core: created new fw device fw0 (0 config rom
retries)
Jul  6 09:04:27 zooty kernel: loop: loaded (max 8 devices)

With the webcam plugged in the same area in messages is quite different:

Jul  6 09:11:29 zooty kernel: parport0: PC-style at 0x378 (0x778), irq 7
[PCSPP,TRISTATE]
Jul  6 09:11:29 zooty kernel: ACPI: PCI Interrupt Link [APC3] enabled at IRQ 18
Jul  6 09:11:29 zooty kernel: ACPI: PCI Interrupt 0000:01:0a.0[A] -> Link [APC3]
-> GSI 18 (level, low) -> IRQ 18
Jul  6 09:11:29 zooty kernel: parport0: Printer, Hewlett-Packard HP LaserJet 6L
Jul  6 09:11:29 zooty kernel: fw_ohci: Added fw-ohci device 0000:01:0a.0, OHCI
version 1.0
Jul  6 09:11:29 zooty kernel: uvcvideo: Found UVC 1.00 device <unnamed> (046d:08c9)
Jul  6 09:11:29 zooty kernel: usbcore: registered new interface driver uvcvideo
Jul  6 09:11:29 zooty kernel: USB Video Class driver (v0.1.0)
Jul  6 09:11:29 zooty kernel: usbcore: registered new interface driver snd-usb-audio
Jul  6 09:11:29 zooty kernel: fw_core: created new fw device fw0 (0 config rom
retries)
Jul  6 09:11:29 zooty kernel: cannot find the slot for index 0 (range 0-0),
error: -16
Jul  6 09:11:29 zooty kernel: Intel ICH: probe of 0000:00:04.0 failed with error -12
Jul  6 09:11:29 zooty kernel: loop: loaded (max 8 devices)

Here's "amixer info" without the webcam plugged in:

Card default 'CK804'/'NVidia CK804 with ALC850 at irq 22'
  Mixer name	: 'Realtek ALC850 rev 0'
  Components	: 'AC97a:414c4790'
  Controls      : 42
  Simple ctrls  : 27

And here's the "amixer info" with the webcam plugged in at boot:

Card default 'U0x46d0x8c9'/'USB Device 0x46d:0x8c9 at usb-0000:00:02.1-2, high
speed'
  Mixer name	: 'USB Mixer'
  Components	: 'USB046d:08c9'
  Controls      : 2
  Simple ctrls  : 1
Comment 2 Tom Horsley 2007-07-06 09:43:44 EDT
Created attachment 158658 [details]
/var/log/messages when booting with no webcam plugged in
Comment 3 Tom Horsley 2007-07-06 09:44:20 EDT
Created attachment 158659 [details]
/var/log/messages booting with webcam plugged in
Comment 4 Tom Horsley 2007-07-06 09:45:00 EDT
Created attachment 158660 [details]
/var/log/dmesg booting with no webcam
Comment 5 Tom Horsley 2007-07-06 09:45:46 EDT
Created attachment 158661 [details]
/var/log/dmesg booting with webcam plugged in
Comment 6 Antti Huhtala 2007-07-06 09:55:04 EDT
My C-Media USB Headphone set if plugged in at boot also causes my NVidia CK8S
motherboard sound card detection to fail. This cannot be rectified by trying
System->Administration->Sound card detection while the system is running. The
only remedy I know is to reboot with USB headphones unplugged.
Comment 7 Chuck Ebbert 2007-07-06 14:19:47 EDT
Try booting with the USB device unplugged, plugging it in, then running sound
card detection...

Comment 8 Tom Horsley 2007-07-06 14:41:07 EDT
Created attachment 158686 [details]
scsconfig.log from working system

Looks like if I run system-config-soundcard when I plugin my webcam after
I've booted (i.e. the case where audio works), it has no trouble still
seeing the nvidia audio devices. I get two tabs in the system-config-soundcard
dialog, one for nvidia, and one for the usb device. This attachment is the
scsconfig.log file I wrote from the "System" page.
Comment 9 Tom Horsley 2007-07-06 14:44:44 EDT
Created attachment 158687 [details]
scsconfig.log from busted system

Having seen the interesting results from plugging in the webcam after boot,
I tried booting with the cam plugged in again, and system-config-soundcard
was possibly even more interesting in that case. Instead of two tabs for the
two audio devices, I only get 1 device showing up, but it isn't the usb
device, it is the nvidia CK804! Pressing the "play test sound" doesn't
work however. So I generated a new scsconfig.log and that log is this
attachment.
Comment 10 Tom Horsley 2007-07-06 19:59:41 EDT
More grist for the mill: When the system works (no webcame plugged in at boot)
the /proc/asound/cards file looks like:

 0 [CK804          ]: NFORCE - NVidia CK804
                      NVidia CK804 with ALC850 at irq 22

If I then plug in the webcam, it becomes:

 0 [CK804          ]: NFORCE - NVidia CK804
                      NVidia CK804 with ALC850 at irq 22
 1 [U0x46d0x8c9    ]: USB-Audio - USB Device 0x46d:0x8c9
                      USB Device 0x46d:0x8c9 at usb-0000:00:02.1-2, high speed

But if I reboot while the webcam is plugged in, all I see is this:

 0 [U0x46d0x8c9    ]: USB-Audio - USB Device 0x46d:0x8c9
                      USB Device 0x46d:0x8c9 at usb-0000:00:02.1-2, high speed

P.S. I neglected to mention in comment #8 above that the audio worked fine
both before and after running system-config-soundcard (and conversely in
comment #9 the audio was busted both before and after).
Comment 11 Tom Horsley 2007-07-06 20:26:07 EDT
One last piece of information - I renamed the usb audio driver .ko file:

In directory /lib/modules/2.6.21-1.3228.fc7/kernel/sound/usb/
mv snd-usb-audio.ko NOTsnd-usb-audio.koNOT

When I boot with the webcam plugged in, the nvidia audio does NOT disappear,
it is detected and functions normally, so whatever is screwing things up
seems to be in that particular kernel module.
Comment 12 Tom Horsley 2007-07-06 21:03:42 EDT
Having discovered that snd-usb-audio is the apparent source of the problem,
I filed this bug as well:

https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3222
Comment 13 Tom Horsley 2007-07-07 08:58:09 EDT
OK, over in the fedora-list, this reply to my thread on this bug contains
the answer: https://www.redhat.com/archives/fedora-list/2007-July/msg01139.html

The problem seems to be that fedora builds a modprobe.conf file that has this
in it:

alias snd-card-0 snd-intel8x0
options snd-card-0 index=0
options snd-intel8x0 index=0

but by the time it gets around to the nvidia audio, the usb audio device
it already occupying the slot for card0, so it fails utterly.

Adding these lines to modprobe.conf makes everything work fine at boot
time:

alias snd-card-1 snd-usb-audio
options snd-usb-audio index=1

I suppose because the usb winds up as card1 even if it is seen first.

Editorial comment: I really question the wisdom of a boot sequence that
initializes hot pluggable stuff before hardwired stuff :-).
Comment 14 Pete Zaitcev 2007-07-07 12:51:09 EDT
My wife wants and expects applications to work with her USB headset
automatically. The logic goes, if a user plugs a device in, he/she does
it in order to use it. This common case fails when a user plugs something
in unwittingly, like a webcam with a microphone.
Comment 15 Need Real Name 2007-07-07 18:31:41 EDT
Mr. Zaitcev commented:
"My wife wants and expects applications to work with her USB headset
automatically. The logic goes, if a user plugs a device in, he/she does it in
order to use it. This common case fails when a user plugs something in
unwittingly, like a webcam with a microphone."

How is that an argument against Tom's suggestion in comment #13 ("I really
question the wisdom of a boot sequence that initializes hot pluggable stuff
before hardwired stuff.")?

Doesn't your wife want both - applications to work automatically, AND for the
system to not mysteriously stop emitting sound?
Comment 16 Antti Huhtala 2007-07-08 11:53:15 EDT
(In reply to comment #7)
> Try booting with the USB device unplugged, plugging it in, then running sound
> card detection...
> 
> 
If I boot the box with USB device unplugged, sound card is detected
automatically, so there's no need to run sound card detection. Do you mean I
should try this anyway?
Comment 17 Antti Huhtala 2007-07-08 14:39:18 EDT
It seems like my problem with plugged-in USB headphones (Comment #6) has already
been addressed in a recent update. After 5th July, my modprobe.conf contains the
following lines:

alias snd-card-7 snd-usb-audio
options snd-usb-audio index=7

Because my motherboard sound card (NVidia CK8S) is defined as snd-card-0 in
modprobe.conf, it is now likely to be always detected first.

Please note that I didn't do anything about this myself, However, on 5th July
I've installed an update called 'jack-audio-connection-kit.x86_64 0.103.0-1.fc7'
Presumably this update has edited my modprobe.conf adding the two lines above.

In any case, when I today cold-booted my box with USB headphones plugged in,
there was no problem. My MB sound card worked, and so did the USB phones. For my
part, the problem seems to be solved.
Comment 18 Chuck Ebbert 2007-07-09 11:19:47 EDT
Problem was fixed in some unknown way, closing with 'worksforme'.
Comment 19 Tom Horsley 2007-07-09 11:42:37 EDT
My problem wasn't fixed in an unknown way - my problem was manually fixed by
hand editing the modprobe.conf file - the fact that I had to do that is
almost certainly something that should be considered a bug (though now that
I can recognize it, it will be a bug I know how to work around, just not
a bug all the other folks who run into it know how to work around :-).
Comment 20 Chuck Ebbert 2007-07-09 12:12:29 EDT
Running sound card detection after plugging in the USB card after
bootup should edit the modprobe.conf file automatically.

Note You need to log in before you can comment on or make changes to this bug.