__v4l2_subde..._passthrough(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ __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:


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