0001
0002 #ifndef __SOUND_HDSPM_H
0003 #define __SOUND_HDSPM_H
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #ifdef __linux__
0025 #include <linux/types.h>
0026 #endif
0027
0028
0029 #define HDSPM_MAX_CHANNELS 64
0030
0031 enum hdspm_io_type {
0032 MADI,
0033 MADIface,
0034 AIO,
0035 AES32,
0036 RayDAT
0037 };
0038
0039 enum hdspm_speed {
0040 ss,
0041 ds,
0042 qs
0043 };
0044
0045
0046
0047 struct hdspm_peak_rms {
0048 __u32 input_peaks[64];
0049 __u32 playback_peaks[64];
0050 __u32 output_peaks[64];
0051
0052 __u64 input_rms[64];
0053 __u64 playback_rms[64];
0054 __u64 output_rms[64];
0055
0056 __u8 speed;
0057 int status2;
0058 };
0059
0060 #define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS \
0061 _IOR('H', 0x42, struct hdspm_peak_rms)
0062
0063
0064
0065 struct hdspm_config {
0066 unsigned char pref_sync_ref;
0067 unsigned char wordclock_sync_check;
0068 unsigned char madi_sync_check;
0069 unsigned int system_sample_rate;
0070 unsigned int autosync_sample_rate;
0071 unsigned char system_clock_mode;
0072 unsigned char clock_source;
0073 unsigned char autosync_ref;
0074 unsigned char line_out;
0075 unsigned int passthru;
0076 unsigned int analog_out;
0077 };
0078
0079 #define SNDRV_HDSPM_IOCTL_GET_CONFIG \
0080 _IOR('H', 0x41, struct hdspm_config)
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091 enum hdspm_ltc_format {
0092 format_invalid,
0093 fps_24,
0094 fps_25,
0095 fps_2997,
0096 fps_30
0097 };
0098
0099 enum hdspm_ltc_frame {
0100 frame_invalid,
0101 drop_frame,
0102 full_frame
0103 };
0104
0105 enum hdspm_ltc_input_format {
0106 ntsc,
0107 pal,
0108 no_video
0109 };
0110
0111 struct hdspm_ltc {
0112 unsigned int ltc;
0113
0114 enum hdspm_ltc_format format;
0115 enum hdspm_ltc_frame frame;
0116 enum hdspm_ltc_input_format input_format;
0117 };
0118
0119 #define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_ltc)
0120
0121
0122
0123
0124
0125
0126
0127 enum hdspm_sync {
0128 hdspm_sync_no_lock = 0,
0129 hdspm_sync_lock = 1,
0130 hdspm_sync_sync = 2
0131 };
0132
0133 enum hdspm_madi_input {
0134 hdspm_input_optical = 0,
0135 hdspm_input_coax = 1
0136 };
0137
0138 enum hdspm_madi_channel_format {
0139 hdspm_format_ch_64 = 0,
0140 hdspm_format_ch_56 = 1
0141 };
0142
0143 enum hdspm_madi_frame_format {
0144 hdspm_frame_48 = 0,
0145 hdspm_frame_96 = 1
0146 };
0147
0148 enum hdspm_syncsource {
0149 syncsource_wc = 0,
0150 syncsource_madi = 1,
0151 syncsource_tco = 2,
0152 syncsource_sync = 3,
0153 syncsource_none = 4
0154 };
0155
0156 struct hdspm_status {
0157 __u8 card_type;
0158 enum hdspm_syncsource autosync_source;
0159
0160 __u64 card_clock;
0161 __u32 master_period;
0162
0163 union {
0164 struct {
0165 __u8 sync_wc;
0166 __u8 sync_madi;
0167 __u8 sync_tco;
0168 __u8 sync_in;
0169 __u8 madi_input;
0170 __u8 channel_format;
0171 __u8 frame_format;
0172 } madi;
0173 } card_specific;
0174 };
0175
0176 #define SNDRV_HDSPM_IOCTL_GET_STATUS \
0177 _IOR('H', 0x47, struct hdspm_status)
0178
0179
0180
0181
0182
0183 #define HDSPM_ADDON_TCO 1
0184
0185 struct hdspm_version {
0186 __u8 card_type;
0187 char cardname[20];
0188 unsigned int serial;
0189 unsigned short firmware_rev;
0190 int addons;
0191 };
0192
0193 #define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x48, struct hdspm_version)
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208 #define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS
0209
0210 struct hdspm_channelfader {
0211 unsigned int in[HDSPM_MIXER_CHANNELS];
0212 unsigned int pb[HDSPM_MIXER_CHANNELS];
0213 };
0214
0215 struct hdspm_mixer {
0216 struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS];
0217 };
0218
0219 struct hdspm_mixer_ioctl {
0220 struct hdspm_mixer *mixer;
0221 };
0222
0223
0224 #define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl)
0225
0226 #endif