Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
hdspm.h
Go to the documentation of this file.
1 #ifndef __SOUND_HDSPM_H
2 #define __SOUND_HDSPM_H
3 /*
4  * Copyright (C) 2003 Winfried Ritsch (IEM)
5  * based on hdsp.h from Thomas Charbonnel ([email protected])
6  *
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  */
22 
23 /* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */
24 #define HDSPM_MAX_CHANNELS 64
25 
29  AIO,
32 };
33 
35  ss,
36  ds,
38 };
39 
40 /* -------------------- IOCTL Peak/RMS Meters -------------------- */
41 
46 
50 
51  uint8_t speed; /* enum {ss, ds, qs} */
52  int status2;
53 };
54 
55 #define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS \
56  _IOR('H', 0x42, struct hdspm_peak_rms)
57 
58 /* ------------ CONFIG block IOCTL ---------------------- */
59 
60 struct hdspm_config {
61  unsigned char pref_sync_ref;
62  unsigned char wordclock_sync_check;
63  unsigned char madi_sync_check;
64  unsigned int system_sample_rate;
65  unsigned int autosync_sample_rate;
66  unsigned char system_clock_mode;
67  unsigned char clock_source;
68  unsigned char autosync_ref;
69  unsigned char line_out;
70  unsigned int passthru;
71  unsigned int analog_out;
72 };
73 
74 #define SNDRV_HDSPM_IOCTL_GET_CONFIG \
75  _IOR('H', 0x41, struct hdspm_config)
76 
92 };
93 
98 };
99 
104 };
105 
106 struct hdspm_ltc {
107  unsigned int ltc;
108 
112 };
113 
114 #define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_mixer_ioctl)
115 
126 };
127 
131 };
132 
136 };
137 
141 };
142 
149 };
150 
151 struct hdspm_status {
152  uint8_t card_type; /* enum hdspm_io_type */
154 
157 
158  union {
159  struct {
160  uint8_t sync_wc; /* enum hdspm_sync */
161  uint8_t sync_madi; /* enum hdspm_sync */
162  uint8_t sync_tco; /* enum hdspm_sync */
163  uint8_t sync_in; /* enum hdspm_sync */
164  uint8_t madi_input; /* enum hdspm_madi_input */
165  uint8_t channel_format; /* enum hdspm_madi_channel_format */
166  uint8_t frame_format; /* enum hdspm_madi_frame_format */
167  } madi;
168  } card_specific;
169 };
170 
171 #define SNDRV_HDSPM_IOCTL_GET_STATUS \
172  _IOR('H', 0x47, struct hdspm_status)
173 
178 #define HDSPM_ADDON_TCO 1
179 
181  uint8_t card_type; /* enum hdspm_io_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 /* ------------- get Matrix Mixer IOCTL --------------- */
191 
192 /* MADI mixer: 64inputs+64playback in 64outputs = 8192 => *4Byte =
193  * 32768 Bytes
194  */
195 
196 /* organisation is 64 channelfader in a continuous memory block */
197 /* equivalent to hardware definition, maybe for future feature of mmap of
198  * them
199  */
200 /* each of 64 outputs has 64 infader and 64 outfader:
201  Ins to Outs mixer[out].in[in], Outstreams to Outs mixer[out].pb[pb] */
202 
203 #define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS
204 
206  unsigned int in[HDSPM_MIXER_CHANNELS];
207  unsigned int pb[HDSPM_MIXER_CHANNELS];
208 };
209 
210 struct hdspm_mixer {
212 };
213 
216 };
217 
218 /* use indirect access due to the limit of ioctl bit size */
219 #define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl)
220 
221 /* typedefs for compatibility to user-space */
223 typedef struct hdspm_config_info hdspm_config_info_t;
226 typedef struct hdspm_mixer hdspm_mixer_t;
227 
228 
229 #endif