STRUCT V4L2_SUBDEV_MBUS_CODE_ENUM(9)
β¨ 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 aMEDIA_BUS_FMT_definition π so like, one of those names.whichβ the format type, and it comes fromenum v4l2_subdev_format_whenceπ¦ (yes, "whence", we love a fancy word).flagsβ flags set by the driver, theV4L2_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:reservedgets 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.henum 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
- 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