v4l2_subdev_enable_streams(9)
π v4l2_subdev_enable_streams(9) β the Kernel API Manual glow-up π
okay so bestie, welcome to the v4l2_subdev_enable_streams(9) page from the Kernel API Manual β¨ this is the one that turns streams ON, and we're gonna walk through it together, no cap π«Ά
πΈ NAME πΈ
v4l2_subdev_enable_streams β Enable streams on a pad π«
like literally, that's the whole job. enabling streams. on a pad. iconic behavior honestly π
π¦ SYNOPSIS π¦
int v4l2_subdev_enable_streams (struct v4l2_subdev *sd , u32 pad , u64
streams_mask );
three args, one int back, that's the vibe π
β¨ ARGUMENTS β¨
sdβ the subdevice π§ like, the actual thing you're poking atpadβ the pad πΈ your chosen hangout spot on that subdevicestreams_maskβ bitmask of streams to enable π a whole little bitfield of besties, each bit invited to the party
π DESCRIPTION π
okay so here's the tea β this function enables streams on a source pad of a subdevice. the pad is identified by its index, while the streams are identified by the streams_mask bitmask. and the way this slaps? it lets you enable multiple streams on a pad at once π₯ batch mode, main character energy, we love efficiency π
but listen β enabling a stream that's already enabled isn't allowed π not permitted, not happening, we don't do that here. if streams_mask contains an already enabled stream, this function returns -EALREADY without performing any operation. so it just... stops. full bail. zero side effects, at least π«Ά
now for the compatibility lore π§ per-stream enable is only available for subdevs that implement the .enable_streams and .disable_streams operations. for other subdevs, this function implements a best-effort compatibility by calling the .s_stream operation β limited to subdevs that have a single source pad. best-effort, bestie. that's the key phrase. don't expect miracles π
and hey β drivers that are not stream-aware shall setstreams_masktoBIT_ULL(0). literally just that. one bit. that's your whole mask. don't overthink it π
π RETURN π
0β Success β¨ slay, we did it, no errors, go girl-EALREADYβ one of the streams instreams_maskis already enabled π bestie it's already on, we can't turn it on again-EINVALβ the pad index is invalid, or doesn't correspond to a source pad π wrong pad, wrong vibe, try again-EOPNOTSUPPβ falling back to the legacy.s_streamoperation is impossible because the subdev has multiple source pads π multi-pad subdev + no stream ops = no path forward, sorry queen
π SEE ALSO π
Kernel file ./include/media/v4l2-subdev.h β and honestly the whole extended friend group, they all said hi π
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_disable_streams(9)v4l2_subdev_s_stream_helper(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)
aaaand that's the whole page bestie!! π this lil masterpiece lives in ./include/media, dated October 2026, and it's filed under the name v4l2_subdev_enable_streams(9) β go forth and enable those streams, you're gonna eat π
β¨π¦
π¦ 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