STRUCT V4L2_SUBDEV_FORMAT(9)
π struct v4l2_subdev_format(9) β Kernel API Manual β¨
okay so bestie, welcome to the glow-up guide for struct v4l2_subdev_format π this is a Kernel API Manual page and honestly? it's giving "small struct, big main character energy" π
πΈ NAME πΈ
struct v4l2_subdev_format β the pad-level media bus format, periodt π
β¨ SYNOPSIS β¨
here's the whole vibe, copy it exactly or the compiler WILL come for you π«Ά
struct v4l2_subdev_format {
__u32 which;
__u32 pad;
struct v4l2_mbus_framefmt format;
__u32 stream;
__u32 reserved[7];
};
π¦ Members π¦
lowkey the most important part, bestie β every field, no skips, no cap π₯
whichβ the format type, and it comes straight fromenum v4l2_subdev_format_whenceπ« like that's literally its whole job.padβ the pad number, exactly as the media API reports it. don't make up your own number, that's not the move πformatβ the media bus format itself, aka the format code AND the frame size together. two things, one field, we love a multitasker πstreamβ the stream number, defined over in subdev routing. iykyk πreservedβ not me having to say this but: drivers and applications must zero this array. zero it. don't touch it otherwise. no notes, that's the rule π
π SEE ALSO π
the whole friend group, linked for your scrolling pleasure π«Ά
- Kernel file
./include/uapi/linux/v4l2-subdev.henumv4l2_subdev_format_whence(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_routing(9)struct v4l2_subdev_client_capability(9)
and that's the page, bestie πΈ this lil masterpiece lives in ./include/uapi/linux, dated October 2026, and signs off as struct v4l2_subdev_format(9) β iconic, no cap πβ¨
π¦ 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