v4l2_subdev_s_stream_helper(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ v4l2_subdev_s_stream_helper πŸ’…

okay so bestie, welcome to the Kernel API Manual πŸ’– this one's about a tiny little helper that does the unglamorous glue work between the new streamy world and the old-school s_stream vibe. it's short, it's sweet, and it's lowkey carrying a whole compatibility layer. let's get into it πŸŽ€


🌸 NAME 🌸

v4l2_subdev_s_stream_helper β€” the helper that implements the subdev s_stream operation by using enable_streams and disable_streams. it's giving "translator between two eras" and honestly? iconic 🫢


⭐ SYNOPSIS ⭐

int v4l2_subdev_s_stream_helper (struct v4l2_subdev *sd , int enable );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • sd β€” the subdevice. that's your main character right there ✨
  • enable β€” enable or disable streaming. yes, one flag for both directions, she contains multitudes πŸ’«

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea β˜• β€” subdevice drivers that implement the streams-aware v4l2_subdev_pad_ops.enable_streams and v4l2_subdev_pad_ops.disable_streams operations can use this helper to implement the legacy v4l2_subdev_video_ops.s_stream operation. basically you already did the new hotness version, and this lil function backports it into the old API so nothing breaks. no cap, it's a whole glow-up for backwards compatibility πŸ’…

⚠️ important bestie: this helper can only be used by subdevs that have a single source pad. one. single. source pad. if your subdev has more than one, this is not the function for you and she will not behave, periodt πŸ™ˆ

πŸŽ€ RETURN πŸŽ€

0 on success, or a negative error code otherwise. that's it, that's the whole return value story. negative error code = something went sideways, go read your errno 🌈


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/media/v4l2-subdev.h β€” and honestly the whole extended family, here we go:

that's the whole friend group, go say hi πŸ’œ


and that's the page!! mwah 😘 this little manpage lives in ./include/media and it's dated October 2026 β€” like, future-era documentation energy fr fr. stay streaming, stay single-source-padded, and remember: negative error codes are just red flags and you deserve better πŸ’€πŸŒΈ bye bestie πŸ¦‹

πŸ“¦ where this page comes from