v4l2_ctrl_new_std_menu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay so bestie, welcome to the v4l2_ctrl_new_std_menu(9) kernel API manual page β€” yes, that’s the whole manual name, and it’s giving β€œlong function name but make it iconic” πŸ’–. This function is all about allocating and initializing a brand-new standard V4L2 menu control. slay.

✨ SYNOPSIS ✨

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

πŸŽ€ ARGUMENTS πŸŽ€

  • hdl β€” the control handler. literally the handler, bestie 🫢
  • ops β€” the control ops. the operations vibe check βœ…
  • id β€” the control ID. its whole identity πŸ”₯
  • max β€” the control’s maximum value. the ceiling, periodt πŸ“ˆ
  • mask β€” the control’s skip mask for menu controls. this 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. iykyk 🧚
  • def β€” the control’s default value. the starting point, the main character energy ⭐

🌸 DESCRIPTION 🌸

same as v4l2_ctrl_new_std, but min is set to 0 and the mask value determines which menu items are to be skipped. no cap, that’s the whole glow-up 🌈.

if id refers to a non-menu control, then this function will return NULL. and that’s not a vibe 😭 β€” no menu control means no control pointer for you.

πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./include/media/v4l2-ctrls.h, union v4l2_ctrl_ptr(9), v4l2_ctrl_ptr_create(9), struct v4l2_ctrl_ops(9), struct v4l2_ctrl_type_ops(9), v4l2_ctrl_notify_fnc(9), struct v4l2_ctrl(9), struct v4l2_ctrl_ref(9), struct v4l2_ctrl_handler(9), struct v4l2_ctrl_config(9), v4l2_ctrl_fill(9), v4l2_ctrl_handler_init_class(9), v4l2_ctrl_handler_init(9), v4l2_ctrl_handler_free(9), v4l2_ctrl_lock(9), v4l2_ctrl_unlock(9), __v4l2_ctrl_handler_setup(9), v4l2_ctrl_handler_setup(9), v4l2_ctrl_handler_log_status(9), v4l2_ctrl_new_custom(9), v4l2_ctrl_new_std(9), v4l2_ctrl_new_std_menu_items(9), v4l2_ctrl_new_std_compound(9), v4l2_ctrl_new_int_menu(9), v4l2_ctrl_filter(9), v4l2_ctrl_add_handler(9), v4l2_ctrl_radio_filter(9), v4l2_ctrl_cluster(9), v4l2_ctrl_auto_cluster(9), v4l2_ctrl_find(9), v4l2_ctrl_activate(9), __v4l2_ctrl_grab(9), v4l2_ctrl_grab(9), __v4l2_ctrl_modify_range(9), v4l2_ctrl_modify_range(9), __v4l2_ctrl_modify_dimensions(9), v4l2_ctrl_modify_dimensions(9), v4l2_ctrl_notify(9), v4l2_ctrl_get_name(9), v4l2_ctrl_get_menu(9), v4l2_ctrl_get_int_menu(9), v4l2_ctrl_g_ctrl(9), __v4l2_ctrl_s_ctrl(9), v4l2_ctrl_s_ctrl(9), v4l2_ctrl_g_ctrl_int64(9), __v4l2_ctrl_s_ctrl_int64(9), v4l2_ctrl_s_ctrl_int64(9), __v4l2_ctrl_s_ctrl_string(9), v4l2_ctrl_s_ctrl_string(9), __v4l2_ctrl_s_ctrl_compound(9), v4l2_ctrl_s_ctrl_compound(9), v4l2_ctrl_replace(9), v4l2_ctrl_merge(9), v4l2_ctrl_log_status(9), v4l2_ctrl_subscribe_event(9), v4l2_ctrl_poll(9), v4l2_ctrl_request_setup(9), v4l2_ctrl_request_complete(9), v4l2_ctrl_request_hdl_find(9), v4l2_ctrl_request_hdl_put(9), v4l2_ctrl_request_hdl_ctrl_find(9), v4l2_queryctrl(9), v4l2_query_ext_ctrl_to_v4l2_queryctrl(9), v4l2_query_ext_ctrl(9), v4l2_querymenu(9), v4l2_g_ctrl(9), v4l2_s_ctrl(9), v4l2_g_ext_ctrls(9), v4l2_try_ext_ctrls(9), v4l2_s_ext_ctrls(9), v4l2_ctrl_subdev_subscribe_event(9), v4l2_ctrl_subdev_log_status(9), v4l2_ctrl_new_fwnode_properties(9), v4l2_ctrl_type_op_equal(9), v4l2_ctrl_type_op_init(9), v4l2_ctrl_type_op_log(9), v4l2_ctrl_type_op_validate(9).


okay that’s the whole tea β˜• β€” source/version line is ./include/media, date is October 2026, and this iconic little page is v4l2_ctrl_new_std_menu(9). bye bestie, go write some slay controls πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from