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