From owner-freebsd-usb@freebsd.org Thu Nov 26 19:13:12 2020 Return-Path: Delivered-To: freebsd-usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 736E346D960 for ; Thu, 26 Nov 2020 19:13:12 +0000 (UTC) (envelope-from thomas@gibfest.dk) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4ChnTh0v4qz3By0 for ; Thu, 26 Nov 2020 19:13:12 +0000 (UTC) (envelope-from thomas@gibfest.dk) Received: by mailman.nyi.freebsd.org (Postfix) id 1E92346D6D8; Thu, 26 Nov 2020 19:13:12 +0000 (UTC) Delivered-To: usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E55246D95F for ; Thu, 26 Nov 2020 19:13:12 +0000 (UTC) (envelope-from thomas@gibfest.dk) Received: from smtp2.servers.tyknet.dk (smtp2.servers.tyknet.dk [IPv6:2a01:3a0:1:1900:89:233:43:78]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ChnTg50l6z4vsn for ; Thu, 26 Nov 2020 19:13:11 +0000 (UTC) (envelope-from thomas@gibfest.dk) Subject: Re: webcamd, usb and two webcams - only one works DKIM-Filter: OpenDKIM Filter v2.10.3 smtp2.servers.tyknet.dk 6E4851108 To: Hans Petter Selasky Cc: usb@freebsd.org References: <9a382539-c90d-91b9-bfac-f36c0f19d3f7@selasky.org> <723be24d-b2fe-85df-4961-5483004050e8@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> <1d1fdacc-453c-b4db-1879-5f1609093e50@selasky.org> From: Thomas Steen Rasmussen Message-ID: <028f7e83-a50a-daad-2c61-c82538d7e4f1@gibfest.dk> Date: Thu, 26 Nov 2020 20:13:02 +0100 MIME-Version: 1.0 In-Reply-To: <1d1fdacc-453c-b4db-1879-5f1609093e50@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4ChnTg50l6z4vsn X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2020 19:13:12 -0000 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: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x00ef bDeviceSubClass = 0x0002 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0x0c45 idProduct = 0x6341 bcdDevice = 0x0000 iManufacturer = 0x0002 iProduct = 0x0001 iSerialNumber = 0x0003 <20130901> bNumConfigurations = 0x0001 $ sudo usbconfig -d ugen0.6 dump_device_desc ugen0.6: at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (224mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0310 bDeviceClass = 0x00ef bDeviceSubClass = 0x0002 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0009 idVendor = 0x046d idProduct = 0x086b bcdDevice = 0x0317 iManufacturer = 0x0000 iProduct = 0x0002 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: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x00ef bDeviceSubClass = 0x0002 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0x1224 idProduct = 0x2a25 bcdDevice = 0x0100 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0000 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