Age | Commit message (Collapse) | Author |
|
At some point the kernel has been updated to include a .id descriptor
in the gadget directory name - add that to uvc_find_video_device() so
that the video node is located properly.
Rather than hardcode a specific gadget (for instance with device name
gadget.0) use a wildcard. This has the advantage of backwards
compatability with older kernels that did not use the ID as part of the
device name, though still limits us to supporting scenarios where only a
single gadget is bound to the UDC.
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
|
|
The MJPEG descriptor does not have a guidFormat, and so configfs doesn't
have it either, but we currently error out if there is no guidFormat.
To fix this, extract the stream type part of the real path, and if it is
MJPEG then hardcode it, otherwise read the guid if it is uncompressed.
This does mean that in configfs the MJPEG format descriptor path must be
"mjpeg" for this to work, though this is already guranteed by configfs.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Parse /proc/mounts to identify the correct mount location of the
ConfigFS filesystem.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Android now uses clang as the default C compiler, and gcc support is
deprecated. clang doesn't support nested functions, which were used to
implement callback functions in the ConfigFS code. We thus move the
callbacks to the global scope.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The asprintf function returns -1, and leaves the first parameter
undefined in case of an allocation error. This conflicts with the
code's assumption that the parameter is set NULL on error.
Check all return values of asprintf, and ensure that the string
parameter is not used as a return value on error paths.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Split the project into a UVC gadget library and a test application. To
avoid rolling out a custom build system, switch to CMake.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|