__v4l2_subde..._passthrough(9)
β¨ __v4l2_subdev_get_frame_desc_passthrough β¨
okay so bestie, we're in the Kernel API Manual today and this one is a helper function from the v4l2-subdev universe π it lowkey does a lot of heavy lifting for you, so let's get into it π«Ά
πΈ NAME πΈ
__v4l2_subdev_get_frame_desc_passthrough β a helper to implement the subdev get_frame_desc operation in simple passthrough cases π
β SYNOPSIS β
int __v4l2_subdev_get_frame_desc_passthrough (struct v4l2_subdev *sd ,
struct v4l2_subdev_state *state , unsigned int pad , struct
v4l2_mbus_frame_desc *fd );
π¦ ARGUMENTS π¦
sdβ the subdevice itself, the main character πstateβ the locked subdevice active state π (yes, locked, we'll get to that)padβ the source pad index, like the address of where this stream is headed πfdβ the mbus frame desc, the thing we're filling in π§Ί
π DESCRIPTION π
so this helper literally implements the get_frame_desc operation for subdevices that pass streams through without modification β the "no thoughts, just vibes" of subdev drivers β¨
Here's the tea: the helper iterates over the subdevice's sink pads, calls get_frame_desc on the remote subdevice connected to each sink pad, and collects the frame desc entries for streams that are routed to the given source pad, according to the subdevice's routing table πΊοΈ Each entry is copied as-is from the upstream source β with one iconic exception: the 'stream' field gets remapped to the source stream ID from the routing table π
The frame desc type is taken from the first upstream source. but bestie, listen β if multiple sink pads are involved and the upstream sources report different frame desc types, -EPIPE is returned π not the vibe, but it's the rules.
β οΈ the caller must hold the subdevice's active state lock π no cap, this is a requirement.
This variant is intended for drivers that need to perform additional work around the passthrough frame descriptor collection π οΈ Drivers that do not need any customization should use v4l2_subdev_get_frame_desc_passthrough instead β that's the easy one, iykyk π
π RETURN π
0 on success, or a negative error code otherwise π (and remember the -EPIPE situation from the description, she's real)
π SEE ALSO π
Like, all the lore π«Ά the kernel file ./include/media/v4l2-subdev.h struct, plus:
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_s_stream_helper(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)
and that's the whole page bestie π this one lives in ./include/media, dated October 2026, and the manual page is literally named __v4l2_subde..._passthrough(9) (yes the title is truncated, that's just how she's filed, iconic honestly π
). go forth and pass those streams through πβ¨
π¦ 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