On Tuesday 12 December 2006 3:18 pm, Zhang Daniel wrote:
> Hi,
> Thanks Dave. Following  is what I got by cat /proc/bus/usb/devices.

Darn, I forgot that nobody ever fixed the bug where it doesn't show
the active configuration.  I append a patch (untested) that ought
to resolve that problem.


> The device is Logitech Pro 5000 webcam (one camera). The driver is 
> uvcvideo. The application is luvcview. The command is ./luvcview -f yuv -s 
> 640x480. 
> 
> Maybe Laurent (author of UVC driver) can join us also. 
> 
> I appreciate all the help. 
> 
> Daniel Zhang
> 
> T:  Bus=05 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 8
> B:  Alloc=616/800 us (77%), #Int=  0, #Iso=  5
> D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS= 8 #Cfgs=  1
> P:  Vendor=0000 ProdID=0000 Rev= 2.06
> S:  Manufacturer=Linux 2.6.13-15-smp ehci_hcd

This is a bit old, so it might help to try a newer kernel.

Also, to try a newer kernel with the experimental EHCI scheduling
patches Alan mentioned.


> S:  Product=EHCI Host Controller
> S:  SerialNumber=0000:00:1d.7
> C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
> I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
> E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=256ms
> 
> T:  Bus=05 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 10 Spd=480 MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
> P:  Vendor=046d ProdID=08c5 Rev= 0.05
> C:* #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=500mA
> I:  If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=01 Prot=00 Driver=uvcvideo
> E:  Ad=87(I) Atr=03(Int.) MxPS=  16 Ivl=16ms
> I:  If#= 1 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=02 Prot=00 Driver=uvcvideo
> I:  If#= 1 Alt= 1 #EPs= 1 Cls=ff(vend.) Sub=02 Prot=00 Driver=uvcvideo
> E:  Ad=81(I) Atr=01(Isoc) MxPS= 192 Ivl=125us
> I:  If#= 1 Alt= 2 #EPs= 1 Cls=ff(vend.) Sub=02 Prot=00 Driver=uvcvideo
> E:  Ad=81(I) Atr=01(Isoc) MxPS= 384 Ivl=125us
> I:  If#= 1 Alt= 3 #EPs= 1 Cls=ff(vend.) Sub=02 Prot=00 Driver=uvcvideo
> E:  Ad=81(I) Atr=01(Isoc) MxPS= 512 Ivl=125us
> I:  If#= 1 Alt= 4 #EPs= 1 Cls=ff(vend.) Sub=02 Prot=00 Driver=uvcvideo
> E:  Ad=81(I) Atr=01(Isoc) MxPS= 640 Ivl=125us
> I:  If#= 1 Alt= 5 #EPs= 1 Cls=ff(vend.) Sub=02 Prot=00 Driver=uvcvideo
> E:  Ad=81(I) Atr=01(Isoc) MxPS= 800 Ivl=125us
> I:  If#= 1 Alt= 6 #EPs= 1 Cls=ff(vend.) Sub=02 Prot=00 Driver=uvcvideo
> E:  Ad=81(I) Atr=01(Isoc) MxPS= 944 Ivl=125us
> I:  If#= 1 Alt= 7 #EPs= 1 Cls=ff(vend.) Sub=02 Prot=00 Driver=uvcvideo
> E:  Ad=81(I) Atr=01(Isoc) MxPS=1280 Ivl=125us
> I:  If#= 1 Alt= 8 #EPs= 1 Cls=ff(vend.) Sub=02 Prot=00 Driver=uvcvideo
> E:  Ad=81(I) Atr=01(Isoc) MxPS=1600 Ivl=125us
> I:  If#= 1 Alt= 9 #EPs= 1 Cls=ff(vend.) Sub=02 Prot=00 Driver=uvcvideo
> E:  Ad=81(I) Atr=01(Isoc) MxPS=1984 Ivl=125us
> I:  If#= 1 Alt=10 #EPs= 1 Cls=ff(vend.) Sub=02 Prot=00 Driver=uvcvideo
> E:  Ad=81(I) Atr=01(Isoc) MxPS=2688 Ivl=125us
> I:  If#= 1 Alt=11 #EPs= 1 Cls=ff(vend.) Sub=02 Prot=00 Driver=uvcvideo
> E:  Ad=81(I) Atr=01(Isoc) MxPS=3060 Ivl=125us

I'd assume the problem case is when you're using one of those last
few settings ... probably the very last one, just shy of 30 MByte/sec.


> I:  If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
> I:  If#= 3 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
> I:  If#= 3 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
> E:  Ad=86(I) Atr=05(Isoc) MxPS=  16 Ivl=1ms
> I:  If#= 3 Alt= 2 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
> E:  Ad=86(I) Atr=05(Isoc) MxPS=  32 Ivl=1ms
> I:  If#= 3 Alt= 3 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
> E:  Ad=86(I) Atr=05(Isoc) MxPS=  48 Ivl=1ms
> 

Update /proc/bus/usb/devices output to report active altsettings.

Signed-off-by: David Brownell <[EMAIL PROTECTED]>

Index: g26/drivers/usb/core/devices.c
===================================================================
--- g26.orig/drivers/usb/core/devices.c 2006-12-07 23:00:34.000000000 -0800
+++ g26/drivers/usb/core/devices.c      2006-12-13 13:01:19.000000000 -0800
@@ -104,7 +104,7 @@ static const char *format_config =
   
 static const char *format_iface =
 /* I:  If#=dd Alt=dd #EPs=dd Cls=xx(sssss) Sub=xx Prot=xx Driver=xxxx*/
-  "I:  If#=%2d Alt=%2d #EPs=%2d Cls=%02x(%-5s) Sub=%02x Prot=%02x Driver=%s\n";
+  "I:%c If#=%2d Alt=%2d #EPs=%2d Cls=%02x(%-5s) Sub=%02x Prot=%02x 
Driver=%s\n";
 
 static const char *format_endpt =
 /* E:  Ad=xx(s) Atr=xx(ssss) MxPS=dddd Ivl=D?s */
@@ -242,15 +242,19 @@ static char *usb_dump_interface_descript
 {
        const struct usb_interface_descriptor *desc = 
&intfc->altsetting[setno].desc;
        const char *driver_name = "";
+       int active = 0;
 
        if (start > end)
                return start;
        down_read(&usb_bus_type.subsys.rwsem);
-       if (iface)
+       if (iface) {
                driver_name = (iface->dev.driver
                                ? iface->dev.driver->name
                                : "(none)");
+               active = (desc == &iface->cur_altsetting->desc);
+       }
        start += sprintf(start, format_iface,
+                        active ? '*' : ' ',    /* mark active altsetting */
                         desc->bInterfaceNumber,
                         desc->bAlternateSetting,
                         desc->bNumEndpoints,
Index: g26/Documentation/usb/proc_usb_info.txt
===================================================================
--- g26.orig/Documentation/usb/proc_usb_info.txt        2006-08-04 
10:29:50.000000000 -0700
+++ g26/Documentation/usb/proc_usb_info.txt     2006-12-13 13:00:05.000000000 
-0800
@@ -213,15 +213,16 @@ C:* #Ifs=dd Cfg#=dd Atr=xx MPwr=dddmA
 
 Interface descriptor info (can be multiple per Config):
 
-I:  If#=dd Alt=dd #EPs=dd Cls=xx(sssss) Sub=xx Prot=xx Driver=ssss
-|   |      |      |       |             |      |       |__Driver name
-|   |      |      |       |             |      |          or "(none)"
-|   |      |      |       |             |      |__InterfaceProtocol
-|   |      |      |       |             |__InterfaceSubClass
-|   |      |      |       |__InterfaceClass
-|   |      |      |__NumberOfEndpoints
-|   |      |__AlternateSettingNumber
-|   |__InterfaceNumber
+I:* If#=dd Alt=dd #EPs=dd Cls=xx(sssss) Sub=xx Prot=xx Driver=ssss
+| | |      |      |       |             |      |       |__Driver name
+| | |      |      |       |             |      |          or "(none)"
+| | |      |      |       |             |      |__InterfaceProtocol
+| | |      |      |       |             |__InterfaceSubClass
+| | |      |      |       |__InterfaceClass
+| | |      |      |__NumberOfEndpoints
+| | |      |__AlternateSettingNumber
+| | |__InterfaceNumber
+| |__ "*" indicates the active altsetting (others are " ")
 |__Interface info tag
 
     A given interface may have one or more "alternate" settings.
@@ -277,7 +278,7 @@ of the USB devices on a system's root hu
 on how to do this.)
 
 The Interface lines can be used to determine what driver is
-being used for each device.
+being used for each device, and which altsetting it activated.
 
 The Configuration lines could be used to list maximum power
 (in milliamps) that a system's USB devices are using.

-------------------------------------------------------------------------
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
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to