From patchwork Tue Sep 20 17:04:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Liu X-Patchwork-Id: 37208 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bmOTS-0007JE-E4; Tue, 20 Sep 2016 17:04:50 +0000 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.84_2/mailfrontend-7) with esmtp id 1bmOTQ-00028L-0D; Tue, 20 Sep 2016 19:04:49 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933253AbcITREp (ORCPT + 1 other); Tue, 20 Sep 2016 13:04:45 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:60538 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932953AbcITREo (ORCPT ); Tue, 20 Sep 2016 13:04:44 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id u8KH4gvJ015474; Tue, 20 Sep 2016 12:04:42 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u8KH4fOA011224; Tue, 20 Sep 2016 12:04:41 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.294.0; Tue, 20 Sep 2016 12:04:41 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id u8KH4fAQ004051; Tue, 20 Sep 2016 12:04:41 -0500 Date: Tue, 20 Sep 2016 12:04:41 -0500 From: Bin Liu To: , Subject: g_webcam Isoch high bandwidth transfer Message-ID: <20160920170441.GA10705@uda0271908> Mail-Followup-To: Bin Liu , linux-usb@vger.kernel.org, linux-media@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2016.9.20.165116 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' RCVD_FROM_IP_DATE 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, INVALID_MSGID_NO_FQDN 0, NO_URI_HTTPS 0, SINGLE_URI_IN_BODY 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CD 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __SANE_MSGID 0, __SINGLE_URI_TEXT 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NO_WWW 0, __URI_NS , __URI_WITH_PATH 0, __USER_AGENT 0' Hi, I am trying to check Isoch high bandwidth transfer with g_webcam.ko in high-speed connection. First I hacked webcam.c as follows to enable 640x480@30fps mode. # modprobe g_webcam streaming_maxpacket=3072 The endpoint descriptor showing on the host is Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8d EP 13 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x1400 3x 1024 bytes bInterval 1 However the usb bus trace shows only one transaction with 1024-bytes packet in every SOF. The host only sends one IN packet in every SOF, I am expecting 2~3 1024-bytes transactions, since this would be required to transfer 640x480@30fps YUV frames in high-speed. DId I miss anything in the setup? Thanks, -Bin. --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/usb/gadget/legacy/webcam.c b/drivers/usb/gadget/legacy/webcam.c index 72c976b..9eb315f 100644 --- a/drivers/usb/gadget/legacy/webcam.c +++ b/drivers/usb/gadget/legacy/webcam.c @@ -191,15 +191,15 @@ static const struct UVC_FRAME_UNCOMPRESSED(3) uvc_frame_yuv_360p = { .bFrameIndex = 1, .bmCapabilities = 0, .wWidth = cpu_to_le16(640), - .wHeight = cpu_to_le16(360), + .wHeight = cpu_to_le16(480), .dwMinBitRate = cpu_to_le32(18432000), .dwMaxBitRate = cpu_to_le32(55296000), - .dwMaxVideoFrameBufferSize = cpu_to_le32(460800), - .dwDefaultFrameInterval = cpu_to_le32(666666), + .dwMaxVideoFrameBufferSize = cpu_to_le32(614400), + .dwDefaultFrameInterval = cpu_to_le32(333333), .bFrameIntervalType = 3, - .dwFrameInterval[0] = cpu_to_le32(666666), - .dwFrameInterval[1] = cpu_to_le32(1000000), - .dwFrameInterval[2] = cpu_to_le32(5000000), + .dwFrameInterval[0] = cpu_to_le32(333333), + .dwFrameInterval[1] = cpu_to_le32(666666), + .dwFrameInterval[2] = cpu_to_le32(1000000), }; then loaded g_webcam.ko as