v4l2_ctrl_fill(9)
π v4l2_ctrl_fill β kernel API manual, but make it make sense β¨
okay so bestie, welcome to the v4l2_ctrl_fill(9) page π this one lives in the kernel API manual and honestly? it's a little fill-in-the-blanks situation and it's lowkey iconic for it. let's get into it π
πΈ NAME πΈ
v4l2_ctrl_fill β fills in all the control fields for you, based on the control ID. that's it, that's the whole job. no cap π«Ά
β¨ SYNOPSIS β¨
void v4l2_ctrl_fill (u32 id , const char **name , enum v4l2_ctrl_type
*type , s64 *min , s64 *max , u64 *step , s64 *def , u32 *flags );
like, yes, it's a lot of pointers. breathe. it's fine. she's just handing you back a bunch of stuff through pointers because that's how the kernel rolls π
π¦ ARGUMENTS π¦
idβ the ID of the control. this is the main character, everything else is just vibes orbiting it πnameβ a pointer that gets filled in with a string holding the name of the control π·οΈtypeβ a pointer for storing the type of the controlminβ a pointer for storing the minimum value the control can takemaxβ a pointer for storing the maximum value the control can takestepβ a pointer for storing the control stepdefβ a pointer for storing the default value of the controlflagsβ a pointer for storing the flags to use on the control π©
π₯ DESCRIPTION π₯
so this function works for all standard V4L2 controls β every single one, slay β¨. but for non-standard controls it will only fill in the given arguments, and the name content will be set to NULL. so like, don't expect a name where there isn't one, iykyk π
also important: this function will overwrite the contents of name, type and flags. the contents of min, max, step and def may be modified depending on the type. so fr fr, don't be precious about what was in those pointers before π
NOTE: β οΈ Do not use in drivers! It is used internally for backwards compatibility control handling only. Once all drivers are converted to use the new control framework this function will no longer be exported. so like... it's giving deprecated, she's on her way out, don't get attached π
π SEE ALSO π
the whole friend group, assembled π«Ά β kernel file ./include/media/v4l2-ctrls.h, plus:
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_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(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)
that's the whole page bestie, you ate that π mwah π
this came out of ./include/media, dated October 2026, and she answers to the name v4l2_ctrl_fill(9) β see you in the next one, love u bye ππ
π¦ 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