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