This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: utils: media-ctl: Support changed routing API
Author:  Sakari Ailus <sakari.ai...@linux.intel.com>
Date:    Wed Apr 24 18:22:25 2024 +0300

Set len_routes of struct v4l2_subdev_routing. ENOSPC error code is no
longer used, i.e. having room for fewer routes than exist in the
configuration is not considered an error anymore.

Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>

 utils/media-ctl/libv4l2subdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=41c51ada5c966fbf6b8c6e58282e5c2c1cf1a0bb
diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c
index c614f4a2e0fd..e0df686e01c7 100644
--- a/utils/media-ctl/libv4l2subdev.c
+++ b/utils/media-ctl/libv4l2subdev.c
@@ -258,7 +258,7 @@ int v4l2_subdev_get_routing(struct media_entity *entity,
        }
 
        ret = ioctl(entity->fd, VIDIOC_SUBDEV_G_ROUTING, &routing);
-       if (ret == -1 && errno != ENOSPC)
+       if (ret == -1)
                return -errno;
 
        if (!routing.num_routes) {
@@ -272,6 +272,7 @@ int v4l2_subdev_get_routing(struct media_entity *entity,
                return -ENOMEM;
 
        routing.routes = (uintptr_t)r;
+       routing.len_routes = routing.num_routes;
        ret = ioctl(entity->fd, VIDIOC_SUBDEV_G_ROUTING, &routing);
        if (ret) {
                free(r);
@@ -292,6 +293,7 @@ int v4l2_subdev_set_routing(struct media_entity *entity,
                .which = V4L2_SUBDEV_FORMAT_ACTIVE,
                .routes = (uintptr_t)routes,
                .num_routes = num_routes,
+               .len_routes = num_routes,
        };
        int ret;
 

Reply via email to