| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 1 | /**************************************************************************** | 
 | 2 |  **************************************************************************** | 
 | 3 |  *** | 
 | 4 |  ***   This header was automatically generated from a Linux kernel header | 
 | 5 |  ***   of the same name, to make information necessary for userspace to | 
 | 6 |  ***   call into the kernel available to libc.  It contains only constants, | 
 | 7 |  ***   structures, and macros generated from the original header, and thus, | 
 | 8 |  ***   contains no copyrightable information. | 
 | 9 |  *** | 
 | 10 |  ***   To edit the content of this header, modify the corresponding | 
 | 11 |  ***   source file (e.g. under external/kernel-headers/original/) then | 
 | 12 |  ***   run bionic/libc/kernel/tools/update_all.py | 
 | 13 |  *** | 
 | 14 |  ***   Any manual change here will be lost the next time this script will | 
 | 15 |  ***   be run. You've been warned! | 
 | 16 |  *** | 
 | 17 |  **************************************************************************** | 
 | 18 |  ****************************************************************************/ | 
 | 19 | #ifndef _UAPI__SOUND_USB_STREAM_H | 
 | 20 | #define _UAPI__SOUND_USB_STREAM_H | 
 | 21 | #define USB_STREAM_INTERFACE_VERSION 2 | 
 | 22 | #define SNDRV_USB_STREAM_IOCTL_SET_PARAMS _IOW('H', 0x90, struct usb_stream_config) | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 23 | struct usb_stream_packet { | 
 | 24 |   unsigned offset; | 
 | 25 |   unsigned length; | 
 | 26 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 27 | struct usb_stream_config { | 
 | 28 |   unsigned version; | 
 | 29 |   unsigned sample_rate; | 
 | 30 |   unsigned period_frames; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 31 |   unsigned frame_size; | 
 | 32 | }; | 
 | 33 | struct usb_stream { | 
 | 34 |   struct usb_stream_config cfg; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 35 |   unsigned read_size; | 
 | 36 |   unsigned write_size; | 
 | 37 |   int period_size; | 
 | 38 |   unsigned state; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 39 |   int idle_insize; | 
 | 40 |   int idle_outsize; | 
 | 41 |   int sync_packet; | 
 | 42 |   unsigned insize_done; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 43 |   unsigned periods_done; | 
 | 44 |   unsigned periods_polled; | 
 | 45 |   struct usb_stream_packet outpacket[2]; | 
 | 46 |   unsigned inpackets; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 47 |   unsigned inpacket_head; | 
 | 48 |   unsigned inpacket_split; | 
 | 49 |   unsigned inpacket_split_at; | 
 | 50 |   unsigned next_inpacket_split; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 51 |   unsigned next_inpacket_split_at; | 
 | 52 |   struct usb_stream_packet inpacket[0]; | 
 | 53 | }; | 
 | 54 | enum usb_stream_state { | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 55 |   usb_stream_invalid, | 
 | 56 |   usb_stream_stopped, | 
 | 57 |   usb_stream_sync0, | 
 | 58 |   usb_stream_sync1, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 59 |   usb_stream_ready, | 
 | 60 |   usb_stream_running, | 
 | 61 |   usb_stream_xrun, | 
 | 62 | }; | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 63 | #endif |