• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This header was generated from the Linux kernel headers by update_headers.py,
3  * to provide necessary information from kernel to userspace, such as constants,
4  * structures, and macros, and thus, contains no copyrightable information.
5  */
6 #ifndef _UAPI__SOUND_USB_STREAM_H
7 #define _UAPI__SOUND_USB_STREAM_H
8 #define USB_STREAM_INTERFACE_VERSION 2
9 #define SNDRV_USB_STREAM_IOCTL_SET_PARAMS \
10 	_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[0];
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