__v4l2_ctrl_s_ctrl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __v4l2_ctrl_s_ctrl(9) β€” unlocked variant of v4l2_ctrl_s_ctrl() πŸ’…

okay bestie, welcome to the Kernel API Manual, grab a boba, because this one's a little ✨spicy✨ β€” it's the unlocked sibling of v4l2_ctrl_s_ctrl(), and the whole personality of this function is "I'm trusting you to already hold the lock, don't make it weird." 🫢


✨ SYNOPSIS ✨

int __v4l2_ctrl_s_ctrl (struct v4l2_ctrl *ctrl , s32 val );

🌸 ARGUMENTS 🌸

  • ctrl β€” the control. πŸ‘‘ the main character, literally.
  • val β€” the new value. the glow-up you're applying to it. s32, no cap.

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does it do? It sets the control's new value safely by going through the control framework β€” like, it doesn't just yeet a number into a struct, it does the whole proper pipeline. very demure, very mindful. πŸŽ€

But here's the catch, and it's giving big energy: this function assumes the control's handler is already locked. πŸ”’ That's the whole point β€” that's why it's the __ version. Because of that assumption, it can be called from within the v4l2_ctrl_ops functions. iykyk. 🧚

⚠️ warning bestie: if the handler is not locked when you call this, that's on you. the function did not agree to that. read the room (and the lock state). πŸ’€

Also, hard vibe check: this function is for integer type controls only. integer. that's it. that's the whole menu. don't come at it with strings or compounds, it will not eat that. πŸ™ˆ

πŸ’œ SEE ALSO πŸ’œ

the whole extended friend group, no gatekeeping β€” starting with the kernel file ./include/media/v4l2-ctrls.h:


and that's the whole page, bestie, you ate that πŸ“βœ¨ this lil' drop came straight out of the source dir ./include/media, dated October 2026 β€” so go forth, hold that lock, set that integer, and slay πŸ’…πŸ‘‘πŸ”₯

πŸ“¦ where this page comes from