v4l2_subdev_disable_streams(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… v4l2_subdev_disable_streams ✨

Hey bestie, welcome to the Kernel API Manual β€” this one's all about turning streams off, and honestly? It's giving "closing the group chat for the night" energy. πŸ¦‹


🌸 NAME 🌸

v4l2_subdev_disable_streams β€” the girlies who disable streams on a pad πŸŽ€


✨ SYNOPSIS ✨

int v4l2_subdev_disable_streams(struct v4l2_subdev *sd, u32 pad, u64 streams_mask);

πŸ’– ARGUMENTS πŸ’–

  • sd β€” the subdevice, aka the main character 🫢
  • pad β€” the pad. that's it, that's the whole thing πŸ’…
  • streams_mask β€” a bitmask of the streams you wanna disable 😴

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so, this function disables streams on a source pad of a subdevice. The pad gets identified by its index, and the streams get identified by the streams_mask bitmask. Which means β€” and this is the slay part β€” you can disable multiple streams on a pad at once. efficiency, we love to see it. πŸ”₯

⚠️ But listen, bestie: disabling a stream that isn't enabled is not allowed. If streams_mask contains a stream that's already disabled, this function returns -EALREADY and does absolutely nothing else β€” no partial work, no half-vibes. 🚫

Per-stream disable is only available for subdevs that implement the .enable_streams and .disable_streams operations. For the other subdevs, this function does a best-effort compatibility thing by calling the .s_stream operation β€” but that's limited to subdevs that have a single source pad. Iykyk. 🌈

Drivers that are not stream-aware shall set streams_mask to BIT_ULL(0). Lowkey important, don't skip it. πŸ‘‘


⭐ RETURN ⭐

  • 0 β€” success, we ate πŸ’…βœ¨
  • -EALREADY β€” one of the streams in streams_mask is not enabled 😭
  • -EINVAL β€” the pad index is invalid, or it doesn't correspond to a source pad πŸ™ˆ
  • -EOPNOTSUPP β€” falling back to the legacy .s_stream operation is impossible because the subdev has multiple source pads πŸ’€

πŸŽ€ SEE ALSO πŸŽ€

Kernel file ./include/media/v4l2-subdev.h struct, plus the whole extended friend group:


and that's the whole page, bestie πŸ’– This lil' icon lives down in ./include/media, and the manual's serving October 2026 energy β€” so if you're reading this in the future, hiii, hope the streams are all behaving πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from