usb_stream.h 990 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef __USB_STREAM_H
  2. #define __USB_STREAM_H
  3. #include <uapi/sound/usb_stream.h>
  4. #define USB_STREAM_NURBS 4
  5. #define USB_STREAM_URBDEPTH 4
  6. struct usb_stream_kernel {
  7. struct usb_stream *s;
  8. void *write_page;
  9. unsigned n_o_ps;
  10. struct urb *inurb[USB_STREAM_NURBS];
  11. struct urb *idle_inurb;
  12. struct urb *completed_inurb;
  13. struct urb *outurb[USB_STREAM_NURBS];
  14. struct urb *idle_outurb;
  15. struct urb *completed_outurb;
  16. struct urb *i_urb;
  17. int iso_frame_balance;
  18. wait_queue_head_t sleep;
  19. unsigned out_phase;
  20. unsigned out_phase_peeked;
  21. unsigned freqn;
  22. };
  23. struct usb_stream *usb_stream_new(struct usb_stream_kernel *sk,
  24. struct usb_device *dev,
  25. unsigned in_endpoint, unsigned out_endpoint,
  26. unsigned sample_rate, unsigned use_packsize,
  27. unsigned period_frames, unsigned frame_size);
  28. void usb_stream_free(struct usb_stream_kernel *);
  29. int usb_stream_start(struct usb_stream_kernel *);
  30. void usb_stream_stop(struct usb_stream_kernel *);
  31. #endif /* __USB_STREAM_H */