From owner-freebsd-multimedia@freebsd.org Mon Aug 29 14:39:33 2016 Return-Path: Delivered-To: freebsd-multimedia@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3ADAB78CE3 for ; Mon, 29 Aug 2016 14:39:33 +0000 (UTC) (envelope-from miguelmclara@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 50AE9B64 for ; Mon, 29 Aug 2016 14:39:33 +0000 (UTC) (envelope-from miguelmclara@gmail.com) Received: by mail-wm0-x22b.google.com with SMTP id o80so95605719wme.1 for ; Mon, 29 Aug 2016 07:39:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MyZbN9fXcEcUsNYKCz2L8vbjZXVPaizBDTQMjK7xD+4=; b=UekB/3h7kToWrq26Xgtp97GNUtE1+UvUH+SE7nhX5z5ws39S/wqO3UH+Qawli3S9Dd oBFlWnO/0JtmTrnoZiWtZqssvsJqss9vii8la42gXhIRncWP08RT1PMlkKemQo2ybdle 2nXTYe8QzTJmOubWHU4VTGJYpztaOGIj3yW3Gzt7wGvhGxvIaGphQccjOIRQcWFGjatG s/leN+hlOyrdMoKyPQGf/dJpKxSCwmhj8PAgDpeC9itEx79u+lW34Nhxn8imlvJXEhxy cLuvXd3OvsRoMJ29HezhW5OJHxyOUajP+6jcIZS1Ff8tZriCAsgMaVb1QK0qiONRDzMP 4weA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=MyZbN9fXcEcUsNYKCz2L8vbjZXVPaizBDTQMjK7xD+4=; b=FJBAme89aJ0BNqQX49laQVKgHu4h5FU92pnzoJJxYxRFQXHKwIfd3w913CBgRYW1Tq aMC78gJtV/1Fz8PubMAXuJQso7BQE0G38/omVDveh0XwqoPCG1R0WUfo4L/xL2e6KWbt lX0p06PGgRb7E3XhbDwIFWH0fQamrIa5JkMKlgiUHtt50jBcCP2lzq/mjXarb+xuGzKQ HMuhn2IXLw8HBOBFST0bhA5QvSvSto9o2qAULHxZEYFT5x7+D/PElQpSkRGO76meP2/9 daSLC+bTiwbOvcOQmURwnG8r69f29G29qrt+LmamnxkpPrEC8xuftejZ69i1tM/KrJWK Bo3A== X-Gm-Message-State: AE9vXwOCtCkwmTIRc+GukDBpuLlfCmBVSnciRdp8sZeLVCBPO/yKc+aDWOHDXgRQcgN3EKLNEknQyhkIXeMdag== X-Received: by 10.194.57.244 with SMTP id l20mr15785840wjq.1.1472481571784; Mon, 29 Aug 2016 07:39:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.208.65 with HTTP; Mon, 29 Aug 2016 07:38:51 -0700 (PDT) In-Reply-To: References: <050b048b-b73d-0823-885a-e8ab88f070e8@selasky.org> From: Miguel C Date: Mon, 29 Aug 2016 15:38:51 +0100 Message-ID: Subject: Re: [CFT] New version of webcamd, now v4.8.0.2 To: Hans Petter Selasky Cc: Oleg Nauman , "freebsd-multimedia@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2016 14:39:33 -0000 On Mon, Aug 29, 2016 at 8:15 AM, Hans Petter Selasky wrote: > Hi, > > > On 08/29/16 01:53, Miguel C wrote: > >> On Sun, Aug 28, 2016 at 7:21 PM, Hans Petter Selasky >> wrote: >> >> On 08/28/16 16:02, Miguel C wrote: >>> >>> On Sun, Aug 28, 2016 at 12:53 PM, Hans Petter Selasky >>>> wrote: >>>> >>>> >>>> Hi, >>> >>> The descriptors you sent look OK. >>> >>> Can you run webcamd from gdb and trace all the parameters and code path >>> taken inside the function named usb_setup_endpoint which triggers after >>> you >>> run pwcview ? >>> >>> gdb >>> file webcamd >>> run -d ugenX.Y >>> CTRL+C >>> break usb_setup_endpoint >>> continue >>> next >>> next >>> next >>> .... >>> >>> >>> Let's skip Freebsd-current and freebsd-x11 in the CC'ing of this thread >>> to >>> reduce the amount of cross-posting? Or which list do you prefer? >>> >> >> >> Sure multimedia@ seems fine >> >> >> Lets see if I got this right (let me know if its best to upload this... >> just feel like its important to keep the "text" in the archive for future >> reference: >> >> >> gdb) continue >> >> Continuing. >> >> Creating /dev/video0 >> >> [New Thread 802017400 (LWP 100268/webcamd)] >> >> [New Thread 802019200 (LWP 100303/webcamd)] >> >> [Switching to Thread 802019200 (LWP 100303/webcamd)] >> >> >> Breakpoint 1, usb_setup_endpoint (dev=0x802076000, uhe=0x8020764a0, >> bufsize=16) >> >> at kernel/linux_usb.c:923 >> >> 923 uint8_t type = uhe->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; >> >> (gdb) next >> >> 924 uint8_t addr = uhe->desc.bEndpointAddress; >> >> (gdb) next >> >> 925 uint8_t ep_index = ((addr / 0x40) | (addr * 4)) % (16 * 4); >> >> (gdb) next >> >> 928 if (uhe->bsd_xfer[0] || >> >> (gdb) next >> >> 931 return (0); >> >> (gdb) next >> >> 1030 } >> >> (gdb) next >> >> usb_submit_urb (urb=0x802092070, mem_flags=0) at kernel/linux_usb.c:613 >> >> 613 err = usb_setup_endpoint(urb->dev, uhe, >> >> (gdb) next >> >> 615 if (err) { >> >> (gdb) next >> >> 624 if (uhe->bsd_xfer[0] || >> >> (gdb) next >> >> 629 if (urb->bsd_urb_list.tqe_prev == NULL) { >> >> (gdb) next >> >> 630 TAILQ_INSERT_TAIL(&uhe->bsd_urb_list, urb, bsd_urb_list); >> >> (gdb) next >> >> 631 urb->status = -EINPROGRESS; >> > > This submit looks successful. Just enter "continue" after you see > "-EINPROGRESS". I need to figure out the failing case. > > Also do: > > print *uhe > > once while you are in this function. > > It might also be you can enter a breakpoint on the line number for "return > -EPIPE" in urb_submit() via GDB and catch that. How would I do that? something like "break linux_usb.c:613" btw I always kill webcamd, but even if not it seems smart enough to detect if other instances are running :) ie: "Webcamd is already running for ugen0.4.0"