1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPI__SOUND_USB_STREAM_H
8 #define _UAPI__SOUND_USB_STREAM_H
9 #define USB_STREAM_INTERFACE_VERSION 2
10 #define SNDRV_USB_STREAM_IOCTL_SET_PARAMS _IOW('H', 0x90, struct usb_stream_config)
11 struct usb_stream_packet {
12   unsigned offset;
13   unsigned length;
14 };
15 struct usb_stream_config {
16   unsigned version;
17   unsigned sample_rate;
18   unsigned period_frames;
19   unsigned frame_size;
20 };
21 struct usb_stream {
22   struct usb_stream_config cfg;
23   unsigned read_size;
24   unsigned write_size;
25   int period_size;
26   unsigned state;
27   int idle_insize;
28   int idle_outsize;
29   int sync_packet;
30   unsigned insize_done;
31   unsigned periods_done;
32   unsigned periods_polled;
33   struct usb_stream_packet outpacket[2];
34   unsigned inpackets;
35   unsigned inpacket_head;
36   unsigned inpacket_split;
37   unsigned inpacket_split_at;
38   unsigned next_inpacket_split;
39   unsigned next_inpacket_split_at;
40   struct usb_stream_packet inpacket[];
41 };
42 enum usb_stream_state {
43   usb_stream_invalid,
44   usb_stream_stopped,
45   usb_stream_sync0,
46   usb_stream_sync1,
47   usb_stream_ready,
48   usb_stream_running,
49   usb_stream_xrun,
50 };
51 #endif
52