libcamera: media_device: Fallback to legacy ioctls on older kernels
Prior to kernel v4.19, the MEDIA_IOC_G_TOPOLOGY ioctl didn't expose
entity flags. Fallback to calling MEDIA_IOC_ENUM_ENTITIES for each
entity to retrieve the flags in that case.
Fixes: 67d313240c ("libcamera: pipeline: uvcvideo: create a V4L2Device for the default video entity")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
@@ -56,6 +56,8 @@ private:
|
||||
std::string driver_;
|
||||
std::string deviceNode_;
|
||||
std::string model_;
|
||||
unsigned int version_;
|
||||
|
||||
int fd_;
|
||||
bool valid_;
|
||||
bool acquired_;
|
||||
@@ -72,6 +74,7 @@ private:
|
||||
bool populateEntities(const struct media_v2_topology &topology);
|
||||
bool populatePads(const struct media_v2_topology &topology);
|
||||
bool populateLinks(const struct media_v2_topology &topology);
|
||||
void fixupEntityFlags(struct media_v2_entity *entity);
|
||||
|
||||
friend int MediaLink::setEnabled(bool enable);
|
||||
int setupLink(const MediaLink *link, unsigned int flags);
|
||||
|
||||
Reference in New Issue
Block a user