__v4l2_ctrl_grab(9)
π
__v4l2_ctrl_grab (9) β Kernel API Manual β¨
okay so bestie, welcome to the Kernel API Manual page for __v4l2_ctrl_grab β the unlocked variant of v4l2_ctrl_grab, and yes it's giving "I'm the cool reckless sibling who assumes you already locked the door" π
π NAME π
__v4l2_ctrl_grab β the unlocked variant of v4l2_ctrl_grab. lowkey the whole personality in one line, no cap.
π¦ SYNOPSIS π¦
void __v4l2_ctrl_grab (struct v4l2_ctrl *ctrl , bool grabbed );
literally that's it. two args, zero drama β¨
πΈ ARGUMENTS πΈ
ctrlβ the control you're about to (de)activate. this is the main character of the story πgrabbedβ abool, and it'strueif the control should become grabbed. so like,true= grab it,false= nah let it go π
π DESCRIPTION π
okay so what does it actually do? it sets or clears the V4L2_CTRL_FLAG_GRABBED flag atomically. atomic as in nobody can catch it mid-flag-flip, periodt π
it does nothing if ctrl == NULL. zero. not a peep. not a crash. iconic behaviour honestly π«Ά
afterwards, the V4L2_EVENT_CTRL event will be generated β so like, it doesn't just change the flag and dip, it tells everyone about it too π£
this will usually be called when starting or stopping streaming in the driver. so it's very much a "we're live now!!" / "okay we're done here" kind of function π¬
β οΈ BIG CAVEAT ALERT β οΈ this function assumes that the control handler is locked by the caller. that's the whole deal with the __ prefix, babe β nobody's locking it for you. you promised. you said you'd lock it. π
β SEE ALSO β
the squad, the whole squad, and nothing but the squad β starting with the 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(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_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)
and that's the page, bestie!! π this little cutie lives in ./include/media and the manual is dated October 2026 β go lock that handler before you call it, i'm literally begging you ππ«Άβ¨
π¦ 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