patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / include / sound / hdsp.h
1 #ifndef __SOUND_HDSP_H
2 #define __SOUND_HDSP_H
3
4 /*
5  *   Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
6  *    
7  *   This program is free software; you can redistribute it and/or modify
8  *   it under the terms of the GNU General Public License as published by
9  *   the Free Software Foundation; either version 2 of the License, or
10  *   (at your option) any later version.
11  *
12  *   This program is distributed in the hope that it will be useful,
13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *   GNU General Public License for more details.
16  *
17  *   You should have received a copy of the GNU General Public License
18  *   along with this program; if not, write to the Free Software
19  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20  */
21
22 #define HDSP_MATRIX_MIXER_SIZE 2048
23
24 typedef enum {
25         Digiface,
26         Multiface,
27         H9652,
28         H9632,
29         Undefined,
30 } HDSP_IO_Type;
31
32 typedef struct _snd_hdsp_peak_rms hdsp_peak_rms_t;
33
34 struct _snd_hdsp_peak_rms {
35         unsigned int input_peaks[26];
36         unsigned int playback_peaks[26];
37         unsigned int output_peaks[28];
38         unsigned long long input_rms[26];
39         unsigned long long playback_rms[26];
40         /* These are only used for H96xx cards */
41         unsigned long long output_rms[26];
42 };
43
44 #define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, hdsp_peak_rms_t)
45
46 typedef struct _snd_hdsp_config_info hdsp_config_info_t;
47
48 struct _snd_hdsp_config_info {
49         unsigned char pref_sync_ref;
50         unsigned char wordclock_sync_check;
51         unsigned char spdif_sync_check;
52         unsigned char adatsync_sync_check;
53         unsigned char adat_sync_check[3];
54         unsigned char spdif_in;
55         unsigned char spdif_out;
56         unsigned char spdif_professional;
57         unsigned char spdif_emphasis;
58         unsigned char spdif_nonaudio;
59         unsigned int spdif_sample_rate;
60         unsigned int system_sample_rate;
61         unsigned int autosync_sample_rate;
62         unsigned char system_clock_mode;
63         unsigned char clock_source;
64         unsigned char autosync_ref;
65         unsigned char line_out;
66         unsigned char passthru; 
67         unsigned char da_gain;
68         unsigned char ad_gain;
69         unsigned char phone_gain;
70         unsigned char xlr_breakout_cable;
71         unsigned char analog_extension_board;
72 };
73
74 #define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, hdsp_config_info_t)
75
76 typedef struct _snd_hdsp_firmware hdsp_firmware_t;
77
78 struct _snd_hdsp_firmware {
79         unsigned long __user *firmware_data;    /* 24413 long words */
80 };
81
82 #define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, hdsp_firmware_t)
83
84 typedef struct _snd_hdsp_version hdsp_version_t;
85
86 struct _snd_hdsp_version {
87         HDSP_IO_Type io_type;
88         unsigned short firmware_rev;
89 };
90
91 #define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, hdsp_version_t)
92
93 typedef struct _snd_hdsp_mixer hdsp_mixer_t;
94
95 struct _snd_hdsp_mixer {
96         unsigned short matrix[HDSP_MATRIX_MIXER_SIZE];
97 };
98
99 #define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, hdsp_mixer_t)
100
101 typedef struct _snd_hdsp_9632_aeb hdsp_9632_aeb_t;
102
103 struct _snd_hdsp_9632_aeb {
104         int aebi;
105         int aebo;
106 };
107
108 #define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, hdsp_9632_aeb_t)
109
110 #endif /* __SOUND_HDSP_H */