122851890Sopenharmony_ci/****************************************************************************
222851890Sopenharmony_ci ****************************************************************************
322851890Sopenharmony_ci ***
422851890Sopenharmony_ci ***   This header was automatically generated from a Linux kernel header
522851890Sopenharmony_ci ***   of the same name, to make information necessary for userspace to
622851890Sopenharmony_ci ***   call into the kernel available to libc.  It contains only constants,
722851890Sopenharmony_ci ***   structures, and macros generated from the original header, and thus,
822851890Sopenharmony_ci ***   contains no copyrightable information.
922851890Sopenharmony_ci ***
1022851890Sopenharmony_ci ***   To edit the content of this header, modify the corresponding
1122851890Sopenharmony_ci ***   source file (e.g. under external/kernel-headers/original/) then
1222851890Sopenharmony_ci ***   run bionic/libc/kernel/tools/update_all.py
1322851890Sopenharmony_ci ***
1422851890Sopenharmony_ci ***   Any manual change here will be lost the next time this script will
1522851890Sopenharmony_ci ***   be run. You've been warned!
1622851890Sopenharmony_ci ***
1722851890Sopenharmony_ci ****************************************************************************
1822851890Sopenharmony_ci ****************************************************************************/
1922851890Sopenharmony_ci#ifndef _UAPI__SOUND_USB_STREAM_H
2022851890Sopenharmony_ci#define _UAPI__SOUND_USB_STREAM_H
2122851890Sopenharmony_ci#define USB_STREAM_INTERFACE_VERSION 2
2222851890Sopenharmony_ci#define SNDRV_USB_STREAM_IOCTL_SET_PARAMS _IOW('H', 0x90, struct usb_stream_config)
2322851890Sopenharmony_cistruct usb_stream_packet {
2422851890Sopenharmony_ci  unsigned offset;
2522851890Sopenharmony_ci  unsigned length;
2622851890Sopenharmony_ci};
2722851890Sopenharmony_cistruct usb_stream_config {
2822851890Sopenharmony_ci  unsigned version;
2922851890Sopenharmony_ci  unsigned sample_rate;
3022851890Sopenharmony_ci  unsigned period_frames;
3122851890Sopenharmony_ci  unsigned frame_size;
3222851890Sopenharmony_ci};
3322851890Sopenharmony_cistruct usb_stream {
3422851890Sopenharmony_ci  struct usb_stream_config cfg;
3522851890Sopenharmony_ci  unsigned read_size;
3622851890Sopenharmony_ci  unsigned write_size;
3722851890Sopenharmony_ci  int period_size;
3822851890Sopenharmony_ci  unsigned state;
3922851890Sopenharmony_ci  int idle_insize;
4022851890Sopenharmony_ci  int idle_outsize;
4122851890Sopenharmony_ci  int sync_packet;
4222851890Sopenharmony_ci  unsigned insize_done;
4322851890Sopenharmony_ci  unsigned periods_done;
4422851890Sopenharmony_ci  unsigned periods_polled;
4522851890Sopenharmony_ci  struct usb_stream_packet outpacket[2];
4622851890Sopenharmony_ci  unsigned inpackets;
4722851890Sopenharmony_ci  unsigned inpacket_head;
4822851890Sopenharmony_ci  unsigned inpacket_split;
4922851890Sopenharmony_ci  unsigned inpacket_split_at;
5022851890Sopenharmony_ci  unsigned next_inpacket_split;
5122851890Sopenharmony_ci  unsigned next_inpacket_split_at;
5222851890Sopenharmony_ci  struct usb_stream_packet inpacket[0];
5322851890Sopenharmony_ci};
5422851890Sopenharmony_cienum usb_stream_state {
5522851890Sopenharmony_ci  usb_stream_invalid,
5622851890Sopenharmony_ci  usb_stream_stopped,
5722851890Sopenharmony_ci  usb_stream_sync0,
5822851890Sopenharmony_ci  usb_stream_sync1,
5922851890Sopenharmony_ci  usb_stream_ready,
6022851890Sopenharmony_ci  usb_stream_running,
6122851890Sopenharmony_ci  usb_stream_xrun,
6222851890Sopenharmony_ci};
6322851890Sopenharmony_ci#endif
64