STRUCT V4L2_SUBDEV_ROUTING(9)
β¨ struct v4l2_subdev_routing(9) β¨
okay so bestie, welcome to the Kernel API Manual π
this one's called struct v4l2_subdev_routing and it's literally the subdev routing info glow-up you've been waiting for π¦ no cap, it's giving "everything you need to know about how routes get from here to there" and honestly? obsessed.
πΈ NAME πΈ
struct v4l2_subdev_routing β Subdev routing information π the whole vibe of this struct is just: here's the routing tea, drink up.
β¨ SYNOPSIS β¨
struct v4l2_subdev_routing {
__u32 which;
__u32 len_routes;
__u64 routes;
__u32 num_routes;
__u32 reserved[11];
};
like, look at her. main character struct energy π₯ every field is doing its little job and honestly we stan a tidy layout π
π Members π
whichβ the configuration type, and it comes straight fromenum v4l2_subdev_format_whenceπ«Ά so it's telling you which config situation we're in rn.len_routesβ the length of theroutesarray, measured in routes (yes, routes are the unit, periodt π ). set by the user and not modified by the kernel β so like, the kernel is respectfully not touching it, it's yours, keep it πroutesβ a pointer to theroutesarray π just a lil pointer, living its truth, pointing at the array.num_routesβ the total number of routes π and lowkey the tea here is it can be possibly more than fits in theroutesarray β so like, it might overflow the array you gave it, ngl, that's a thing you need to know πreservedβ this is thereserved[11]array and bestie, listen: drivers and applications must zero this array π¨ not "should", not "maybe", must. zero it. fr fr. don't be the one who didn't zero it π
π¦ SEE ALSO π¦
go check these out, they're all in the same friend group iykyk π:
- Kernel file
./include/uapi/linux/v4l2-subdev.henum v4l2_subdev_format_whence(9)struct v4l2_subdev_format(9)struct v4l2_subdev_crop(9)struct v4l2_subdev_mbus_code_enum(9)struct v4l2_subdev_frame_size_enum(9)struct v4l2_subdev_frame_interval(9)struct v4l2_subdev_frame_interval_enum(9)struct v4l2_subdev_selection(9)struct v4l2_subdev_capability(9)struct v4l2_subdev_route(9)struct v4l2_subdev_client_capability(9)
π reminder reminder: reserved must be zeroed by drivers AND applications. that's the one. don't forget it. i'm not mad, i'm just disappointed (i'm kidding, i love u, just zero the array).
and that's the whole page bestie, you ate that ππ
this was pulled from ./include/uapi/linux, dated October 2026, and it's the struct v4l2_subdev_routing(9) moment β go forth and route responsibly π§ββοΈβπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms