Date: Thu, 26 Nov 2020 20:13:02 +0100 From: Thomas Steen Rasmussen <thomas@gibfest.dk> To: Hans Petter Selasky <hps@selasky.org> Cc: usb@freebsd.org Subject: Re: webcamd, usb and two webcams - only one works Message-ID: <028f7e83-a50a-daad-2c61-c82538d7e4f1@gibfest.dk> In-Reply-To: <1d1fdacc-453c-b4db-1879-5f1609093e50@selasky.org> References: <c11c1a2f-306f-3cd9-825f-4c39fd250d50@gibfest.dk> <9a382539-c90d-91b9-bfac-f36c0f19d3f7@selasky.org> <723be24d-b2fe-85df-4961-5483004050e8@gibfest.dk> <f49afce8-e055-d432-b374-4af10bf7d70e@selasky.org> <cdadc525-e4f9-6cde-26f3-15d7594bd5ee@gibfest.dk> <6c527c1f-62a6-3089-50b8-02cda74b4eb1@selasky.org> <13180470-0336-b115-ce31-bc392ff8da76@gibfest.dk> <638a1059-f8dc-59c5-21ff-aabc380cac28@selasky.org> <0330eee1-e22c-82b9-1c50-4e8c42bf9466@gibfest.dk> <2338ae76-aa3e-8ee6-1cda-f12ec6cf9648@selasky.org> <ade99dc2-a080-9da7-34c4-d8c2ffaa53d8@gibfest.dk> <1d1fdacc-453c-b4db-1879-5f1609093e50@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/26/20 5:43 PM, Hans Petter Selasky wrote: > On 11/26/20 5:05 PM, Thomas Steen Rasmussen wrote: >> >> I see. What does this mean? >> >> Since the same problem is also on different computer, intel instead of >> AMD. >> >> Same problem also occurred when I replaced one of the webcams with a >> different model. >> >> It isn't clear to me whether this is a problem/bug in one or more of >> the webcams or drivers, or in freebsd or somewhere else? >> >> Thank you for your time and patience with this :) > > Hi, > > The xHCI controller has some logic to reserve bandwidth in bytes per > frame (125us for High speed or 1ms for Full speed) for various > endpoints. If these numbers are wrong the xHCI controller may think > there is no bandwidth and will not activate the endpoint and schedule > the transactions. > > Maybe my Skylake xHCI doesn't care about these values :-( > > Reference: > https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/extensible-host-controler-interface-usb-xhci.pdf > OK thanks. I have managed to get a bit futher. I found a third and fourth webcam and plugged them into the NUC. The two new webcams are: ==================== $ sudo usbconfig -d ugen0.5 dump_device_desc ugen0.5: <HD 720P Webcam HD 720P Webcam> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x00ef <Miscellaneous device> bDeviceSubClass = 0x0002 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0x0c45 idProduct = 0x6341 bcdDevice = 0x0000 iManufacturer = 0x0002 <HD 720P Webcam> iProduct = 0x0001 <HD 720P Webcam> iSerialNumber = 0x0003 <20130901> bNumConfigurations = 0x0001 $ sudo usbconfig -d ugen0.6 dump_device_desc ugen0.6: <vendor 0x046d BRIO 4K Stream Edition> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (224mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0310 bDeviceClass = 0x00ef <Miscellaneous device> bDeviceSubClass = 0x0002 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0009 idVendor = 0x046d idProduct = 0x086b bcdDevice = 0x0317 iManufacturer = 0x0000 <no string> iProduct = 0x0002 <BRIO 4K Stream Edition> iSerialNumber = 0x0003 <32213179> bNumConfigurations = 0x0001 ==================== After playing around a bit I've concluded that the problem seems to follow the "HD 720p" I just plugged in, as well as the webcam I have two of, this one: ==================== ugen0.6: <Jieli Technology USB PHY 2.0> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x00ef <Miscellaneous device> bDeviceSubClass = 0x0002 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0x1224 idProduct = 0x2a25 bcdDevice = 0x0100 iManufacturer = 0x0001 <Jieli Technology> iProduct = 0x0002 <USB PHY 2.0> iSerialNumber = 0x0000 <no string> bNumConfigurations = 0x0001 ==================== Whichever one of the two Jielis and the HD 720p is plugged in first works, the following ones do not. All of this is using the same externally powered USB hub from earlier. If I instead plug one of the Jielis into the front plug in the NUC and the other one into the USB hub (which is plugged into the back of the NUC), both Jielis work together! Very weird, looks like this in devinfo: ==================== xhci0 usbus0 uhub0 uhub1 uaudio1 pcm3 uhub2 uaudio2 pcm4 uhid0 uaudio0 pcm2 ==================== The NUC only has the one root XHCI hub so I don't understand why this works when it doesn't on the external hub. Anyway, since the APU only has the two external USB plugs I've been using, and that is the machine I need this to work on, this doesn't help a lot unfortunately. But it is a data point at least. /Thomas
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?028f7e83-a50a-daad-2c61-c82538d7e4f1>