hdspm.h
001: #ifndef __SOUND_HDSPM_H
002: #define __SOUND_HDSPM_H
003: 
004: 
005: thomas@undata.org
006: 
007: 
008: 
009: 
010: 
011: 
012: 
013: 
014: 
015: 
016: 
017: 
018: 
019: 
020: 
021: 
022: 
023: 
024: #define HDSPM_MAX_CHANNELS      64
025: 
026: enum hdspm_io_type {
027:         MADI,
028:         MADIface,
029:         AIO,
030:         AES32,
031:         RayDAT
032: };
033: 
034: enum hdspm_speed {
035:         ss,
036:         ds,
037:         qs
038: };
039: 
040: 
041: 
042: struct hdspm_peak_rms {
043:         uint32_t input_peaks[64];
044:         uint32_t playback_peaks[64];
045:         uint32_t output_peaks[64];
046: 
047:         uint64_t input_rms[64];
048:         uint64_t playback_rms[64];
049:         uint64_t output_rms[64];
050: 
051:         uint8_t speed; 
052:         int status2;
053: };
054: 
055: #define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS \
056:         _IOR('H', 0x42, struct hdspm_peak_rms)
057: 
058: 
059: 
060: struct hdspm_config {
061:         unsigned char pref_sync_ref;
062:         unsigned char wordclock_sync_check;
063:         unsigned char madi_sync_check;
064:         unsigned int system_sample_rate;
065:         unsigned int autosync_sample_rate;
066:         unsigned char system_clock_mode;
067:         unsigned char clock_source;
068:         unsigned char autosync_ref;
069:         unsigned char line_out;
070:         unsigned int passthru;
071:         unsigned int analog_out;
072: };
073: 
074: #define SNDRV_HDSPM_IOCTL_GET_CONFIG \
075:         _IOR('H', 0x41, struct hdspm_config)
076: 
077: 
078: 
079: 
080: 
081: 
082: 
083: 
084: 
085: 
086: enum hdspm_ltc_format {
087:         format_invalid,
088:         fps_24,
089:         fps_25,
090:         fps_2997,
091:         fps_30
092: };
093: 
094: enum hdspm_ltc_frame {
095:         frame_invalid,
096:         drop_frame,
097:         full_frame
098: };
099: 
100: enum hdspm_ltc_input_format {
101:         ntsc,
102:         pal,
103:         no_video
104: };
105: 
106: struct hdspm_ltc {
107:         unsigned int ltc;
108: 
109:         enum hdspm_ltc_format format;
110:         enum hdspm_ltc_frame frame;
111:         enum hdspm_ltc_input_format input_format;
112: };
113: 
114: #define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_mixer_ioctl)
115: 
116: 
117: 
118: 
119: 
120: 
121: 
122: enum hdspm_sync {
123:         hdspm_sync_no_lock = 0,
124:         hdspm_sync_lock = 1,
125:         hdspm_sync_sync = 2
126: };
127: 
128: enum hdspm_madi_input {
129:         hdspm_input_optical = 0,
130:         hdspm_input_coax = 1
131: };
132: 
133: enum hdspm_madi_channel_format {
134:         hdspm_format_ch_64 = 0,
135:         hdspm_format_ch_56 = 1
136: };
137: 
138: enum hdspm_madi_frame_format {
139:         hdspm_frame_48 = 0,
140:         hdspm_frame_96 = 1
141: };
142: 
143: enum hdspm_syncsource {
144:         syncsource_wc = 0,
145:         syncsource_madi = 1,
146:         syncsource_tco = 2,
147:         syncsource_sync = 3,
148:         syncsource_none = 4
149: };
150: 
151: struct hdspm_status {
152:         uint8_t card_type; 
153:         enum hdspm_syncsource autosync_source;
154: 
155:         uint64_t card_clock;
156:         uint32_t master_period;
157: 
158:         union {
159:                 struct {
160:                         uint8_t sync_wc; 
161:                         uint8_t sync_madi; 
162:                         uint8_t sync_tco; 
163:                         uint8_t sync_in; 
164:                         uint8_t madi_input; 
165:                         uint8_t channel_format; 
166:                         uint8_t frame_format; 
167:                 } madi;
168:         } card_specific;
169: };
170: 
171: #define SNDRV_HDSPM_IOCTL_GET_STATUS \
172:         _IOR('H', 0x47, struct hdspm_status)
173: 
174: 
175: 
176: 
177: 
178: #define HDSPM_ADDON_TCO 1
179: 
180: struct hdspm_version {
181:         uint8_t card_type; 
182:         char cardname[20];
183:         unsigned int serial;
184:         unsigned short firmware_rev;
185:         int addons;
186: };
187: 
188: #define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x48, struct hdspm_version)
189: 
190: 
191: 
192: 
193: 
194: 
195: 
196: 
197: 
198: 
199: 
200: 
201: 
202: 
203: #define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS
204: 
205: struct hdspm_channelfader {
206:         unsigned int in[HDSPM_MIXER_CHANNELS];
207:         unsigned int pb[HDSPM_MIXER_CHANNELS];
208: };
209: 
210: struct hdspm_mixer {
211:         struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS];
212: };
213: 
214: struct hdspm_mixer_ioctl {
215:         struct hdspm_mixer *mixer;
216: };
217: 
218: 
219: #define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl)
220: 
221: 
222: typedef struct hdspm_peak_rms hdspm_peak_rms_t;
223: typedef struct hdspm_config_info hdspm_config_info_t;
224: typedef struct hdspm_version hdspm_version_t;
225: typedef struct hdspm_channelfader snd_hdspm_channelfader_t;
226: typedef struct hdspm_mixer hdspm_mixer_t;
227: 
228: 
229: #endif
230: 
      
      
      
      
   
      
      
         
            
            © Andrew Scott 2006 -
            2025, 
            All Rights Reserved