Hi Laurent, I have a problem here. Take following example that we have two video dev nodes as: /dev/video0: this node is for WIFI capture /dev/video1: this is the camera driver. Is it possible for the user space to find out video1 is the camera without open and query each video node's capabilities? --Mingcheng -----Original Message----- From: Laurent Pinchart [mailto:laurent.pinchart@xxxxxxxxxxxxxxxx] Sent: Monday, December 19, 2011 2:31 AM To: Zhu, Mingcheng Cc: Sakari Ailus; linux-media@xxxxxxxxxxxxxxx Subject: Re: query video dev node name using the V4L2 device driver name Hi Mingcheng, On Monday 19 December 2011 11:21:03 Zhu, Mingcheng wrote: > Hi Laurent and Sakari, > > Current media entity contains a few fields to identify a dev node (name, > type, group_id). The entity name is the v4l2 dev node name such as > "/dev/video0" "/dev/video1". There is no information who is "/dev/video0" > and who is /dev/video1". This makes that, after query the media_entity the > application still could not figure out who is /dev/video1". The media controller framework sets the video devnode entities names to the video device name, as provided in the video_device name field. That's automatic, so you should just ensure that your video_device name is properly set. > However in V4L2 devices, there is a driver name that the vendor can assign > a specific name such "WIFI CAPTURE" or BACK_CAMERA" to the driver name. Is > it possible to add the driver name into the media_entity? This makes that, > if the userspace application knows the driver name it can use the driver > name to find the dev node. Using the driver name isn't optimal, as a driver could create several video device nodes for the same hardware device. Those nodes should have different names, so you should use the video_device name field as explained above. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html