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 __SOUND_HDSP_H
7#define __SOUND_HDSP_H
8#include <linux/types.h>
9#define HDSP_MATRIX_MIXER_SIZE 2048
10enum HDSP_IO_Type {
11	Digiface,
12	Multiface,
13	H9652,
14	H9632,
15	RPM,
16	Undefined,
17};
18struct hdsp_peak_rms {
19	__u32 input_peaks[26];
20	__u32 playback_peaks[26];
21	__u32 output_peaks[28];
22	__u64 input_rms[26];
23	__u64 playback_rms[26];
24
25	__u64 output_rms[26];
26};
27#define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms)
28struct hdsp_config_info {
29	unsigned char pref_sync_ref;
30	unsigned char wordclock_sync_check;
31	unsigned char spdif_sync_check;
32	unsigned char adatsync_sync_check;
33	unsigned char adat_sync_check[3];
34	unsigned char spdif_in;
35	unsigned char spdif_out;
36	unsigned char spdif_professional;
37	unsigned char spdif_emphasis;
38	unsigned char spdif_nonaudio;
39	unsigned int spdif_sample_rate;
40	unsigned int system_sample_rate;
41	unsigned int autosync_sample_rate;
42	unsigned char system_clock_mode;
43	unsigned char clock_source;
44	unsigned char autosync_ref;
45	unsigned char line_out;
46	unsigned char passthru;
47	unsigned char da_gain;
48	unsigned char ad_gain;
49	unsigned char phone_gain;
50	unsigned char xlr_breakout_cable;
51	unsigned char analog_extension_board;
52};
53#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info)
54struct hdsp_firmware {
55	void __user *firmware_data;
56};
57#define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware)
58struct hdsp_version {
59	enum HDSP_IO_Type io_type;
60	unsigned short firmware_rev;
61};
62#define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdsp_version)
63struct hdsp_mixer {
64	unsigned short matrix[HDSP_MATRIX_MIXER_SIZE];
65};
66#define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdsp_mixer)
67struct hdsp_9632_aeb {
68	int aebi;
69	int aebo;
70};
71#define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb)
72typedef enum HDSP_IO_Type HDSP_IO_Type;
73typedef struct hdsp_peak_rms hdsp_peak_rms_t;
74typedef struct hdsp_config_info hdsp_config_info_t;
75typedef struct hdsp_firmware hdsp_firmware_t;
76typedef struct hdsp_version hdsp_version_t;
77typedef struct hdsp_mixer hdsp_mixer_t;
78typedef struct hdsp_9632_aeb hdsp_9632_aeb_t;
79#endif
80