STRUCT V4L2_SUBDEV_FRAME_SIZE_ENUM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct v4l2_subdev_frame_size_enum(9) πŸ¦‹

okay bestie, welcome to the Kernel API Manual πŸ’– this one's about struct v4l2_subdev_frame_size_enum β€” aka the lil struct that does media bus format enumeration. yes the page header literally calls it struct v4l2_...me_size_enum(9) because it got truncated mid-yawn, but she's the same girl, trust πŸ’…


✨ NAME ✨

struct v4l2_subdev_frame_size_enum β€” Media bus format enumeration 🌸

✨ SYNOPSIS ✨

like, here she is in all her glory, no cap, every field exactly as it lives:

struct v4l2_subdev_frame_size_enum {
    __u32 index;
    __u32 pad;
    __u32 code;
    __u32 min_width;
    __u32 max_width;
    __u32 min_height;
    __u32 max_height;
    __u32 which;
    __u32 stream;
    __u32 reserved[7];
 };

πŸŽ€ Members πŸŽ€

bestie, let's go field by field, we're not skipping a single one:

  • index β€” the format index during enumeration πŸ”’ like, which one are we on rn
  • pad β€” the pad number, as reported by the media API 🫢
  • code β€” the format code (it's giving MEDIA_BUS_FMT_ definitions energy) ⭐
  • min_width β€” minimum frame width, in pixels ✨
  • max_width β€” maximum frame width, in pixels πŸ’œ
  • min_height β€” minimum frame height, in pixels πŸ¦‹
  • max_height β€” maximum frame height, in pixels 🌈
  • which β€” the format type (from enum v4l2_subdev_format_whence), periodt πŸ‘‘
  • stream β€” the stream number, defined in subdev routing 🌊
  • reserved β€” 🚨 drivers and applications must zero this array 🚨 like, not optional, not a vibe, zero it fr fr
no cap on that reserved one β€” it's an array of 7 __u32, and both drivers and applications have to zero it. don't be the main character who forgets πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

the whole friend group, all linked, none left out:

  • Kernel file ./include/uapi/linux/v4l2-subdev.h enum
  • 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_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)

okay that's the whole page, you ate that πŸ’…

sign-off time: this cutie lives in ./include/uapi/linux πŸ“ and she's dated October 2026 πŸ—“οΈ β€” manual name Kernel API Manual, page struct v4l2_...me_size_enum(9). mwah, go enumerate some formats bestie πŸ«ΆπŸ’–

πŸ“¦ where this page comes from