Bug 35922

Summary: SND_USB_AUDIO recording device not initializing correctly
Product: Drivers Reporter: bjoern
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: RESOLVED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: bastian.beischer, bigbedue, dgbaley27, florian, jose1711, joseph.salisbury, kernelorg, lephilousophe, maciej.rutecki, migo, oliver, rjw, stefan.heinsen, tiwai
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.39 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 32012    
Attachments: Output of lsusb -v
dmesg from step 3
dmesg from step 5
dmesg from step 5
dmesg from step 5
add RESET_RESUME quirk

Description bjoern 2011-05-26 10:30:32 UTC
Hello.

I found a regression. When trying to record audio from the integrated Mic of my Logitech webcam with the 2.6.39 Kernel the record is choppy or doesn't work at all, sometimes it works for one record but after that its broken again.
In kernel 2.6.38 everything works fine.

Here is what dmesg is telling me:

2:3:1: cannot get freq at ep 0x86
2:3:3: cannot set freq 32000 to ep 0x86
2:3:4: cannot set freq 48000 to ep 0x86
2:3:1: cannot set freq 16000 to ep 0x86
2:3:2: cannot set freq 24000 to ep 0x86
2:3:3: cannot set freq 32000 to ep 0x86
2:3:4: cannot set freq 48000 to ep 0x86
2:3:1: cannot set freq 16000 to ep 0x86
2:3:2: cannot set freq 24000 to ep 0x86
2:3:3: cannot set freq 32000 to ep 0x86
2:3:4: cannot set freq 48000 to ep 0x86
usb 1-3: reset high speed USB device number 2 using ehci_hcd
snd-usb-audio 1-3:1.2: no reset_resume for driver snd-usb-audio?
snd-usb-audio 1-3:1.3: no reset_resume for driver snd-usb-audio?
2:3:1: cannot set freq 16000 to ep 0x86
2:3:4: cannot set freq 48000 to ep 0x86
2:3:4: cannot set freq 48000 to ep 0x86
uvcvideo: Failed to set UVC commit control : -110 (exp. 26).
uvcvideo 1-3:1.1: resume error -5
2:3:1: cannot set freq 16000 to ep 0x86
2:3:2: cannot set freq 24000 to ep 0x86
2:3:3: cannot set freq 32000 to ep 0x86
2:3:4: cannot set freq 48000 to ep 0x86
2:3:1: cannot set freq 16000 to ep 0x86
2:3:2: cannot set freq 24000 to ep 0x86
2:3:3: cannot set freq 32000 to ep 0x86
2:3:4: cannot set freq 48000 to ep 0x86
2:3:1: cannot set freq 16000 to ep 0x86
2:3:2: cannot set freq 24000 to ep 0x86
2:3:3: cannot set freq 32000 to ep 0x86
2:3:4: cannot set freq 48000 to ep 0x86
usb 1-3: reset high speed USB device number 2 using ehci_hcd
2:3:2: cannot set freq 24000 to ep 0x86
2:3:4: cannot set freq 48000 to ep 0x86



Sometimes the record works after one of those "reset high speed USB device" messages.


And here is what audacity is telling me when recording audio:

$ audacity 
Expression 'ioctl( devHandle, SNDCTL_DSP_SPEED, &sr )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 412
Expression 'stream->capture.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3653
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1101
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1101
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1101
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1101
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1101
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1101
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1101
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1101
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1101
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1101
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1101
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1101
Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1300
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1876
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2000
Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1300
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1876
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2000
Expression 'stream->capture.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3653
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1101
Expression 'r' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1350
Expression 'PaAlsaStreamComponent_FinishConfigure( &self->capture, hwParamsCapture, inParams, self->primeBuffers, realSr, inputLatency )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1888
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2000


If any more information on this is needed I would be happy to test.
Comment 1 Takashi Iwai 2011-05-28 06:35:55 UTC
The only major USB-audio change is the support autosuspend and a fix of suspned/resume code.  Can it be the case?  They are commit
   88a8516a2128a6d078a106ead48092240e8a138f
and
   edf7de31c25ce72f163bf7d1fc0d2711869d073c

Otherwise I'd rather suspect a change in the USB core / controller side.
Comment 2 bjoern 2011-05-28 10:31:21 UTC
I just reverted the two commits you mentioned from the 2.6.39 Kernel And now the microphone works correctly again. So it is definitely related to USB-audio.
Comment 3 Takashi Iwai 2011-05-28 10:43:36 UTC
Could you figure out which of these commit affects?
Comment 4 bjoern 2011-05-28 11:58:12 UTC
According to my testing commit 
  88a8516a2128a6d078a106ead48092240e8a138f
is the offending one.
Comment 5 Takashi Iwai 2011-05-28 13:13:45 UTC
So it's the auto-suspend patch...
Comment 6 Oliver Neukum 2011-05-30 07:47:18 UTC
(In reply to comment #0)
> Hello.
> 
> I found a regression. When trying to record audio from the integrated Mic of
> my
> Logitech webcam with the 2.6.39 Kernel the record is choppy or doesn't work
> at
> all, sometimes it works for one record but after that its broken again.
> In kernel 2.6.38 everything works fine.
> 
> Here is what dmesg is telling me:

> 2:3:4: cannot set freq 48000 to ep 0x86
> usb 1-3: reset high speed USB device number 2 using ehci_hcd
> snd-usb-audio 1-3:1.2: no reset_resume for driver snd-usb-audio?
> snd-usb-audio 1-3:1.3: no reset_resume for driver snd-usb-audio?

I need to know why the kernel wants to do a reset_resume(). Can you please attach "lsusb -v"?
Comment 7 bjoern 2011-05-30 17:37:11 UTC
Created attachment 60132 [details]
Output of lsusb -v

Heres The output of lsusb -v with the camera connected. I didn't record anything beforehand.
Comment 8 Oliver Neukum 2011-05-31 10:10:26 UTC
This still doesn't make clear why reset_resume() is called. Could you compile with CONFIG_PM_DEBUG and do the following test:

1. attach device
2. write "auto" into its power/control attribute, wait 10 seconds write "on
3. attach dmesg
4. write "auto", wait 10 seconds, record something
4. attach dmesg
Comment 9 bjoern 2011-06-02 13:10:06 UTC
I'll be on holiday this weekend. so won't be able to try this until Monday.
Comment 10 bjoern 2011-06-06 17:40:21 UTC
Created attachment 60942 [details]
dmesg from step 3
Comment 11 bjoern 2011-06-06 17:51:59 UTC
Created attachment 60952 [details]
dmesg from step 5

I just did what you said.

I wrote the power contol things to the file:
   /sys/devices/pci0000:00/0000:00:1d.0/usb2/driver/1-3/1-3:1.2/sound/card1/power/control

Hope this was correct. 

The dmesg from step 5 was saved after recording worked fist time. Beforehand it failed about 4 times.

there is a flood of:
    "scsi host1: rpm_resume flags 0x4
     scsi host1: rpm_resume returns 1"
(and some other funny stuff)
in the log, I hope this doesn't matter.
Comment 12 Oliver Neukum 2011-06-07 10:48:28 UTC
(In reply to comment #11)

> Hope this was correct.

Absolutely correct.

> The dmesg from step 5 was saved after recording worked fist time. Beforehand
> it
> failed about 4 times.

That _is_ a problem. I need a log of a failure to know what's wrong
 
> there is a flood of:
>     "scsi host1: rpm_resume flags 0x4
>      scsi host1: rpm_resume returns 1"
> (and some other funny stuff)
> in the log, I hope this doesn't matter.

The SCSI core now can do power management. The message means that it thinks that a device would have to be resumed no. And "rpm_resume returns 1" means that everything is alright. A device doesn't need to be resumed, because it is already active.
Comment 13 bjoern 2011-06-07 20:21:17 UTC
Created attachment 61142 [details]
dmesg from step 5

Ok. now here the last one is a fail.
Comment 14 Oliver Neukum 2011-06-17 08:28:02 UTC
(In reply to comment #13)
> Created an attachment (id=61142) [details]
> dmesg from step 5
> 
> Ok. now here the last one is a fail.

This log contains no failure coming from the kernel. Did you see only arecord fail? Could you indicate when exactly in a log the failure happens?
Comment 15 Oliver Neukum 2011-06-17 14:25:56 UTC
And please also compile with CONFIG_USB_DEBUG. This bug is hiding itself well.
Comment 16 bjoern 2011-06-24 23:49:20 UTC
Created attachment 63442 [details]
dmesg from step 5

... ok I recompiled with USB_DEBUG.

I see this happen with arecord, audacity, teamspeak3 and Skype .... so it's definitely no application specific Problem.

When it works I think it most of the time kinda lags before the record is beginning.
When it fails there are two possibilities. Either the audio stream just seems to stay empty and will give me empty record files.
Or I get an error message like: "Error while opening sound device." (from audacity)

I cut out a part of the log-file that should correspond to the moment where it failed with an error message:

scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
snd-usb-audio 1-3:1.2: rpm_resume flags 0x4
usb 1-3: rpm_resume flags 0x0
usb usb1: rpm_resume flags 0x0
ehci_hcd 0000:00:1d.7: rpm_resume flags 0x0
ehci_hcd 0000:00:1d.7: rpm_resume returns 1
usb usb1: usb auto-resume
ehci_hcd 0000:00:1d.7: resume root hub
hub 1-0:1.0: hub_resume
hub 1-0:1.0: port 3: status 0507 change 0000
usb usb1: rpm_resume returns 0
usb 1-3: usb auto-resume
hub 1-0:1.0: state 7 ports 8 chg 0000 evt 0000
hub 1-0:1.0: rpm_resume flags 0x4
hub 1-0:1.0: rpm_resume returns 0
hub 1-0:1.0: rpm_suspend flags 0x4
hub 1-0:1.0: rpm_suspend returns 0
ehci_hcd 0000:00:1d.7: GetStatus port:3 status 001005 0  ACK POWER sig=se0 PE CONNECT
usb 1-3: finish resume
usb 1-3: rpm_resume returns 0
snd-usb-audio 1-3:1.2: rpm_resume returns 0
PM: Adding info for No Bus:ep_86
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
PM: Removing info for No Bus:ep_86
snd-usb-audio 1-3:1.2: rpm_suspend flags 0x4
snd-usb-audio 1-3:1.2: rpm_suspend returns 0
usb 1-3: rpm_suspend flags 0x8
usb 1-3: rpm_suspend returns 0
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
snd-usb-audio 1-3:1.2: rpm_resume flags 0x4
snd-usb-audio 1-3:1.2: rpm_resume returns 0
PM: Adding info for No Bus:ep_86
usb 1-3: rpm_suspend flags 0x9
usb 1-3: rpm_suspend returns -16
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
PM: Removing info for No Bus:ep_86
snd-usb-audio 1-3:1.2: rpm_suspend flags 0x4
snd-usb-audio 1-3:1.2: rpm_suspend returns 0
usb 1-3: rpm_suspend flags 0x8
usb 1-3: rpm_suspend returns 0
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
usb 1-3: rpm_suspend flags 0x9
usb 1-3: rpm_suspend returns 0
usb 1-3: rpm_suspend flags 0xa
usb 1-3: usb auto-suspend
usb 1-3: rpm_suspend returns 0
usb usb1: rpm_suspend flags 0x8
usb usb1: rpm_suspend returns 0
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
usb usb1: rpm_suspend flags 0x9
usb usb1: rpm_suspend returns 0
usb usb1: rpm_suspend flags 0x9
usb usb1: rpm_suspend returns 0
usb usb1: rpm_suspend flags 0xa
hub 1-0:1.0: hub_suspend
usb usb1: bus auto-suspend
ehci_hcd 0000:00:1d.7: suspend root hub
usb usb1: rpm_suspend returns 0
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
snd-usb-audio 1-3:1.2: rpm_resume flags 0x4
usb 1-3: rpm_resume flags 0x0
usb usb1: rpm_resume flags 0x0
ehci_hcd 0000:00:1d.7: rpm_resume flags 0x0
ehci_hcd 0000:00:1d.7: rpm_resume returns 1
usb usb1: usb auto-resume
ehci_hcd 0000:00:1d.7: resume root hub
hub 1-0:1.0: hub_resume
hub 1-0:1.0: port 3: status 0507 change 0000
usb usb1: rpm_resume returns 0
usb 1-3: usb auto-resume
hub 1-0:1.0: state 7 ports 8 chg 0000 evt 0000
hub 1-0:1.0: rpm_resume flags 0x4
hub 1-0:1.0: rpm_resume returns 0
hub 1-0:1.0: rpm_suspend flags 0x4
hub 1-0:1.0: rpm_suspend returns 0
ehci_hcd 0000:00:1d.7: GetStatus port:3 status 001005 0  ACK POWER sig=se0 PE CONNECT
usb 1-3: finish resume
usb 1-3: rpm_resume returns 0
snd-usb-audio 1-3:1.2: rpm_resume returns 0
PM: Adding info for No Bus:ep_86
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
PM: Removing info for No Bus:ep_86
snd-usb-audio 1-3:1.2: rpm_suspend flags 0x4
snd-usb-audio 1-3:1.2: rpm_suspend returns 0
usb 1-3: rpm_suspend flags 0x8
usb 1-3: rpm_suspend returns 0
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
snd-usb-audio 1-3:1.2: rpm_resume flags 0x4
snd-usb-audio 1-3:1.2: rpm_resume returns 0
PM: Adding info for No Bus:ep_86
usb 1-3: rpm_suspend flags 0x9
usb 1-3: rpm_suspend returns -16
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
PM: Removing info for No Bus:ep_86
snd-usb-audio 1-3:1.2: rpm_suspend flags 0x4
snd-usb-audio 1-3:1.2: rpm_suspend returns 0
usb 1-3: rpm_suspend flags 0x8
usb 1-3: rpm_suspend returns 0
usb 1-3: rpm_suspend flags 0x9
usb 1-3: rpm_suspend returns 0
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
usb 1-3: rpm_suspend flags 0x9
usb 1-3: rpm_suspend returns 0
usb 1-3: rpm_suspend flags 0xa
usb 1-3: usb auto-suspend
usb 1-3: rpm_suspend returns 0
usb usb1: rpm_suspend flags 0x8
usb usb1: rpm_suspend returns 0
snd-usb-audio 1-3:1.2: rpm_resume flags 0x4
usb 1-3: rpm_resume flags 0x0
usb usb1: rpm_resume flags 0x0
usb usb1: rpm_resume returns 1
usb 1-3: usb auto-resume
ehci_hcd 0000:00:1d.7: GetStatus port:3 status 001005 0  ACK POWER sig=se0 PE CONNECT
usb 1-3: finish resume
usb 1-3: rpm_resume returns 0
snd-usb-audio 1-3:1.2: rpm_resume returns 0
PM: Adding info for No Bus:ep_86
usb usb1: rpm_suspend flags 0x9
usb usb1: rpm_suspend returns -16
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
PM: Removing info for No Bus:ep_86
snd-usb-audio 1-3:1.2: rpm_suspend flags 0x4
snd-usb-audio 1-3:1.2: rpm_suspend returns 0
usb 1-3: rpm_suspend flags 0x8
usb 1-3: rpm_suspend returns 0
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
usb 1-3: rpm_suspend flags 0x9
usb 1-3: rpm_suspend returns 0
usb 1-3: rpm_suspend flags 0xa
usb 1-3: usb auto-suspend
usb 1-3: rpm_suspend returns 0
usb usb1: rpm_suspend flags 0x8
usb usb1: rpm_suspend returns 0
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
snd-usb-audio 1-3:1.2: rpm_resume flags 0x4
usb 1-3: rpm_resume flags 0x0
usb usb1: rpm_resume flags 0x0
usb usb1: rpm_resume returns 1
usb 1-3: usb auto-resume
ehci_hcd 0000:00:1d.7: GetStatus port:3 status 001005 0  ACK POWER sig=se0 PE CONNECT
usb 1-3: finish resume
usb 1-3: rpm_resume returns 0
snd-usb-audio 1-3:1.2: rpm_resume returns 0
PM: Adding info for No Bus:ep_86
usb 1-3: audacity timed out on ep0in len=3/3
2:3:4: cannot get freq at ep 0x86
usb usb1: rpm_suspend flags 0x9
usb usb1: rpm_suspend returns -16
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
PM: Removing info for No Bus:ep_86
snd-usb-audio 1-3:1.2: rpm_suspend flags 0x4
snd-usb-audio 1-3:1.2: rpm_suspend returns 0
usb 1-3: rpm_suspend flags 0x8
usb 1-3: rpm_suspend returns 0
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
snd-usb-audio 1-3:1.2: rpm_resume flags 0x4
snd-usb-audio 1-3:1.2: rpm_resume returns 0
PM: Adding info for No Bus:ep_86
usb 1-3: rpm_suspend flags 0x9
usb 1-3: rpm_suspend returns -16
usb 1-3: audacity timed out on ep0out len=0/3
2:3:4: cannot set freq 48000 to ep 0x86
PM: Removing info for No Bus:ep_86
snd-usb-audio 1-3:1.2: rpm_suspend flags 0x4
snd-usb-audio 1-3:1.2: rpm_suspend returns 0
usb 1-3: rpm_suspend flags 0x8
usb 1-3: rpm_suspend returns 0
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
usb 1-3: rpm_suspend flags 0x9
usb 1-3: rpm_suspend returns 0
usb 1-3: rpm_suspend flags 0xa
usb 1-3: usb auto-suspend
usb 1-3: rpm_suspend returns 0
usb usb1: rpm_suspend flags 0x8
usb usb1: rpm_suspend returns 0
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
usb usb1: rpm_suspend flags 0x9
usb usb1: rpm_suspend returns 0
usb usb1: rpm_suspend flags 0x9
usb usb1: rpm_suspend returns 0
usb usb1: rpm_suspend flags 0xa
hub 1-0:1.0: hub_suspend
usb usb1: bus auto-suspend
ehci_hcd 0000:00:1d.7: suspend root hub
usb usb1: rpm_suspend returns 0
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
scsi host1: rpm_resume flags 0x4
scsi host1: rpm_resume returns 1
Comment 17 Oliver Neukum 2011-07-05 22:18:44 UTC
Created attachment 64722 [details]
add RESET_RESUME quirk

According to the log the device has a firmware problem. Please test this patch, also with normal suspend/resume of the whole system.
Comment 18 bjoern 2011-07-10 17:21:13 UTC
Hey, I just tested the patch and everything seems to work correctly now.

I've tried it several times with different Applications.


Audacity sometimes got stuck when the record started and I had to retry but I would think this is a Problem of Audacity since all the other Programs never showed such behaviour.


So problem solved, thank you very much. :D
Comment 19 bjoern 2011-07-22 16:04:19 UTC
Hey, I just wanted to ask what is going to happen now?
There shouldn't be any mire Info needed. should it be set to resolved?
Comment 20 Philippe Valembois 2011-07-31 14:59:02 UTC
Hello,
I am not sure it's the right place to post. Anyway, I have the same problem with my Logitech C310 webcam.
Modifying the patch according to my VID:PID fixes the bug.
My VID:PID are : 0x046d, 0x081b
Comment 21 Florian Mickler 2011-08-04 19:42:55 UTC
Patch: https://bugzilla.kernel.org/attachment.cgi?id=64722

@bjoern; well, now you have to find someone to send it Linus'wards.. which probably Oliver already took care of? Check the archives of the usb mailinglist or ping Oliver about it. 

@Philippe: submit that patch to the usb mailinglist with a pointer to this bugreport (see Documentation/SubmittingPatches) or just ping Oliver to adapt the original patch accordingly.
Comment 22 Stefan Heinsen 2011-08-05 18:12:40 UTC
The problem also appears on a logitech C250 and can be fixed the same way as on the C270.
As noted in #20 at least the C310 has that problem too, probably more devices have.

It would be nice if you could add the C250 to the patch.
 
lsusb:
> Bus 001 Device 002: ID 046d:0804 Logitech, Inc. Webcam C250
Comment 23 Oliver Neukum 2011-08-08 13:42:36 UTC
Patches for C250, C270 and C310 have been submitted.
Comment 24 Bastian Beranek 2011-08-08 19:47:52 UTC
Hi,

same problem here, with lsusb:
046d:0807 Logitech, Inc. Webcam B500

(The actual name of the webcam - according to the box it was sold in - is C500, instead of B500, don't know what you prefer to call it)
Comment 25 Matthew Monaco 2011-08-08 20:22:20 UTC
I need this for my "06f8:3005 Guillemot Corp. Hercules Dualpix Exchange" and "046d:0809 Logitech, Inc. Webcam Pro 9000". Is there a more general issue here?
Comment 26 jose1711 2011-08-08 22:12:26 UTC
the patch also resolves same recording problem for C200. lsusb:

Bus 001 Device 003: ID 046d:0802 Logitech, Inc. Webcam C200

it would be great if it can be submitted as well. cheers, jose
Comment 27 Oliver Neukum 2011-08-09 08:09:07 UTC
There is a pattern, definitely. The problem is that we cannot fix this by simply not autosuspending webcams. The firmware in those devices seems to have a race condition that can crash them on resumption. This is not limited to runtime power management. It is merely much easier to trigger. It can also happen on ordinary suspend/resume. Hence the devices must be treated as quirky.
Comment 28 Matthew Monaco 2011-08-09 21:32:49 UTC
Oliver,

Is there anything that can be done without the quirk in the meantime like a module option or writing something to /sys?
Comment 29 Oliver Neukum 2011-08-27 13:58:30 UTC
(In reply to comment #28)
> Oliver,
> 
> Is there anything that can be done without the quirk in the meantime like a
> module option or writing something to /sys?

You'd race against the autosuspend. And you likely loose that race. You just can disable autosuspend in total with the "autosuspend" kernel parameter, but you can still be bitten if the whole system is suspended.
Comment 30 Matthew Monaco 2011-08-28 03:33:56 UTC
Do I have to open up an additional bug to get the quirks for my two webcams (and the others listed in the comments)?
Comment 31 Michael Berg 2012-06-02 19:14:46 UTC
Sorry to reopen this old Thing, but the Problem seems to exists in recent Kernels:
Linux scott 3.3.7-1-ARCH #1 SMP PREEMPT Tue May 22 00:26:26 CEST 2012 x86_64 GNU/Linux

Is there a new Bug for that Kernel Version?

To clarify: My System hangs or doesn't even boot properly "sometimes", then the log is flooded with

Jun  2 20:42:17 localhost kernel: [  984.523418] 2:3:4: cannot set freq 48000 to ep 0x86
Jun  2 20:42:18 localhost kernel: [  985.523349] 2:3:4: cannot set freq 48000 to ep 0x86
Jun  2 20:42:19 localhost kernel: [  986.523412] 2:3:4: cannot set freq 48000 to ep 0x86

Blasklisting snd_usb_audio ot unplugging my webcam (Bus 001 Device 002: ID 046d:0825 Logitech, Inc. Webcam C270) solves the Problem.
Comment 32 Mikhael Goikhman 2012-07-03 22:59:52 UTC
My Logitech C210 webcam stopped to work after some rawhide update a month or so ago (/var/log/messages is flooded with "cannot set freq 48000 to ep 0x86").

# lsusb | grep Webcam
Bus 001 Device 010: ID 046d:0819 Logitech, Inc. Webcam C210
# uname -a
Linux sparta.2y.net 3.5.0-0.rc3.git0.2.fc18.i686 #1 SMP Mon Jun 18 15:32:29 UTC 2012 i686 i686 i386 GNU/Linux

Used a hint in the previous comment to make video (ucview, xaw) work again:

# killall pulseaudio 
# rmmod snd_usb_audio

Of course disabling snd_usb_audio solves the webcam video only, but leaves me without a webcam microphone...
Comment 33 kernelorg 2012-07-13 08:14:08 UTC
There is definetely a regression. Tested on two kernel version.


1) 3.4.4 (from core/linux repo)
Webcam working, microphone working.

# dmesg
[    8.170223] 3:3:2: cannot set freq 24000 to ep 0x86
[    8.312677] usbcore: registered new interface driver snd-usb-audio

# uname -a
Linux ROMAN-5720ZG 3.4.4-2-ARCH #1 SMP PREEMPT Sun Jun 24 18:59:47 CEST 2012 x86_64 GNU/Linux

# lsusb | grep Webcam
Bus 007 Device 003: ID 046d:081b Logitech, Inc. Webcam C310

Configuration: http://dl.dropbox.com/u/42925887/linux_bug35922/linux-3.4.4.config.xz


2) 3.5.0-rc6 (from torvalds/linux.git, commit 918227bb1b59444a2c467711fd50cc22bb4a897b)
Webcam NOT working, microphone NOT working.

# dmesg
[    9.060432] usbcore: registered new interface driver snd-usb-audio
...
[   62.626139] 3:-1:4: cannot set freq 48000 to ep 0x86
[   62.632639] 3:-1:4: cannot set freq 48000 to ep 0x86
... (many same lines in here)
[   76.865398] 3:-1:4: cannot set freq 48000 to ep 0x86
[   79.204290] uvcvideo: Failed to set UVC probe control : -71 (exp. 26).
[   79.208412] uvcvideo: Failed to set UVC probe control : -71 (exp. 26).
[   79.215681] uvcvideo: Failed to set UVC commit control : -71 (exp. 26).

# uname -a
Linux ROMAN-5720ZG 3.5.0-rc6-custom #1 SMP PREEMPT Fri Jul 13 11:29:10 MSK 2012 x86_64 GNU/Linux

Configuration: http://dl.dropbox.com/u/42925887/linux_bug35922/linux-3.5.0-rc6.config.xz
Comment 34 Mikhael Goikhman 2012-07-13 16:21:06 UTC
This bug appears to be closed. New bug 44281 was opened for this regression in 3.5.0-rc1.