1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
|
#ifndef __SOUND_HDSPM_H
#define __SOUND_HDSPM_H
#define HDSPM_MAX_CHANNELS 64
enum hdspm_io_type {
MADI,
MADIface,
AIO,
AES32,
RayDAT
};
enum hdspm_speed {
ss,
ds,
qs
};
struct hdspm_peak_rms {
uint32_t input_peaks[64];
uint32_t playback_peaks[64];
uint32_t output_peaks[64];
uint64_t input_rms[64];
uint64_t playback_rms[64];
uint64_t output_rms[64];
uint8_t speed;
int status2;
};
#define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS \
_IOR('H', 0x42, struct hdspm_peak_rms)
struct hdspm_config {
unsigned char pref_sync_ref;
unsigned char wordclock_sync_check;
unsigned char madi_sync_check;
unsigned int system_sample_rate;
unsigned int autosync_sample_rate;
unsigned char system_clock_mode;
unsigned char clock_source;
unsigned char autosync_ref;
unsigned char line_out;
unsigned int passthru;
unsigned int analog_out;
};
#define SNDRV_HDSPM_IOCTL_GET_CONFIG \
_IOR('H', 0x41, struct hdspm_config)
enum hdspm_ltc_format {
format_invalid,
fps_24,
fps_25,
fps_2997,
fps_30
};
enum hdspm_ltc_frame {
frame_invalid,
drop_frame,
full_frame
};
enum hdspm_ltc_input_format {
ntsc,
pal,
no_video
};
struct hdspm_ltc {
unsigned int ltc;
enum hdspm_ltc_format format;
enum hdspm_ltc_frame frame;
enum hdspm_ltc_input_format input_format;
};
#define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_ltc)
enum hdspm_sync {
hdspm_sync_no_lock = 0,
hdspm_sync_lock = 1,
hdspm_sync_sync = 2
};
enum hdspm_madi_input {
hdspm_input_optical = 0,
hdspm_input_coax = 1
};
enum hdspm_madi_channel_format {
hdspm_format_ch_64 = 0,
hdspm_format_ch_56 = 1
};
enum hdspm_madi_frame_format {
hdspm_frame_48 = 0,
hdspm_frame_96 = 1
};
enum hdspm_syncsource {
syncsource_wc = 0,
syncsource_madi = 1,
syncsource_tco = 2,
syncsource_sync = 3,
syncsource_none = 4
};
struct hdspm_status {
uint8_t card_type;
enum hdspm_syncsource autosync_source;
uint64_t card_clock;
uint32_t master_period;
union {
struct {
uint8_t sync_wc;
uint8_t sync_madi;
uint8_t sync_tco;
uint8_t sync_in;
uint8_t madi_input;
uint8_t channel_format;
uint8_t frame_format;
} madi;
} card_specific;
};
#define SNDRV_HDSPM_IOCTL_GET_STATUS \
_IOR('H', 0x47, struct hdspm_status)
#define HDSPM_ADDON_TCO 1
struct hdspm_version {
uint8_t card_type;
char cardname[20];
unsigned int serial;
unsigned short firmware_rev;
int addons;
};
#define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x48, struct hdspm_version)
#define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS
struct hdspm_channelfader {
unsigned int in[HDSPM_MIXER_CHANNELS];
unsigned int pb[HDSPM_MIXER_CHANNELS];
};
struct hdspm_mixer {
struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS];
};
struct hdspm_mixer_ioctl {
struct hdspm_mixer *mixer;
};
#define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl)
typedef struct hdspm_peak_rms hdspm_peak_rms_t;
typedef struct hdspm_config_info hdspm_config_info_t;
typedef struct hdspm_version hdspm_version_t;
typedef struct hdspm_channelfader snd_hdspm_channelfader_t;
typedef struct hdspm_mixer hdspm_mixer_t;
#endif
|