aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-06-03 05:25:34 -0400
committerJaroslav Kysela <perex@suse.cz>2005-06-22 06:28:11 -0400
commit763f356cd8de9e158836d236b3fd9dd149d696f9 (patch)
tree530fdcc8603ed001d12b157e9972b5c089237c0c /include/sound
parent375389288ae55754bd7d009a30f2bb0453a5b369 (diff)
[ALSA] Add HDSP MADI driver
HDSPM driver,PCI drivers,RME9652 driver Added RME Hammerfall DSP MADI driver by Winfried Ritsch. (Moved from alsa-driver tree to mainline.) Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/hdspm.h131
1 files changed, 131 insertions, 0 deletions
diff --git a/include/sound/hdspm.h b/include/sound/hdspm.h
new file mode 100644
index 000000000000..c34427ccd0b3
--- /dev/null
+++ b/include/sound/hdspm.h
@@ -0,0 +1,131 @@
1#ifndef __SOUND_HDSPM_H /* -*- linux-c -*- */
2#define __SOUND_HDSPM_H
3/*
4 * Copyright (C) 2003 Winfried Ritsch (IEM)
5 * based on hdsp.h from Thomas Charbonnel (thomas@undata.org)
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
26/* -------------------- IOCTL Peak/RMS Meters -------------------- */
27
28typedef struct _snd_hdspm_peak_rms hdspm_peak_rms_t;
29
30/* peam rms level structure like we get from hardware
31
32 maybe in future we can memory map it so I just copy it
33 to user on ioctl call now an dont change anything
34 rms are made out of low and high values
35 where (long) ????_rms = (????_rms_l >> 8) + ((????_rms_h & 0xFFFFFF00)<<24)
36 (i asume so from the code)
37*/
38
39struct _snd_hdspm_peak_rms {
40
41 unsigned int level_offset[1024];
42
43 unsigned int input_peak[64];
44 unsigned int playback_peak[64];
45 unsigned int output_peak[64];
46 unsigned int xxx_peak[64]; /* not used */
47
48 unsigned int reserved[256]; /* not used */
49
50 unsigned int input_rms_l[64];
51 unsigned int playback_rms_l[64];
52 unsigned int output_rms_l[64];
53 unsigned int xxx_rms_l[64]; /* not used */
54
55 unsigned int input_rms_h[64];
56 unsigned int playback_rms_h[64];
57 unsigned int output_rms_h[64];
58 unsigned int xxx_rms_h[64]; /* not used */
59};
60
61struct sndrv_hdspm_peak_rms_ioctl {
62 hdspm_peak_rms_t *peak;
63};
64
65/* use indirect access due to the limit of ioctl bit size */
66#define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct sndrv_hdspm_peak_rms_ioctl)
67
68/* ------------ CONFIG block IOCTL ---------------------- */
69
70typedef struct _snd_hdspm_config_info hdspm_config_info_t;
71
72struct _snd_hdspm_config_info {
73 unsigned char pref_sync_ref;
74 unsigned char wordclock_sync_check;
75 unsigned char madi_sync_check;
76 unsigned int system_sample_rate;
77 unsigned int autosync_sample_rate;
78 unsigned char system_clock_mode;
79 unsigned char clock_source;
80 unsigned char autosync_ref;
81 unsigned char line_out;
82 unsigned int passthru;
83 unsigned int analog_out;
84};
85
86#define SNDRV_HDSPM_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, hdspm_config_info_t)
87
88
89/* get Soundcard Version */
90
91typedef struct _snd_hdspm_version hdspm_version_t;
92
93struct _snd_hdspm_version {
94 unsigned short firmware_rev;
95};
96
97#define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x43, hdspm_version_t)
98
99
100/* ------------- get Matrix Mixer IOCTL --------------- */
101
102/* MADI mixer: 64inputs+64playback in 64outputs = 8192 => *4Byte = 32768 Bytes */
103
104/* organisation is 64 channelfader in a continous memory block */
105/* equivalent to hardware definition, maybe for future feature of mmap of them */
106/* each of 64 outputs has 64 infader and 64 outfader:
107 Ins to Outs mixer[out].in[in], Outstreams to Outs mixer[out].pb[pb] */
108
109#define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS
110
111typedef struct _snd_hdspm_channelfader snd_hdspm_channelfader_t;
112
113struct _snd_hdspm_channelfader {
114 unsigned int in[HDSPM_MIXER_CHANNELS];
115 unsigned int pb[HDSPM_MIXER_CHANNELS];
116};
117
118typedef struct _snd_hdspm_mixer hdspm_mixer_t;
119
120struct _snd_hdspm_mixer {
121 snd_hdspm_channelfader_t ch[HDSPM_MIXER_CHANNELS];
122};
123
124struct sndrv_hdspm_mixer_ioctl {
125 hdspm_mixer_t *mixer;
126};
127
128/* use indirect access due to the limit of ioctl bit size */
129#define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct sndrv_hdspm_mixer_ioctl)
130
131#endif /* __SOUND_HDSPM_H */