Web lists-archives.org

Re: [linux-usb-devel] Re: [Spca50x-devs] [BUG] kernel stall in spca50x driver - reopened




michel Xhaard wrote:
> Le Vendredi 10 Mars 2006 15:31, thomas schorpp a écrit :
> 
> 
>>>Thomas,
>>>The problem here is very complex that should be:
>>>software:
>>>	The usb layer on the kernel API
>>>	The driver specially the spcadecoder
>>
>>most likely.
>>
>>
>>>Hardware or firmware:
>>>	The Aiptek DV3500
>>>	The usb Host controller
>>
>>impossible. unchanged since a year and working fine under winxp.
>>and worked under linux fine until at least kernel 2.6.13.
>>
>>
>>>As in all your report you speak about light or contrast we can raisonably
>>>disable the kernel API and the spcadecoder these two parts don't care
>>>about light :)
>>
>>hmm, ok theoretically.
>>
>>
>>>In the same way we can disable the Usb Host Controller.
>>>Now only the Aiptek DV3500 is on the list
>>>What about light and the video processor in the DV
>>>	If there are a lot of light the video processor on the DV decrease the
>>>times exposure, of course decreasing times exposure will increase the
>>>frame rate. As a second effect with a lot of light the jpeg encoder
>>>inside the chips find more details in the picture so the picture size
>>>increase. With this context we expect a very Hight CPU load
>>
>>ill check this.
>>
>>
>>>	If there are not enought light the video processor increase the times
>>>exposure that will of course decrease the frame rate.
>>>All this process are know to be Autoexposure, set inside the chips
>>>firmware. All spca jpg webcam is set with this feature by default. We did
>>>not have acces to this feature, know only by Sunplus and maybe M$
>>>developper.
>>>I suspect the chips to go out the limit of the Autoexposure and goes to
>>>sleep when the interrupt Handler withing the kernel is waiting for data .
>>
>>this could be traceable with verbose printk logs or debugfs.
>>if it is i will try to handle this state somehow if possible.
>>but this was surely *no* problem before 2.6.14. it worked just fine.
>>
>>
>>>I have no
>>>solution ATM and cannot produce the same effect as your DV3500 with my
>>>old DVII sorry :(
>>
>>sorry, but ive never seen autoexposure under linux with this device and the
>>spca driver. i had to have always adjust brightness manually.
>>so this would be out, too.
> 
> Can you on a running kernel do the following test:
> Dark context choice a room with small light
> 	run 
> 	spcaview -d /dev/video0 -f jpg -s 320x240
> 	after 30s stop spcaview with q
> 	note the frame rate get in the console.

done. immediate kernel lockup at startup. no logs.
picture usually complete black.

> Bright context maybe outdoor light
> 	run
> 	spcaview -d /dev/video0 -f jpg -s 320x240
> 	after 30s stop spcaview with q
> 	note the frame rate get in the console.
> Is there the same ? can you mail me the result.

done. camera against daylight room window.
varied light exposure by putting hand at front of the sensor 
slowly and repeatedly from 0-100%.

no issues. and the device does autoexposure at daylight :)

turnig camera back to room and making room dark slowly:
kernel lockup.
last picture 98% black.
remarkable was a sudden colour change from daylight to 
(flourescent) room light.

requested log attached.

> 
> Best regards

best regards,
thomas
 Spcaview version: 1.1.5 date: 12:12:2005 (C) mxhaard@xxxxxxxx 
 size width: 320 height: 240 
Initializing SDL.
SDL initialized.
bpp 3 format 21
Using video device /dev/video1.
Initializing v4l.
**************** PROBING CAMERA *********************
Camera found: Aiptek DV3500 Mpeg4 
Bridge found: SPCA536 
Bridge find SPCA536 number 10
StreamId: JPEG Camera
quality 5 autoexpo 1 Timeframe 0 
Bridge find SPCA536 number 10
Available Resolutions width 464  heigth 480 native  
Available Resolutions width 464  heigth 352 native  
Available Resolutions width 384  heigth 288 decoded  
Available Resolutions width 352  heigth 288 decoded  
Available Resolutions width 320  heigth 240 native *
Available Resolutions width 192  heigth 144 decoded  
Available Resolutions width 176  heigth 144 decoded  
*****************************************************
 grabbing method default MMAP asked 
VIDIOCGMBUF size 2457616  frames 2  offets[0]=0 offsets[1]=1228808
VIDIOCGPICT
brightnes=32768 hue=0 color=8192 contrast=8448 whiteness=0 
depth=8 palette=4
VIDIOCSPICT
brightness=32768 hue=0 color=8192 contrast=8448 whiteness=0 
depth=24 palette=21 


Stop asked

Used 60130ms for 1505 images => 39ms/image 25fps.
Quiting SDL.
Decoded frames:1505 Average decode time: 5.000000
unmapping
closing
closed
Destroy Picture thread ...
Quiting....