blob: bb7fe80e314561680433dae6e4ef35975bf862f3 [file] [log] [blame]
Christopher Ferris05d08e92016-02-04 13:16:38 -08001/****************************************************************************
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 Ferris05d08e92016-02-04 13:16:38 -080023struct usb_stream_packet {
24 unsigned offset;
25 unsigned length;
26};
Christopher Ferris05d08e92016-02-04 13:16:38 -080027struct usb_stream_config {
28 unsigned version;
29 unsigned sample_rate;
30 unsigned period_frames;
Christopher Ferris05d08e92016-02-04 13:16:38 -080031 unsigned frame_size;
32};
33struct usb_stream {
34 struct usb_stream_config cfg;
Christopher Ferris05d08e92016-02-04 13:16:38 -080035 unsigned read_size;
36 unsigned write_size;
37 int period_size;
38 unsigned state;
Christopher Ferris05d08e92016-02-04 13:16:38 -080039 int idle_insize;
40 int idle_outsize;
41 int sync_packet;
42 unsigned insize_done;
Christopher Ferris05d08e92016-02-04 13:16:38 -080043 unsigned periods_done;
44 unsigned periods_polled;
45 struct usb_stream_packet outpacket[2];
46 unsigned inpackets;
Christopher Ferris05d08e92016-02-04 13:16:38 -080047 unsigned inpacket_head;
48 unsigned inpacket_split;
49 unsigned inpacket_split_at;
50 unsigned next_inpacket_split;
Christopher Ferris05d08e92016-02-04 13:16:38 -080051 unsigned next_inpacket_split_at;
52 struct usb_stream_packet inpacket[0];
53};
54enum usb_stream_state {
Christopher Ferris05d08e92016-02-04 13:16:38 -080055 usb_stream_invalid,
56 usb_stream_stopped,
57 usb_stream_sync0,
58 usb_stream_sync1,
Christopher Ferris05d08e92016-02-04 13:16:38 -080059 usb_stream_ready,
60 usb_stream_running,
61 usb_stream_xrun,
62};
Christopher Ferris05d08e92016-02-04 13:16:38 -080063#endif