__v4l2_ctrl_s_ctrl_compound(9)
π __v4l2_ctrl_s_ctrl_compound β the unlocked version that sets a compound control π
okay so bestie, welcome to the kernel API manual, this page lives under ./include/media and it's all about __v4l2_ctrl_s_ctrl_compound. yes the double-underscore is on purpose, she's the β¨backstageβ¨ version, iykyk.
πΈ NAME πΈ
__v4l2_ctrl_s_ctrl_compound β the unlocked variant of the set-compound-control saga. she does the same job as her public cousin but assumes you already hold the lock, because you're a brave little coder inside the framework π«Ά
π¦ SYNOPSIS π¦
int __v4l2_ctrl_s_ctrl_compound (struct v4l2_ctrl *ctrl , enum
v4l2_ctrl_type type , const void *p );
three args, one int back. that's the whole vibe check π«
π ARGUMENTS π
ctrlβ the control in question. like, the control. the main character of this function πtypeβ the type of the data. be honest about it, bestie, no cap.pβ the new compound payload. this is the fresh content you're pushing in π
π DESCRIPTION π
so here's the tea π΅ β this function sets the control's new compound payload safely, and the way it does that is by going through the control framework instead of yeeting raw values at the hardware. icon behavior. it's giving responsible.
the big caveat (and this is the whole reason for the leading underscores): this function assumes the control's handler is already locked. that's not a suggestion, that's the deal. the upside? because it doesn't lock for you, it's safe to use from within the v4l2_ctrl_ops functions β the places where you'd already be holding that lock and grabbing it again would be a whole mess π
β οΈ pls do not call this thinking it'll lock stuff for you. it will not. you must already hold the handler lock. fr fr.
also, and this is important: this function is for compound type controls only. do not come at her with a plain int, she will not know what to do with it π
β SEE ALSO β
the whole extended friend group, no one gets left out π«Ά β 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), structv4l2_ctrl_type_ops(9),v4l2_ctrl_notify_fnc(9) - struct
v4l2_ctrl(9), structv4l2_ctrl_ref(9), structv4l2_ctrl_handler(9), structv4l2_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_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_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, go forth and set your compound controls safely π
mwah π β this gem is from ./include/media, dated October 2026, and the manual page title stays __v4l2_ctrl_s_ctrl_compound(9) in case you need to cite her in a commit message π
π¦ 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