Hello experts, I'm working on a project which uses TI OMAP Plus platform. i'm trying to implement uvc gadget through configfs. kernel: 4.4 I have setup function and configfs according to configfs gadget. mount -t debugfs debugfs /mnt/ echo "device" > /mnt/488d0000.usb/mode modprobe -v configfs modprobe -v libcomposite cd /sys/kernel/config/usb_gadget mkdir g1 cd g1 echo "0x1d6b" > idVendor echo "0x0104" > idProduct mkdir strings/0x409 echo "0123456789" > strings/0x409/serialnumber echo "TI Inc." > strings/0x409/manufacturer echo "UVC gadget" > strings/0x409/product mkdir configs/c.1 mkdir configs/c.1/strings/0x409 echo "Video" > configs/c.1/strings/0x409/configuration echo 120 > configs/c.1/MaxPower modprobe -v usb_f_uvc mkdir functions/uvc.usb0 mkdir -p functions/uvc.usb0/streaming/uncompressed/u/360p cat <<EOF > functions/uvc.usb0/streaming/uncompressed/u/360p/dwFrameInterval 666666 1000000 5000000 EOF mkdir functions/uvc.usb0/streaming/header/h cd functions/uvc.usb0/streaming/header/h ln -s ../../uncompressed/u cd ../../class/fs ln -s ../../header/h cd ../../class/hs ln -s ../../header/h cd ../../../control mkdir header/h ln -s header/h class/fs ln -s header/h class/ss cd ../../../ ln -s functions/uvc.usb0 configs/c.1 echo "488d0000.usb" > UDC so for so good then i will get some kernel log message configfs-gadget gadget: uvc_function_bind dwc3 488d0000.usb: otg: gadget gadget registered then when i connect my board(device) to PC(host). at host side i should get some usb device message and type of usb device but no message. and at device side i should get gadget: high-speed config #1: Video g_webcam gadget: uvc_function_set_alt(0, 0) g_webcam gadget: uvc_function_set_alt(1, 0) g_webcam gadget: uvc_function_set_alt(1, 0 but no message comes up. i have tried gadget mass storage which is working fine. but coming to uvc gadget it is failing. upon digging by adding more debug messages. [ 104.360416] [DEBUG] drivers/usb/gadget/function/f_uvc.c : uvc_alloc_inst [ 104.401748] configfs-gadget gadget: uvc_function_bind [ 104.406998] [DEBUG] opts->streaming_maxpacket=1024 [ 104.411810] [DEBUG] opts->streaming_interval=1 [ 104.418945] [DEBUG] opts->streaming_maxburst=0 [ 104.424337] [DEBUG] name: ep1out, mp: 1024 [ 104.428452] [DEBUG] name: ep2out, mp: 1024 [ 104.432564] [DEBUG] name: ep3out, mp: 1024 [ 104.439034] [DEBUG] name: ep4out, mp: 1024 [ 104.444031] [DEBUG] name: ep5out, mp: 1024 [ 104.448145] [DEBUG] name: ep6out, mp: 1024 [ 104.452257] [DEBUG] name: ep7out, mp: 1024 [ 104.458735] [DEBUG] name: ep8out, mp: 1024 [ 104.463726] [DEBUG] name: ep9out, mp: 1024 [ 104.467841] [DEBUG] name: ep10out, mp: 1024 [ 104.472039] [DEBUG] name: ep11out, mp: 1024 [ 104.478548] [DEBUG] name: ep12out, mp: 1024 [ 104.483605] [DEBUG] name: ep13out, mp: 1024 [ 104.487806] [DEBUG] name: ep14out, mp: 1024 [ 104.492004] [DEBUG] name: ep15out, mp: 1024 [ 104.498495] [DEBUG] name: ep1in, mp: 1024 [ 104.502523] [DEBUG] uvc->control_ep->address=81 [ 104.508669] [DEBUG] name: ep1out, mp: 1024 [ 104.513657] [DEBUG] name: ep2out, mp: 1024 [ 104.517771] [DEBUG] name: ep3out, mp: 1024 [ 104.521882] [DEBUG] name: ep4out, mp: 1024 [ 104.528289] [DEBUG] name: ep5out, mp: 1024 [ 104.532405] [DEBUG] name: ep6out, mp: 1024 [ 104.538083] [DEBUG] name: ep7out, mp: 1024 [ 104.542198] [DEBUG] name: ep8out, mp: 1024 [ 104.548033] [DEBUG] name: ep9out, mp: 1024 [ 104.552214] [DEBUG] name: ep10out, mp: 1024 [ 104.558127] [DEBUG] name: ep11out, mp: 1024 [ 104.562364] [DEBUG] name: ep12out, mp: 1024 [ 104.568282] [DEBUG] name: ep13out, mp: 1024 [ 104.572553] [DEBUG] name: ep14out, mp: 1024 [ 104.578492] [DEBUG] name: ep15out, mp: 1024 [ 104.583437] [DEBUG] name: ep1in, mp: 1024 [ 104.587462] [DEBUG] name: ep2in, mp: 1024 [ 104.591525] [DEBUG] uvc->video.ep->address=82 [ 104.597864] [DEBUG] drivers/usb/gadget/composite.c : id 0 : 0 [ 104.604371] [DEBUG] drivers/usb/gadget/composite.c : id 1 : 0 [ 104.610141] [DEBUG] usb_interface_id0=0 [ 104.615350] [DEBUG] drivers/usb/gadget/composite.c : id 0 : 1 [ 104.621120] [DEBUG] drivers/usb/gadget/composite.c : id 1 : 1 [ 104.628286] [DEBUG] usb_interface_id1=1 [ 104.632138] [DEBUG] USB_SPEED_FULL=2 [ 104.637070] [DEBUG] drivers/usb/gadget/function/f_uvc.c : size of descriptor : 38 [ 104.645314] [DEBUG] uvc_streaming_header->bEndpointAddress : 82 [ 104.651258] [DEBUG] USB_SPEED_HIGH=3 [ 104.656195] [DEBUG] drivers/usb/gadget/function/f_uvc.c : size of descriptor : 38 [ 104.664446] [DEBUG] uvc_streaming_header->bEndpointAddress : 82 [ 104.670392] [DEBUG] v4l2_dev->name: [ 104.675324] [DEBUG] v4l2_dev->name: configfs-gadget gadget [ 104.680833] [DEBUG] dev->driver->name: configfs-gadget dev_name(dev): gadget [ 104.689243] [DEBUG] video-> fcc = 1448695129 bpp = 16 width = 320 height = 240 imagesize = 153600 [ 104.698039] [DEBUG] queue.type = 2 [ 104.701634] [DEBUG] drivers/usb/gadget/function/f_uvc.c : uvc_register_video [ 104.710668] [DEBUG] uvc_register_video : dwc3-gadget [ 104.717471] dwc3 488d0000.usb: otg: gadget gadget registered [ 104.730045] [DEBUG] drivers/usb/gadget/function/uvc_v4l2.c : uvc_v4l2_open [ 105.155361] [DEBUG] UVC connect success with 0 again after going through some more source code digging i came across uvc_function_set_alt where it set alternate interface is not getting called up. and i again i try to list out directories available in function and confgifs. In cd function/uvc.usb0 we need to have streaming_maxburst streaming_maxpacket streaming_interval control streaming these but i have aname aname aname control streaming can anybody tell and verify why is it uvc gadget failing to enumerate? regards, grbesd1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html