• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
10 enum hdspm_io_type {
11 	MADI,
12 	MADIface,
13 	AIO,
14 	AES32,
15 	RayDAT
16 };
17 enum hdspm_speed {
18 	ss,
19 	ds,
20 	qs
21 };
22 struct 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)
34 struct 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)
49 enum hdspm_ltc_format {
50 	format_invalid,
51 	fps_24,
52 	fps_25,
53 	fps_2997,
54 	fps_30
55 };
56 enum hdspm_ltc_frame {
57 	frame_invalid,
58 	drop_frame,
59 	full_frame
60 };
61 enum hdspm_ltc_input_format {
62 	ntsc,
63 	pal,
64 	no_video
65 };
66 struct 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)
73 enum hdspm_sync {
74 	hdspm_sync_no_lock = 0,
75 	hdspm_sync_lock = 1,
76 	hdspm_sync_sync = 2
77 };
78 enum hdspm_madi_input {
79 	hdspm_input_optical = 0,
80 	hdspm_input_coax = 1
81 };
82 enum hdspm_madi_channel_format {
83 	hdspm_format_ch_64 = 0,
84 	hdspm_format_ch_56 = 1
85 };
86 enum hdspm_madi_frame_format {
87 	hdspm_frame_48 = 0,
88 	hdspm_frame_96 = 1
89 };
90 enum hdspm_syncsource {
91 	syncsource_wc = 0,
92 	syncsource_madi = 1,
93 	syncsource_tco = 2,
94 	syncsource_sync = 3,
95 	syncsource_none = 4
96 };
97 struct 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
117 struct 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
126 struct hdspm_channelfader {
127 	unsigned int in[HDSPM_MIXER_CHANNELS];
128 	unsigned int pb[HDSPM_MIXER_CHANNELS];
129 };
130 struct hdspm_mixer {
131 	struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS];
132 };
133 struct hdspm_mixer_ioctl {
134 	struct hdspm_mixer *mixer;
135 };
136 #define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl)
137 typedef struct hdspm_peak_rms hdspm_peak_rms_t;
138 typedef struct hdspm_config_info hdspm_config_info_t;
139 typedef struct hdspm_version hdspm_version_t;
140 typedef struct hdspm_channelfader snd_hdspm_channelfader_t;
141 typedef struct hdspm_mixer hdspm_mixer_t;
142 #endif
143