STRUCT V4L2_SUBDEV_FORMAT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 from enum 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.h enum v4l2_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