Add support for multiplexed streams. --- Changes in v7: - Fixes and improvements to testSubDevRouting(): - Fix num_routes check - Improve VIDIOC_SUBDEV_G_ROUTING test by verifying num_routes is updated on successful call - Fix test of routing.reserved field on a failing VIDIOC_SUBDEV_S_ROUTING call. - Link to v6: https://lore.kernel.org/all/20230720075044.442021-1-tomi.valkeinen@xxxxxxxxxxxxxxxx/ - Range diff against v6: 1: 5b814067 = 1: b6927486 v4l2-ctl: Improve sub-device options help text 2: 8e349ff0 = 2: 0b1dc325 v4l2-ctl: Add routing and streams support 3: 5977db8f = 3: 38a5fd3f media-ctl: Add support for routes and streams 4: 7af03ced = 4: 36d0a8e0 v4l2-ctl/compliance: Add routing and streams multiplexed streams 5: abb2d296 ! 5: beaa6a09 v4l2-ctl/compliance: Add simple routing test @@ utils/v4l2-compliance/v4l2-test-subdevs.cpp: int testSubDevSelection(struct node + fail_on_test(ret == ENOSPC && routing.num_routes == 0); + fail_on_test(check_0(routing.reserved, sizeof(routing.reserved))); + -+ if (routing.num_routes) ++ if (!routing.num_routes) + return 0; + -+ /* Then get the actual routes */ ++ /* ++ * Then get the actual routes, and verify that the num_routes gets ++ * updated to the correct number. ++ */ + -+ routing.num_routes = NUM_ROUTES_MAX; ++ uint32_t num_routes = routing.num_routes; ++ routing.num_routes = num_routes + 1; + fail_on_test(doioctl(node, VIDIOC_SUBDEV_G_ROUTING, &routing)); ++ fail_on_test(routing.num_routes != num_routes); + + /* Check the validity of route pads and flags */ + @@ utils/v4l2-compliance/v4l2-test-subdevs.cpp: int testSubDevSelection(struct node + + memset(routing.reserved, 0xff, sizeof(routing.reserved)); + fail_on_test(doioctl(node, VIDIOC_SUBDEV_S_ROUTING, &routing) != EINVAL); -+ fail_on_test(check_0(routing.reserved, sizeof(routing.reserved))); + } + + return 0; 6: bedf5aa3 = 6: 78cc79ce media-ctl: Check for Streams API support 7: 6e432bea = 7: bfe6e80a utils/common: Set V4L2_SUBDEV_CLIENT_CAP_STREAMS for subdevs 8: 05c3e4e6 = 8: 2096d081 v4l2-ctl: Check for Streams API support --- Tomi Valkeinen (8): v4l2-ctl: Improve sub-device options help text v4l2-ctl: Add routing and streams support media-ctl: Add support for routes and streams v4l2-ctl/compliance: Add routing and streams multiplexed streams v4l2-ctl/compliance: Add simple routing test media-ctl: Check for Streams API support utils/common: Set V4L2_SUBDEV_CLIENT_CAP_STREAMS for subdevs v4l2-ctl: Check for Streams API support utils/common/cv4l-helpers.h | 1 + utils/common/v4l-helpers.h | 18 ++ utils/common/v4l2-info.h | 6 + utils/media-ctl/libmediactl.c | 43 ++++ utils/media-ctl/libv4l2subdev.c | 345 +++++++++++++++++++++++--- utils/media-ctl/media-ctl.c | 113 +++++++-- utils/media-ctl/mediactl-priv.h | 1 + utils/media-ctl/mediactl.h | 16 ++ utils/media-ctl/options.c | 15 +- utils/media-ctl/options.h | 1 + utils/media-ctl/v4l2subdev.h | 66 ++++- utils/v4l2-compliance/v4l2-compliance.cpp | 132 ++++++++-- utils/v4l2-compliance/v4l2-compliance.h | 9 +- utils/v4l2-compliance/v4l2-test-subdevs.cpp | 121 ++++++++- utils/v4l2-ctl/v4l2-ctl-subdev.cpp | 364 +++++++++++++++++++++++++--- utils/v4l2-ctl/v4l2-ctl.cpp | 2 + utils/v4l2-ctl/v4l2-ctl.h | 2 + 17 files changed, 1132 insertions(+), 123 deletions(-) --- base-commit: a0c26a97308ea1c5e809245df570e2f04e668168 change-id: 20230802-streams-support-76bec9e1bf85 Best regards, -- Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>