1/* 2 * This header was generated from the Linux kernel headers by update_headers.py, 3 * to provide necessary information from kernel to userspace, such as constants, 4 * structures, and macros, and thus, contains no copyrightable information. 5 */ 6#ifndef __SOUND_HDSPM_H 7#define __SOUND_HDSPM_H 8#include <linux/types.h> 9#define HDSPM_MAX_CHANNELS 64 10enum hdspm_io_type { 11 MADI, 12 MADIface, 13 AIO, 14 AES32, 15 RayDAT 16}; 17enum hdspm_speed { 18 ss, 19 ds, 20 qs 21}; 22struct hdspm_peak_rms { 23 __u32 input_peaks[64]; 24 __u32 playback_peaks[64]; 25 __u32 output_peaks[64]; 26 __u64 input_rms[64]; 27 __u64 playback_rms[64]; 28 __u64 output_rms[64]; 29 __u8 speed; 30 int status2; 31}; 32#define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS \ 33 _IOR('H', 0x42, struct hdspm_peak_rms) 34struct hdspm_config { 35 unsigned char pref_sync_ref; 36 unsigned char wordclock_sync_check; 37 unsigned char madi_sync_check; 38 unsigned int system_sample_rate; 39 unsigned int autosync_sample_rate; 40 unsigned char system_clock_mode; 41 unsigned char clock_source; 42 unsigned char autosync_ref; 43 unsigned char line_out; 44 unsigned int passthru; 45 unsigned int analog_out; 46}; 47#define SNDRV_HDSPM_IOCTL_GET_CONFIG \ 48 _IOR('H', 0x41, struct hdspm_config) 49enum hdspm_ltc_format { 50 format_invalid, 51 fps_24, 52 fps_25, 53 fps_2997, 54 fps_30 55}; 56enum hdspm_ltc_frame { 57 frame_invalid, 58 drop_frame, 59 full_frame 60}; 61enum hdspm_ltc_input_format { 62 ntsc, 63 pal, 64 no_video 65}; 66struct hdspm_ltc { 67 unsigned int ltc; 68 enum hdspm_ltc_format format; 69 enum hdspm_ltc_frame frame; 70 enum hdspm_ltc_input_format input_format; 71}; 72#define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_ltc) 73enum hdspm_sync { 74 hdspm_sync_no_lock = 0, 75 hdspm_sync_lock = 1, 76 hdspm_sync_sync = 2 77}; 78enum hdspm_madi_input { 79 hdspm_input_optical = 0, 80 hdspm_input_coax = 1 81}; 82enum hdspm_madi_channel_format { 83 hdspm_format_ch_64 = 0, 84 hdspm_format_ch_56 = 1 85}; 86enum hdspm_madi_frame_format { 87 hdspm_frame_48 = 0, 88 hdspm_frame_96 = 1 89}; 90enum hdspm_syncsource { 91 syncsource_wc = 0, 92 syncsource_madi = 1, 93 syncsource_tco = 2, 94 syncsource_sync = 3, 95 syncsource_none = 4 96}; 97struct hdspm_status { 98 __u8 card_type; 99 enum hdspm_syncsource autosync_source; 100 __u64 card_clock; 101 __u32 master_period; 102 union { 103 struct { 104 __u8 sync_wc; 105 __u8 sync_madi; 106 __u8 sync_tco; 107 __u8 sync_in; 108 __u8 madi_input; 109 __u8 channel_format; 110 __u8 frame_format; 111 } madi; 112 } card_specific; 113}; 114#define SNDRV_HDSPM_IOCTL_GET_STATUS \ 115 _IOR('H', 0x47, struct hdspm_status) 116#define HDSPM_ADDON_TCO 1 117struct hdspm_version { 118 __u8 card_type; 119 char cardname[20]; 120 unsigned int serial; 121 unsigned short firmware_rev; 122 int addons; 123}; 124#define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x48, struct hdspm_version) 125#define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS 126struct hdspm_channelfader { 127 unsigned int in[HDSPM_MIXER_CHANNELS]; 128 unsigned int pb[HDSPM_MIXER_CHANNELS]; 129}; 130struct hdspm_mixer { 131 struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS]; 132}; 133struct hdspm_mixer_ioctl { 134 struct hdspm_mixer *mixer; 135}; 136#define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl) 137typedef struct hdspm_peak_rms hdspm_peak_rms_t; 138typedef struct hdspm_config_info hdspm_config_info_t; 139typedef struct hdspm_version hdspm_version_t; 140typedef struct hdspm_channelfader snd_hdspm_channelfader_t; 141typedef struct hdspm_mixer hdspm_mixer_t; 142#endif 143