1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <uapi/sound/usb_stream.h>
7 #define USB_STREAM_NURBS 4
8 #define USB_STREAM_URBDEPTH 4
10 struct usb_stream_kernel {
12 struct usb_device *dev;
18 struct urb *inurb[USB_STREAM_NURBS];
19 struct urb *idle_inurb;
20 struct urb *completed_inurb;
21 struct urb *outurb[USB_STREAM_NURBS];
22 struct urb *idle_outurb;
23 struct urb *completed_outurb;
26 int iso_frame_balance;
28 wait_queue_head_t sleep;
30 unsigned int out_phase;
31 unsigned int out_phase_peeked;
35 struct usb_stream *usb_stream_new(struct usb_stream_kernel *sk,
36 struct usb_device *dev,
37 unsigned int in_endpoint,
38 unsigned int out_endpoint,
39 unsigned int sample_rate,
40 unsigned int use_packsize,
41 unsigned int period_frames,
42 unsigned int frame_size);
43 void usb_stream_free(struct usb_stream_kernel *sk);
44 int usb_stream_start(struct usb_stream_kernel *sk);
45 void usb_stream_stop(struct usb_stream_kernel *sk);
47 #endif /* __USB_STREAM_H */