STRUCT USB_DATA_STREAM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so welcome to the Kernel API Manual page for struct usb_data_stream(9) β€” it's the generic object of an USB stream, and honestly it's giving β€œkernel struct with main character energy” ✨.


✨ SYNOPSIS ✨

bestie, here's the exact shape, no cap:

       struct usb_data_stream {
         #define MAX_NO_URBS_FOR_DATA_STREAM 10;
           struct usb_device                 *udev;
           struct usb_data_stream_properties  props;
         #define USB_STATE_INIT    0x00;
         #define USB_STATE_URB_BUF 0x01;
           int state;
           void (*complete) (struct usb_data_stream *, u8 *, size_t);
           struct urb    *urb_list[MAX_NO_URBS_FOR_DATA_STREAM];
           int buf_num;
           unsigned long  buf_size;
           u8 *buf_list[MAX_NO_URBS_FOR_DATA_STREAM];
           dma_addr_t dma_addr[MAX_NO_URBS_FOR_DATA_STREAM];
           int urbs_initialized;
           int urbs_submitted;
           void *user_priv;
        };

quick value check: MAX_NO_URBS_FOR_DATA_STREAM is 10, USB_STATE_INIT is 0x00, and USB_STATE_URB_BUF is 0x01 β€” all right there in the struct, periodt πŸ’….


🫢 Members 🫢

the members are the whole cast, and every single one matters:

  • udev β€” the USB device. That's the main character device pointer.
  • props β€” data stream properties. The vibe settings, basically.
  • state β€” state of the stream. The synopsis also shows USB_STATE_INIT as 0x00 and USB_STATE_URB_BUF as 0x01.
  • complete β€” complete callback; the synopsis types it as void (*complete) (struct usb_data_stream *, u8 *, size_t);.
  • urb_list β€” list of URBs, shown as struct urb *urb_list[MAX_NO_URBS_FOR_DATA_STREAM];.
  • buf_num β€” number of buffer allocated. (That's the original phrasing, bestie β€” we keep the lore.)
  • buf_size β€” size of each buffer in buf_list.
  • buf_list β€” array containing all allocate buffers for streaming. (Again: lore preserved.)
  • dma_addr β€” list of dma_addr_t for each buffer in buf_list.
  • urbs_initialized β€” number of URBs initialized.
  • urbs_submitted β€” number of URBs submitted.
  • user_priv β€” for private use. No questions, just private-use energy 🫢.

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/media/usb/dvb-usb/dvb-usb.h struct β€” and then the whole squad:

  • struct dvb_usb_device_description(9)
  • struct dvb_usb_adapter_fe_properties(9)
  • struct dvb_rc_legacy(9)
  • struct dvb_rc(9)
  • enum dvb_usb_mode(9)
  • struct dvb_usb_device_properties(9)
  • struct dvb_usb_fe_adapter(9)
  • struct dvb_usb_adapter(9)
  • struct dvb_usb_device(9)

cute sign-off: source/version ./drivers/media/usb/dvb-usb, date October 2026 β€” this is the struct usb_data_stream(9) page, and it ate, no crumbs. bye bestie πŸ’…πŸ«Ά

πŸ“¦ where this page comes from