STRUCT V4L2_SUBDEV_MBUS_CODE_ENUM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct v4l2_subdev_mbus_code_enum(9) ✨

okay so bestie, welcome to the Kernel API Manual entry for struct v4l2_subdev_mbus_code_enum(9) β€” this is the little struct that handles Media bus format enumeration and honestly it's giving "quiet little guy who runs the whole group chat" energy πŸ’…


🌸 NAME 🌸

struct v4l2_subdev_mbus_code_enum β€” Media bus format enumeration πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct v4l2_subdev_mbus_code_enum {
    __u32 pad;
    __u32 index;
    __u32 code;
    __u32 which;
    __u32 flags;
    __u32 stream;
    __u32 reserved[6];
 };

no cap, that's the whole shape of it β€” seven fields, and the last one is a whole little array πŸ‘‘


πŸ’– Members πŸ’–

  • pad β€” the pad number, exactly as reported by the media API 🫢 like, don't guess it, the media API hands it to you, bestie.
  • index β€” the format index you're on during enumeration ✨ it's the counter that keeps the whole enumeration situation organized.
  • code β€” the format code, and it's a MEDIA_BUS_FMT_ definition πŸŽ€ so like, one of those names.
  • which β€” the format type, and it comes from enum v4l2_subdev_format_whence πŸ¦‹ (yes, "whence", we love a fancy word).
  • flags β€” flags set by the driver, the V4L2_SUBDEV_MBUS_CODE_* ones πŸ”₯ note: the driver sets these, not you, so hands off unless you're the driver.
  • stream β€” the stream number, defined in subdev routing 🌈 it's a routing thing, iykyk.
  • reserved β€” drivers and applications must zero this array πŸ’€ like, genuinely must. not "should", not "if you feel like it". zero it. fr fr.
πŸ™ˆ okay quick vibe check on that last one: reserved gets zeroed by both drivers and applications. it's a whole-array thing (reserved[6]), not a one-slot thing. don't be the one who forgets, bestie 😭

πŸ‘‘ SEE ALSO πŸ‘‘

  • 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_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)

like, that's the whole subdev friend group and they all ate πŸ’… go read them, they're all linked for a reason.


and that's the page! πŸŽ€ source situation: ./include/uapi/linux, dated October 2026, filed under struct v4l2...us_code_enum(9) at the bottom like a little signature. mwah πŸ’– periodt.

πŸ“¦ where this page comes from