v4l2_ctrl_ne...d_menu_items(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ v4l2_ctrl_new_std_menu_items(9) πŸŽ€

okay bestie, welcome to the kernel API manual, section 9 β€” yes, the kernel one, we're literally in the ./include/media directory of the Linux kernel docs, and today's main character is v4l2_ctrl_new_std_menu_items. she's giving "make a new standard V4L2 menu control but with a driver-specific menu" and honestly? iconic. πŸ’…


✨ NAME ✨

v4l2_ctrl_new_std_menu_items β€” Create a new standard V4L2 menu control with driver specific menu.


🌸 SYNOPSIS 🌸

struct v4l2_ctrl * v4l2_ctrl_new_std_menu_items (struct
v4l2_ctrl_handler *hdl , const struct v4l2_ctrl_ops *ops , u32 id , u8
max , u64 mask , u8 def , const char * const *qmenu );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • hdl β€” The control handler. the whole vibe container, fr.
  • ops β€” The control ops. her support system.
  • id β€” The control ID. her name tag at the party.
  • max β€” The control's maximum value. the ceiling, the limit, the "no you cannot go past this" energy.
  • mask β€” The control's skip mask for menu controls. lowkey the coolest part: it makes it easy to skip menu items that are not valid. If bit X is set, then menu item X is skipped. 🫢 Of course, this only works for menus with <= 64 menu items. There are no menus that come close to that number, so this is OK. Should we ever need more, then this will have to be extended to a bit array. so yeah β€” 64 bits of "not today bestie" and that's genuinely all we ever need, periodt.
  • def β€” The control's default value. the starting point, the "before you touch anything" era.
  • qmenu β€” The new menu. the moment, the slay, the whole point.

πŸ’– DESCRIPTION πŸ’–

Same as v4l2_ctrl_new_std_menu, but qmenu will be the driver specific menu of this control. like, same function energy, but the menu is yours. custom. bespoke. main character menu. πŸŽ€

ngl this one is short and sweet β€” the real lore lives in those arguments above, so don't skip them πŸ’€

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./include/media/v4l2-ctrls.h, plus the entire friend group β€” every single one of them, no cap, no skips:


and that's a wrap on the kernel API manual entry for v4l2_ctrl_new_std_menu_items(9) 🧚 from ./include/media, dated October 2026, and every single one of you reading this is a lil kernel dev now. go be iconic with your menus. ⭐πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from