~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/sound/hdspm.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  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)
  7  */
  8 
  9 #ifdef __linux__
 10 #include <linux/types.h>
 11 #endif
 12 
 13 /* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */
 14 #define HDSPM_MAX_CHANNELS      64
 15 
 16 enum hdspm_io_type {
 17         MADI,
 18         MADIface,
 19         AIO,
 20         AES32,
 21         RayDAT
 22 };
 23 
 24 enum hdspm_speed {
 25         ss,
 26         ds,
 27         qs
 28 };
 29 
 30 /* -------------------- IOCTL Peak/RMS Meters -------------------- */
 31 
 32 struct hdspm_peak_rms {
 33         __u32 input_peaks[64];
 34         __u32 playback_peaks[64];
 35         __u32 output_peaks[64];
 36 
 37         __u64 input_rms[64];
 38         __u64 playback_rms[64];
 39         __u64 output_rms[64];
 40 
 41         __u8 speed; /* enum {ss, ds, qs} */
 42         int status2;
 43 };
 44 
 45 #define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS \
 46         _IOR('H', 0x42, struct hdspm_peak_rms)
 47 
 48 /* ------------ CONFIG block IOCTL ---------------------- */
 49 
 50 struct hdspm_config {
 51         unsigned char pref_sync_ref;
 52         unsigned char wordclock_sync_check;
 53         unsigned char madi_sync_check;
 54         unsigned int system_sample_rate;
 55         unsigned int autosync_sample_rate;
 56         unsigned char system_clock_mode;
 57         unsigned char clock_source;
 58         unsigned char autosync_ref;
 59         unsigned char line_out;
 60         unsigned int passthru;
 61         unsigned int analog_out;
 62 };
 63 
 64 #define SNDRV_HDSPM_IOCTL_GET_CONFIG \
 65         _IOR('H', 0x41, struct hdspm_config)
 66 
 67 /*
 68  * If there's a TCO (TimeCode Option) board installed,
 69  * there are further options and status data available.
 70  * The hdspm_ltc structure contains the current SMPTE
 71  * timecode and some status information and can be
 72  * obtained via SNDRV_HDSPM_IOCTL_GET_LTC or in the
 73  * hdspm_status struct.
 74  */
 75 
 76 enum hdspm_ltc_format {
 77         format_invalid,
 78         fps_24,
 79         fps_25,
 80         fps_2997,
 81         fps_30
 82 };
 83 
 84 enum hdspm_ltc_frame {
 85         frame_invalid,
 86         drop_frame,
 87         full_frame
 88 };
 89 
 90 enum hdspm_ltc_input_format {
 91         ntsc,
 92         pal,
 93         no_video
 94 };
 95 
 96 struct hdspm_ltc {
 97         unsigned int ltc;
 98 
 99         enum hdspm_ltc_format format;
100         enum hdspm_ltc_frame frame;
101         enum hdspm_ltc_input_format input_format;
102 };
103 
104 #define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_ltc)
105 
106 /*
107  * The status data reflects the device's current state
108  * as determined by the card's configuration and
109  * connection status.
110  */
111 
112 enum hdspm_sync {
113         hdspm_sync_no_lock = 0,
114         hdspm_sync_lock = 1,
115         hdspm_sync_sync = 2
116 };
117 
118 enum hdspm_madi_input {
119         hdspm_input_optical = 0,
120         hdspm_input_coax = 1
121 };
122 
123 enum hdspm_madi_channel_format {
124         hdspm_format_ch_64 = 0,
125         hdspm_format_ch_56 = 1
126 };
127 
128 enum hdspm_madi_frame_format {
129         hdspm_frame_48 = 0,
130         hdspm_frame_96 = 1
131 };
132 
133 enum hdspm_syncsource {
134         syncsource_wc = 0,
135         syncsource_madi = 1,
136         syncsource_tco = 2,
137         syncsource_sync = 3,
138         syncsource_none = 4
139 };
140 
141 struct hdspm_status {
142         __u8 card_type; /* enum hdspm_io_type */
143         enum hdspm_syncsource autosync_source;
144 
145         __u64 card_clock;
146         __u32 master_period;
147 
148         union {
149                 struct {
150                         __u8 sync_wc; /* enum hdspm_sync */
151                         __u8 sync_madi; /* enum hdspm_sync */
152                         __u8 sync_tco; /* enum hdspm_sync */
153                         __u8 sync_in; /* enum hdspm_sync */
154                         __u8 madi_input; /* enum hdspm_madi_input */
155                         __u8 channel_format; /* enum hdspm_madi_channel_format */
156                         __u8 frame_format; /* enum hdspm_madi_frame_format */
157                 } madi;
158         } card_specific;
159 };
160 
161 #define SNDRV_HDSPM_IOCTL_GET_STATUS \
162         _IOR('H', 0x47, struct hdspm_status)
163 
164 /*
165  * Get information about the card and its add-ons.
166  */
167 
168 #define HDSPM_ADDON_TCO 1
169 
170 struct hdspm_version {
171         __u8 card_type; /* enum hdspm_io_type */
172         char cardname[20];
173         unsigned int serial;
174         unsigned short firmware_rev;
175         int addons;
176 };
177 
178 #define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x48, struct hdspm_version)
179 
180 /* ------------- get Matrix Mixer IOCTL --------------- */
181 
182 /* MADI mixer: 64inputs+64playback in 64outputs = 8192 => *4Byte =
183  * 32768 Bytes
184  */
185 
186 /* organisation is 64 channelfader in a continuous memory block */
187 /* equivalent to hardware definition, maybe for future feature of mmap of
188  * them
189  */
190 /* each of 64 outputs has 64 infader and 64 outfader:
191    Ins to Outs mixer[out].in[in], Outstreams to Outs mixer[out].pb[pb] */
192 
193 #define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS
194 
195 struct hdspm_channelfader {
196         unsigned int in[HDSPM_MIXER_CHANNELS];
197         unsigned int pb[HDSPM_MIXER_CHANNELS];
198 };
199 
200 struct hdspm_mixer {
201         struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS];
202 };
203 
204 struct hdspm_mixer_ioctl {
205         struct hdspm_mixer *mixer;
206 };
207 
208 /* use indirect access due to the limit of ioctl bit size */
209 #define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl)
210 
211 #endif
212 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php