blob: 16d03ba362d1137630f47040351842333ac8d362 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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 __SOUND_HDSPM_H
20#define __SOUND_HDSPM_H
21#define HDSPM_MAX_CHANNELS 64
22enum hdspm_io_type {
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080024 MADI,
25 MADIface,
26 AIO,
27 AES32,
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080029 RayDAT
Ben Cheng655a7c02013-10-16 16:09:24 -070030};
31enum hdspm_speed {
Tao Baod7db5942015-01-28 10:07:51 -080032 ss,
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080034 ds,
35 qs
Ben Cheng655a7c02013-10-16 16:09:24 -070036};
37struct hdspm_peak_rms {
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080039 uint32_t input_peaks[64];
40 uint32_t playback_peaks[64];
41 uint32_t output_peaks[64];
42 uint64_t input_rms[64];
Ben Cheng655a7c02013-10-16 16:09:24 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080044 uint64_t playback_rms[64];
45 uint64_t output_rms[64];
46 uint8_t speed;
47 int status2;
Ben Cheng655a7c02013-10-16 16:09:24 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49};
Tao Baod7db5942015-01-28 10:07:51 -080050#define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS _IOR('H', 0x42, struct hdspm_peak_rms)
Ben Cheng655a7c02013-10-16 16:09:24 -070051struct hdspm_config {
Tao Baod7db5942015-01-28 10:07:51 -080052 unsigned char pref_sync_ref;
Ben Cheng655a7c02013-10-16 16:09:24 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080054 unsigned char wordclock_sync_check;
55 unsigned char madi_sync_check;
56 unsigned int system_sample_rate;
57 unsigned int autosync_sample_rate;
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080059 unsigned char system_clock_mode;
60 unsigned char clock_source;
61 unsigned char autosync_ref;
62 unsigned char line_out;
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080064 unsigned int passthru;
65 unsigned int analog_out;
Ben Cheng655a7c02013-10-16 16:09:24 -070066};
Tao Baod7db5942015-01-28 10:07:51 -080067#define SNDRV_HDSPM_IOCTL_GET_CONFIG _IOR('H', 0x41, struct hdspm_config)
Ben Cheng655a7c02013-10-16 16:09:24 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69enum hdspm_ltc_format {
Tao Baod7db5942015-01-28 10:07:51 -080070 format_invalid,
71 fps_24,
72 fps_25,
Ben Cheng655a7c02013-10-16 16:09:24 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 fps_2997,
75 fps_30
Ben Cheng655a7c02013-10-16 16:09:24 -070076};
77enum hdspm_ltc_frame {
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080079 frame_invalid,
80 drop_frame,
81 full_frame
Ben Cheng655a7c02013-10-16 16:09:24 -070082};
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84enum hdspm_ltc_input_format {
Tao Baod7db5942015-01-28 10:07:51 -080085 ntsc,
86 pal,
87 no_video
Ben Cheng655a7c02013-10-16 16:09:24 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89};
90struct hdspm_ltc {
Tao Baod7db5942015-01-28 10:07:51 -080091 unsigned int ltc;
92 enum hdspm_ltc_format format;
Ben Cheng655a7c02013-10-16 16:09:24 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080094 enum hdspm_ltc_frame frame;
95 enum hdspm_ltc_input_format input_format;
Ben Cheng655a7c02013-10-16 16:09:24 -070096};
Christopher Ferris38062f92014-07-09 15:33:25 -070097#define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_ltc)
Ben Cheng655a7c02013-10-16 16:09:24 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99enum hdspm_sync {
Tao Baod7db5942015-01-28 10:07:51 -0800100 hdspm_sync_no_lock = 0,
101 hdspm_sync_lock = 1,
102 hdspm_sync_sync = 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104};
105enum hdspm_madi_input {
Tao Baod7db5942015-01-28 10:07:51 -0800106 hdspm_input_optical = 0,
107 hdspm_input_coax = 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109};
110enum hdspm_madi_channel_format {
Tao Baod7db5942015-01-28 10:07:51 -0800111 hdspm_format_ch_64 = 0,
112 hdspm_format_ch_56 = 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114};
115enum hdspm_madi_frame_format {
Tao Baod7db5942015-01-28 10:07:51 -0800116 hdspm_frame_48 = 0,
117 hdspm_frame_96 = 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119};
120enum hdspm_syncsource {
Tao Baod7db5942015-01-28 10:07:51 -0800121 syncsource_wc = 0,
122 syncsource_madi = 1,
Ben Cheng655a7c02013-10-16 16:09:24 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800124 syncsource_tco = 2,
125 syncsource_sync = 3,
126 syncsource_none = 4
Ben Cheng655a7c02013-10-16 16:09:24 -0700127};
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129struct hdspm_status {
Tao Baod7db5942015-01-28 10:07:51 -0800130 uint8_t card_type;
131 enum hdspm_syncsource autosync_source;
132 uint64_t card_clock;
Ben Cheng655a7c02013-10-16 16:09:24 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800134 uint32_t master_period;
135 union {
136 struct {
137 uint8_t sync_wc;
Ben Cheng655a7c02013-10-16 16:09:24 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800139 uint8_t sync_madi;
140 uint8_t sync_tco;
141 uint8_t sync_in;
142 uint8_t madi_input;
Ben Cheng655a7c02013-10-16 16:09:24 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800144 uint8_t channel_format;
145 uint8_t frame_format;
146 } madi;
147 } card_specific;
Ben Cheng655a7c02013-10-16 16:09:24 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149};
Tao Baod7db5942015-01-28 10:07:51 -0800150#define SNDRV_HDSPM_IOCTL_GET_STATUS _IOR('H', 0x47, struct hdspm_status)
Ben Cheng655a7c02013-10-16 16:09:24 -0700151#define HDSPM_ADDON_TCO 1
152struct hdspm_version {
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800154 uint8_t card_type;
155 char cardname[20];
156 unsigned int serial;
157 unsigned short firmware_rev;
Ben Cheng655a7c02013-10-16 16:09:24 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800159 int addons;
Ben Cheng655a7c02013-10-16 16:09:24 -0700160};
161#define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x48, struct hdspm_version)
162#define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164struct hdspm_channelfader {
Tao Baod7db5942015-01-28 10:07:51 -0800165 unsigned int in[HDSPM_MIXER_CHANNELS];
166 unsigned int pb[HDSPM_MIXER_CHANNELS];
Ben Cheng655a7c02013-10-16 16:09:24 -0700167};
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169struct hdspm_mixer {
Tao Baod7db5942015-01-28 10:07:51 -0800170 struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS];
Ben Cheng655a7c02013-10-16 16:09:24 -0700171};
172struct hdspm_mixer_ioctl {
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800174 struct hdspm_mixer * mixer;
Ben Cheng655a7c02013-10-16 16:09:24 -0700175};
176#define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl)
177typedef struct hdspm_peak_rms hdspm_peak_rms_t;
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179typedef struct hdspm_config_info hdspm_config_info_t;
180typedef struct hdspm_version hdspm_version_t;
181typedef struct hdspm_channelfader snd_hdspm_channelfader_t;
182typedef struct hdspm_mixer hdspm_mixer_t;
183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184#endif