Date: Thu, 26 Nov 2020 17:04:28 +0100 From: Hans Petter Selasky <hps@selasky.org> To: Thomas Steen Rasmussen <thomas@gibfest.dk> Cc: usb@freebsd.org Subject: Re: webcamd, usb and two webcams - only one works Message-ID: <942b7c29-f132-711c-dd24-6bf5543b79e0@selasky.org> In-Reply-To: <18196ba8-f507-9318-6f00-46f0f55e6e20@gibfest.dk> 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> <18196ba8-f507-9318-6f00-46f0f55e6e20@gibfest.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/26/20 4:36 PM, Thomas Steen Rasmussen wrote: > On 11/26/20 4:26 PM, Thomas Steen Rasmussen wrote: >> On 11/26/20 4:08 PM, Hans Petter Selasky wrote: >>> On 11/26/20 3:38 PM, Thomas Steen Rasmussen wrote: >>>> I tried swapping the webcams around, the error is always with the >>>> second webcam connected (so video2), regardless of which webcam it is. >>> >>> Hi, >>> >>> Might be a bug in the XHCI controller driver or XHCI HW, that the >>> isochronous transactions don't get scheduling time. >>> >>> Do you have the possibility to test on another computer running FreeBSD? >> >> I do actually, let me get that setup. >> > > Hello, > > That was easy, webcamd and pwcview was already installed :) > > I can confirm the same behaviour happens on an Intel NUC which has this > XHCI root hub: > > uhub0: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0 > > /dev/video0 is able to take a snapshot with pwcview, /dev/video2 hangs. > Hi, I have a Skylake here with XHCI and it doesn't exhibit this problem when using two differently branded HighSpeed UVC webcams simultaneously. I'm not sure what is causing this. Because your one webcam works alone it might have something to do with the xHCI bandwidth allocations, which are controlled by the ESIT and average TRB len as shown below. You may want to play with these fields in xhci.c: switch (edesc->bmAttributes & UE_XFERTYPE) { case UE_INTERRUPT: case UE_ISOCHRONOUS: temp = XHCI_EPCTX_4_MAX_ESIT_PAYLOAD_SET(max_frame_size) | XHCI_EPCTX_4_AVG_TRB_LEN_SET(MIN(XHCI_PAGE_SIZE, max_frame_size)); break; --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?942b7c29-f132-711c-dd24-6bf5543b79e0>