122851890Sopenharmony_ci/*
222851890Sopenharmony_ci * This header was generated from the Linux kernel headers by update_headers.py,
322851890Sopenharmony_ci * to provide necessary information from kernel to userspace, such as constants,
422851890Sopenharmony_ci * structures, and macros, and thus, contains no copyrightable information.
522851890Sopenharmony_ci */
622851890Sopenharmony_ci#ifndef _UAPI__SOUND_USB_STREAM_H
722851890Sopenharmony_ci#define _UAPI__SOUND_USB_STREAM_H
822851890Sopenharmony_ci#define USB_STREAM_INTERFACE_VERSION 2
922851890Sopenharmony_ci#define SNDRV_USB_STREAM_IOCTL_SET_PARAMS \
1022851890Sopenharmony_ci	_IOW('H', 0x90, struct usb_stream_config)
1122851890Sopenharmony_cistruct usb_stream_packet {
1222851890Sopenharmony_ci	unsigned offset;
1322851890Sopenharmony_ci	unsigned length;
1422851890Sopenharmony_ci};
1522851890Sopenharmony_cistruct usb_stream_config {
1622851890Sopenharmony_ci	unsigned version;
1722851890Sopenharmony_ci	unsigned sample_rate;
1822851890Sopenharmony_ci	unsigned period_frames;
1922851890Sopenharmony_ci	unsigned frame_size;
2022851890Sopenharmony_ci};
2122851890Sopenharmony_cistruct usb_stream {
2222851890Sopenharmony_ci	struct usb_stream_config cfg;
2322851890Sopenharmony_ci	unsigned read_size;
2422851890Sopenharmony_ci	unsigned write_size;
2522851890Sopenharmony_ci	int period_size;
2622851890Sopenharmony_ci	unsigned state;
2722851890Sopenharmony_ci	int idle_insize;
2822851890Sopenharmony_ci	int idle_outsize;
2922851890Sopenharmony_ci	int sync_packet;
3022851890Sopenharmony_ci	unsigned insize_done;
3122851890Sopenharmony_ci	unsigned periods_done;
3222851890Sopenharmony_ci	unsigned periods_polled;
3322851890Sopenharmony_ci	struct usb_stream_packet outpacket[2];
3422851890Sopenharmony_ci	unsigned		 inpackets;
3522851890Sopenharmony_ci	unsigned		 inpacket_head;
3622851890Sopenharmony_ci	unsigned		 inpacket_split;
3722851890Sopenharmony_ci	unsigned		 inpacket_split_at;
3822851890Sopenharmony_ci	unsigned		 next_inpacket_split;
3922851890Sopenharmony_ci	unsigned		 next_inpacket_split_at;
4022851890Sopenharmony_ci	struct usb_stream_packet inpacket[0];
4122851890Sopenharmony_ci};
4222851890Sopenharmony_cienum usb_stream_state {
4322851890Sopenharmony_ci	usb_stream_invalid,
4422851890Sopenharmony_ci	usb_stream_stopped,
4522851890Sopenharmony_ci	usb_stream_sync0,
4622851890Sopenharmony_ci	usb_stream_sync1,
4722851890Sopenharmony_ci	usb_stream_ready,
4822851890Sopenharmony_ci	usb_stream_running,
4922851890Sopenharmony_ci	usb_stream_xrun,
5022851890Sopenharmony_ci};
5122851890Sopenharmony_ci#endif
52