v4l2_subdev_s_stream_helper(9)
β¨ 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:
struct v4l2_decode_vbi_line(9)enum v4l2_subdev_io_pin_bits(9)struct v4l2_subdev_io_pin_config(9)struct v4l2_subdev_core_ops(9)struct v4l2_subdev_tuner_ops(9)struct v4l2_subdev_audio_ops(9)struct v4l2_mbus_frame_desc_entry_csi2(9)enum v4l2_mbus_frame_desc_flags(9)struct v4l2_mbus_frame_desc_entry(9)enum v4l2_mbus_frame_desc_type(9)struct v4l2_mbus_frame_desc(9)enum v4l2_subdev_pre_streamon_flags(9)struct v4l2_subdev_video_ops(9)struct v4l2_subdev_vbi_ops(9)struct v4l2_subdev_sensor_ops(9)enum v4l2_subdev_ir_mode(9)struct v4l2_subdev_ir_parameters(9)struct v4l2_subdev_ir_ops(9)struct v4l2_subdev_pad_config(9)struct v4l2_subdev_stream_configs(9)struct v4l2_subdev_krouting(9)struct v4l2_subdev_state(9)struct v4l2_subdev_pad_ops(9)struct v4l2_subdev_ops(9)struct v4l2_subdev_internal_ops(9)struct v4l2_subdev_platform_data(9)struct v4l2_subdev(9)media_entity_to_v4l2_subdev(9)vdev_to_v4l2_subdev(9)struct v4l2_subdev_fh(9)to_v4l2_subdev_fh(9)v4l2_set_subdevdata(9)v4l2_get_subdevdata(9)v4l2_set_subdev_hostdata(9)v4l2_get_subdev_hostdata(9)v4l2_subdev_get_fwnode_pad_1_to_1(9)v4l2_subdev_link_validate_default(9)v4l2_subdev_link_validate(9)v4l2_subdev_has_pad_interdep(9)__v4l2_subdev_state_alloc(9)__v4l2_subdev_state_free(9)v4l2_subdev_init_finalize(9)v4l2_subdev_cleanup(9)v4l2_subdev_state_get_format(9)v4l2_subdev_state_get_crop(9)v4l2_subdev_state_get_compose(9)v4l2_subdev_state_get_interval(9)v4l2_subdev_get_fmt(9)v4l2_subdev_get_frame_interval(9)v4l2_subdev_set_routing(9)for_each_active_route(9)v4l2_subdev_set_routing_with_fmt(9)v4l2_subdev_routing_find_opposite_end(9)v4l2_subdev_state_get_opposite_stream_format(9)v4l2_subdev_state_xlate_streams(9)enum v4l2_subdev_routing_restriction(9)v4l2_subdev_routing_validate(9)v4l2_subdev_enable_streams(9)v4l2_subdev_disable_streams(9)__v4l2_subdev_get_frame_desc_passthrough(9)v4l2_subdev_get_frame_desc_passthrough(9)v4l2_subdev_lock_state(9)v4l2_subdev_unlock_state(9)v4l2_subdev_lock_states(9)v4l2_subdev_unlock_states(9)v4l2_subdev_get_unlocked_active_state(9)v4l2_subdev_get_locked_active_state(9)v4l2_subdev_lock_and_get_active_state(9)v4l2_subdev_init(9)v4l2_subdev_call(9)v4l2_subdev_call_state_active(9)v4l2_subdev_call_state_try(9)v4l2_subdev_has_op(9)v4l2_subdev_notify_event(9)v4l2_subdev_is_streaming(9)
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
- 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