arjun.a
rename files
6c7b14a
raw
history blame
3.69 kB
Ticket Name: Linux/TDA2E: multiple video nodes possible on usb webcam(g_webcam)?
Query Text:
Part Number: TDA2E Other Parts Discussed in Thread: TDA2 Tool/software: Linux Hi Guys, Scenario: If i have multiple video source with different nodes say(/dev/video0...n) and i'm using usb webcam gadget mode. 1-> Is it possible to assign multiple video node to single usb port? or Do we have to unload webcam driver for assigning different node everytime? 2-> what about switching of video nodes. is it possible and how much time it can take to switch between video nodes? regards, Ganesh
Responses:
Hi Ganseh, I have forwarded your question to the expert. Regards, Yordan
Hi Yordan Kamenov , Is their any update? regards, Ganesh
Hi Ganesh, I have pinged them. Regards, Yordan
Hello, Just to clarify This question is comepletely related to V4L2 and USB It does not deal with the capture interfaces on the TDA2 platform. Now to answer your question, V4L2 USB driver would register video devices for as many webcams connected. The device numbers change only if you disconnect and reconnect cameras. You can always find the right device by-path /dev/v4l/by-path This way, you can identify a specific device without worrying about thr order of probing. I hope this helps Regards, Nikhil D
Hi Nikhil Devshatwar, V4L2 USB driver would register video devices for as many webcams connected.
The device numbers change only if you disconnect and reconnect cameras. What you are telling is for usb host mode right?. what i'm asking is for usb device in uvc gadget mode. Just to clarify: I'm using VISION_SDK_02_12 with kernel 4.4. I have TDA2Ex EVM board, on that board two cameras are mounted on two CSI bus. Now i want webcam gadget mode i.e EVM as device mode. As their are two camera so their will be two device node will be created(say /dev/videoX & /dev/videoY) when we load camera driver. So to make EVM as webcam gadget we load usb_f_uvc.ko it will take only one video device node right? 1-> how can we make it possible to assign multiple camera output to single usb port by using usb_f_uvc(configfs). so that host side i can access multiple video device node? 2-> If not multiple video device node on single usb port then one camera output at a time? switching using configfs? but then how can we assign different camera output every time? regards, Ganesh
Hello, your question is quiet confusing. First, the usb_f_uvc driver does not USE existing v4l2 CAPTURE device. It rather registers a NEW v4l2 OUTPUT device. Which means, application is supposed to dump buffers into it which internally sent from USB as a webcam gadget. The v4l2 device related to the USB port is a OUTPUT device. It is completely irrelevent to the v4l2 capture device registered from the CAL/CSI drivers. You need to write an application which takes data from v4l2 capture device (you can choose video1 or video2 from the CSI device) and then feed this into the v4l2 output device (video3 registered from USB driver) Application will have full control to decide and switch between the capture devices What you want is a USB gadget driver which somehow uses an existing V4L2 driver to send data over USB This sounds like application code, so I am not sure if this even exists as a kernel driver. I hope I clarified your concerns. Regards, Nikhil D
Hi Nikhil Devshatwar , Thanks for your reply, i just needed that clarification only. I was looking for any mechanism available at kernel side to switch with your answer it is clarified their is no such mechanism at kernel side. uvc-gadget is a test application which can be used for testing uvc gadget webcam for single v4l2 capture to v4l2 output. regards, Ganesh