fed up with those stupid warnings
[mmotm.git] / sound / pci / ice1712 / delta.h
blobf7f14df81f26e301089b77bcf26825872d8045c5
1 #ifndef __SOUND_DELTA_H
2 #define __SOUND_DELTA_H
4 /*
5 * ALSA driver for ICEnsemble ICE1712 (Envy24)
7 * Lowlevel functions for M-Audio Delta 1010, 44, 66, Dio2496, Audiophile
8 * Digigram VX442
10 * Copyright (c) 2000 Jaroslav Kysela <perex@perex.cz>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 */
28 #define DELTA_DEVICE_DESC \
29 "{MidiMan M Audio,Delta 1010},"\
30 "{MidiMan M Audio,Delta 1010LT},"\
31 "{MidiMan M Audio,Delta DiO 2496},"\
32 "{MidiMan M Audio,Delta 66},"\
33 "{MidiMan M Audio,Delta 44},"\
34 "{MidiMan M Audio,Delta 410},"\
35 "{MidiMan M Audio,Audiophile 24/96},"\
36 "{Digigram,VX442},"\
37 "{Lionstracs,Mediastation},"
39 #define ICE1712_SUBDEVICE_DELTA1010 0x121430d6
40 #define ICE1712_SUBDEVICE_DELTA1010E 0xff1430d6
41 #define ICE1712_SUBDEVICE_DELTADIO2496 0x121431d6
42 #define ICE1712_SUBDEVICE_DELTA66 0x121432d6
43 #define ICE1712_SUBDEVICE_DELTA66E 0xff1432d6
44 #define ICE1712_SUBDEVICE_DELTA44 0x121433d6
45 #define ICE1712_SUBDEVICE_AUDIOPHILE 0x121434d6
46 #define ICE1712_SUBDEVICE_DELTA410 0x121438d6
47 #define ICE1712_SUBDEVICE_DELTA1010LT 0x12143bd6
48 #define ICE1712_SUBDEVICE_VX442 0x12143cd6
49 #define ICE1712_SUBDEVICE_MEDIASTATION 0x694c0100
51 /* entry point */
52 extern struct snd_ice1712_card_info snd_ice1712_delta_cards[];
56 * MidiMan M-Audio Delta GPIO definitions
59 /* MidiMan M-Audio Delta shared pins */
60 #define ICE1712_DELTA_DFS 0x01 /* fast/slow sample rate mode */
61 /* (>48kHz must be 1) */
62 #define ICE1712_DELTA_SPDIF_IN_STAT 0x02
63 /* S/PDIF input status */
64 /* 0 = valid signal is present */
65 /* all except Delta44 */
66 /* look to CS8414 datasheet */
67 #define ICE1712_DELTA_SPDIF_OUT_STAT_CLOCK 0x04
68 /* S/PDIF output status clock */
69 /* (writing on rising edge - 0->1) */
70 /* all except Delta44 */
71 /* look to CS8404A datasheet */
72 #define ICE1712_DELTA_SPDIF_OUT_STAT_DATA 0x08
73 /* S/PDIF output status data */
74 /* all except Delta44 */
75 /* look to CS8404A datasheet */
76 /* MidiMan M-Audio DeltaDiO */
77 /* 0x01 = DFS */
78 /* 0x02 = SPDIF_IN_STAT */
79 /* 0x04 = SPDIF_OUT_STAT_CLOCK */
80 /* 0x08 = SPDIF_OUT_STAT_DATA */
81 #define ICE1712_DELTA_SPDIF_INPUT_SELECT 0x10
82 /* coaxial (0), optical (1) */
83 /* S/PDIF input select*/
85 /* MidiMan M-Audio Delta1010 */
86 /* 0x01 = DFS */
87 /* 0x02 = SPDIF_IN_STAT */
88 /* 0x04 = SPDIF_OUT_STAT_CLOCK */
89 /* 0x08 = SPDIF_OUT_STAT_DATA */
90 #define ICE1712_DELTA_WORD_CLOCK_SELECT 0x10
91 /* 1 - clock are taken from S/PDIF input */
92 /* 0 - clock are taken from Word Clock input */
93 /* affected SPMCLKIN pin of Envy24 */
94 #define ICE1712_DELTA_WORD_CLOCK_STATUS 0x20
95 /* 0 = valid word clock signal is present */
97 /* MidiMan M-Audio Delta66 */
98 /* 0x01 = DFS */
99 /* 0x02 = SPDIF_IN_STAT */
100 /* 0x04 = SPDIF_OUT_STAT_CLOCK */
101 /* 0x08 = SPDIF_OUT_STAT_DATA */
102 #define ICE1712_DELTA_CODEC_SERIAL_DATA 0x10
103 /* AKM4524 serial data */
104 #define ICE1712_DELTA_CODEC_SERIAL_CLOCK 0x20
105 /* AKM4524 serial clock */
106 /* (writing on rising edge - 0->1 */
107 #define ICE1712_DELTA_CODEC_CHIP_A 0x40
108 #define ICE1712_DELTA_CODEC_CHIP_B 0x80
109 /* 1 - select chip A or B */
111 /* MidiMan M-Audio Delta44 */
112 /* 0x01 = DFS */
113 /* 0x10 = CODEC_SERIAL_DATA */
114 /* 0x20 = CODEC_SERIAL_CLOCK */
115 /* 0x40 = CODEC_CHIP_A */
116 /* 0x80 = CODEC_CHIP_B */
118 /* MidiMan M-Audio Audiophile/Delta410 definitions */
119 /* thanks to Kristof Pelckmans <Kristof.Pelckmans@antwerpen.be> for Delta410 info */
120 /* 0x01 = DFS */
121 #define ICE1712_DELTA_AP_CCLK 0x02 /* SPI clock */
122 /* (clocking on rising edge - 0->1) */
123 #define ICE1712_DELTA_AP_DIN 0x04 /* data input */
124 #define ICE1712_DELTA_AP_DOUT 0x08 /* data output */
125 #define ICE1712_DELTA_AP_CS_DIGITAL 0x10 /* CS8427 chip select */
126 /* low signal = select */
127 #define ICE1712_DELTA_AP_CS_CODEC 0x20 /* AK4528 (audiophile), AK4529 (Delta410) chip select */
128 /* low signal = select */
130 /* MidiMan M-Audio Delta1010LT definitions */
131 /* thanks to Anders Johansson <ajh@watri.uwa.edu.au> */
132 /* 0x01 = DFS */
133 #define ICE1712_DELTA_1010LT_CCLK 0x02 /* SPI clock (AK4524 + CS8427) */
134 #define ICE1712_DELTA_1010LT_DIN 0x04 /* data input (CS8427) */
135 #define ICE1712_DELTA_1010LT_DOUT 0x08 /* data output (AK4524 + CS8427) */
136 #define ICE1712_DELTA_1010LT_CS 0x70 /* mask for CS address */
137 #define ICE1712_DELTA_1010LT_CS_CHIP_A 0x00 /* AK4524 #0 */
138 #define ICE1712_DELTA_1010LT_CS_CHIP_B 0x10 /* AK4524 #1 */
139 #define ICE1712_DELTA_1010LT_CS_CHIP_C 0x20 /* AK4524 #2 */
140 #define ICE1712_DELTA_1010LT_CS_CHIP_D 0x30 /* AK4524 #3 */
141 #define ICE1712_DELTA_1010LT_CS_CS8427 0x40 /* CS8427 */
142 #define ICE1712_DELTA_1010LT_CS_NONE 0x50 /* nothing */
143 #define ICE1712_DELTA_1010LT_WORDCLOCK 0x80 /* sample clock source: 0 = Word Clock Input, 1 = S/PDIF Input ??? */
145 /* Digigram VX442 definitions */
146 #define ICE1712_VX442_CCLK 0x02 /* SPI clock */
147 #define ICE1712_VX442_DIN 0x04 /* data input */
148 #define ICE1712_VX442_DOUT 0x08 /* data output */
149 #define ICE1712_VX442_CS_DIGITAL 0x10 /* chip select, low = CS8427 */
150 #define ICE1712_VX442_CODEC_CHIP_A 0x20 /* select chip A */
151 #define ICE1712_VX442_CODEC_CHIP_B 0x40 /* select chip B */
153 #endif /* __SOUND_DELTA_H */