mm: make wait_on_page_writeback() wait for multiple pending writebacks
[linux/fpc-iii.git] / include / uapi / sound / hdspm.h
blob14af3d00ea3f78c4f03f9682045ba2f3d367c4e8
1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2 #ifndef __SOUND_HDSPM_H
3 #define __SOUND_HDSPM_H
4 /*
5 * Copyright (C) 2003 Winfried Ritsch (IEM)
6 * based on hdsp.h from Thomas Charbonnel (thomas@undata.org)
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifdef __linux__
25 #include <linux/types.h>
26 #endif
28 /* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */
29 #define HDSPM_MAX_CHANNELS 64
31 enum hdspm_io_type {
32 MADI,
33 MADIface,
34 AIO,
35 AES32,
36 RayDAT
39 enum hdspm_speed {
40 ss,
41 ds,
45 /* -------------------- IOCTL Peak/RMS Meters -------------------- */
47 struct hdspm_peak_rms {
48 __u32 input_peaks[64];
49 __u32 playback_peaks[64];
50 __u32 output_peaks[64];
52 __u64 input_rms[64];
53 __u64 playback_rms[64];
54 __u64 output_rms[64];
56 __u8 speed; /* enum {ss, ds, qs} */
57 int status2;
60 #define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS \
61 _IOR('H', 0x42, struct hdspm_peak_rms)
63 /* ------------ CONFIG block IOCTL ---------------------- */
65 struct hdspm_config {
66 unsigned char pref_sync_ref;
67 unsigned char wordclock_sync_check;
68 unsigned char madi_sync_check;
69 unsigned int system_sample_rate;
70 unsigned int autosync_sample_rate;
71 unsigned char system_clock_mode;
72 unsigned char clock_source;
73 unsigned char autosync_ref;
74 unsigned char line_out;
75 unsigned int passthru;
76 unsigned int analog_out;
79 #define SNDRV_HDSPM_IOCTL_GET_CONFIG \
80 _IOR('H', 0x41, struct hdspm_config)
83 * If there's a TCO (TimeCode Option) board installed,
84 * there are further options and status data available.
85 * The hdspm_ltc structure contains the current SMPTE
86 * timecode and some status information and can be
87 * obtained via SNDRV_HDSPM_IOCTL_GET_LTC or in the
88 * hdspm_status struct.
91 enum hdspm_ltc_format {
92 format_invalid,
93 fps_24,
94 fps_25,
95 fps_2997,
96 fps_30
99 enum hdspm_ltc_frame {
100 frame_invalid,
101 drop_frame,
102 full_frame
105 enum hdspm_ltc_input_format {
106 ntsc,
107 pal,
108 no_video
111 struct hdspm_ltc {
112 unsigned int ltc;
114 enum hdspm_ltc_format format;
115 enum hdspm_ltc_frame frame;
116 enum hdspm_ltc_input_format input_format;
119 #define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_ltc)
122 * The status data reflects the device's current state
123 * as determined by the card's configuration and
124 * connection status.
127 enum hdspm_sync {
128 hdspm_sync_no_lock = 0,
129 hdspm_sync_lock = 1,
130 hdspm_sync_sync = 2
133 enum hdspm_madi_input {
134 hdspm_input_optical = 0,
135 hdspm_input_coax = 1
138 enum hdspm_madi_channel_format {
139 hdspm_format_ch_64 = 0,
140 hdspm_format_ch_56 = 1
143 enum hdspm_madi_frame_format {
144 hdspm_frame_48 = 0,
145 hdspm_frame_96 = 1
148 enum hdspm_syncsource {
149 syncsource_wc = 0,
150 syncsource_madi = 1,
151 syncsource_tco = 2,
152 syncsource_sync = 3,
153 syncsource_none = 4
156 struct hdspm_status {
157 __u8 card_type; /* enum hdspm_io_type */
158 enum hdspm_syncsource autosync_source;
160 __u64 card_clock;
161 __u32 master_period;
163 union {
164 struct {
165 __u8 sync_wc; /* enum hdspm_sync */
166 __u8 sync_madi; /* enum hdspm_sync */
167 __u8 sync_tco; /* enum hdspm_sync */
168 __u8 sync_in; /* enum hdspm_sync */
169 __u8 madi_input; /* enum hdspm_madi_input */
170 __u8 channel_format; /* enum hdspm_madi_channel_format */
171 __u8 frame_format; /* enum hdspm_madi_frame_format */
172 } madi;
173 } card_specific;
176 #define SNDRV_HDSPM_IOCTL_GET_STATUS \
177 _IOR('H', 0x47, struct hdspm_status)
180 * Get information about the card and its add-ons.
183 #define HDSPM_ADDON_TCO 1
185 struct hdspm_version {
186 __u8 card_type; /* enum hdspm_io_type */
187 char cardname[20];
188 unsigned int serial;
189 unsigned short firmware_rev;
190 int addons;
193 #define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x48, struct hdspm_version)
195 /* ------------- get Matrix Mixer IOCTL --------------- */
197 /* MADI mixer: 64inputs+64playback in 64outputs = 8192 => *4Byte =
198 * 32768 Bytes
201 /* organisation is 64 channelfader in a continuous memory block */
202 /* equivalent to hardware definition, maybe for future feature of mmap of
203 * them
205 /* each of 64 outputs has 64 infader and 64 outfader:
206 Ins to Outs mixer[out].in[in], Outstreams to Outs mixer[out].pb[pb] */
208 #define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS
210 struct hdspm_channelfader {
211 unsigned int in[HDSPM_MIXER_CHANNELS];
212 unsigned int pb[HDSPM_MIXER_CHANNELS];
215 struct hdspm_mixer {
216 struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS];
219 struct hdspm_mixer_ioctl {
220 struct hdspm_mixer *mixer;
223 /* use indirect access due to the limit of ioctl bit size */
224 #define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl)
226 #endif