linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* g_webcam Isoch high bandwidth transfer
@ 2016-09-20 17:04 Bin Liu
  2016-09-21  8:01 ` Felipe Balbi
  0 siblings, 1 reply; 19+ messages in thread
From: Bin Liu @ 2016-09-20 17:04 UTC (permalink / raw)
  To: linux-usb, linux-media

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.

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

# 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.

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-09-27  7:14 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-20 17:04 g_webcam Isoch high bandwidth transfer Bin Liu
2016-09-21  8:01 ` Felipe Balbi
2016-09-21 13:27   ` Bin Liu
2016-09-21 14:58     ` Bin Liu
2016-09-22  7:37     ` Felipe Balbi
2016-09-22  8:08       ` Felipe Balbi
2016-09-22 10:06         ` Felipe Balbi
2016-09-22 13:33           ` Bin Liu
2016-09-22 19:48             ` Felipe Balbi
2016-09-22 20:11               ` Bin Liu
2016-09-23  0:23                 ` yfw
2016-09-23  7:49                 ` Felipe Balbi
2016-09-23  8:10                   ` yfw
2016-09-23  8:27                     ` Felipe Balbi
2016-09-26 16:06                       ` Laurent Pinchart
2016-09-27  7:10                         ` Felipe Balbi
2016-09-26 14:02                   ` Bin Liu
2016-09-27  7:14                     ` Felipe Balbi
2016-09-26 16:03                   ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).