blob: d07c49b4b66f5a87ff9092773a485cbec230b1ff [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef __SOUND_DELTA_H
2#define __SOUND_DELTA_H
3
4/*
5 * ALSA driver for ICEnsemble ICE1712 (Envy24)
6 *
7 * Lowlevel functions for M-Audio Delta 1010, 44, 66, Dio2496, Audiophile
8 * Digigram VX442
9 *
Jaroslav Kyselac1017a42007-10-15 09:50:19 +020010 * Copyright (c) 2000 Jaroslav Kysela <perex@perex.cz>
Linus Torvalds1da177e2005-04-16 15:20:36 -070011 *
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.
16 *
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.
21 *
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
25 *
26 */
27
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,Audiophile 24/96},"\
35 "{Digigram,VX442},"\
36 "{Lionstracs,Mediastation},"
37
38#define ICE1712_SUBDEVICE_DELTA1010 0x121430d6
Jaroslav Kyselaa60567d2008-02-06 15:48:06 +010039#define ICE1712_SUBDEVICE_DELTA1010E 0xff1430d6
Linus Torvalds1da177e2005-04-16 15:20:36 -070040#define ICE1712_SUBDEVICE_DELTADIO2496 0x121431d6
41#define ICE1712_SUBDEVICE_DELTA66 0x121432d6
42#define ICE1712_SUBDEVICE_DELTA44 0x121433d6
43#define ICE1712_SUBDEVICE_AUDIOPHILE 0x121434d6
44#define ICE1712_SUBDEVICE_DELTA410 0x121438d6
45#define ICE1712_SUBDEVICE_DELTA1010LT 0x12143bd6
46#define ICE1712_SUBDEVICE_VX442 0x12143cd6
47#define ICE1712_SUBDEVICE_MEDIASTATION 0x694c0100
48
49/* entry point */
Ralf Baechlebf748ed2007-03-13 15:31:08 +010050extern struct snd_ice1712_card_info snd_ice1712_delta_cards[];
Linus Torvalds1da177e2005-04-16 15:20:36 -070051
52
53/*
54 * MidiMan M-Audio Delta GPIO definitions
55 */
56
57/* MidiMan M-Audio Delta shared pins */
58#define ICE1712_DELTA_DFS 0x01 /* fast/slow sample rate mode */
59 /* (>48kHz must be 1) */
60#define ICE1712_DELTA_SPDIF_IN_STAT 0x02
61 /* S/PDIF input status */
62 /* 0 = valid signal is present */
63 /* all except Delta44 */
64 /* look to CS8414 datasheet */
65#define ICE1712_DELTA_SPDIF_OUT_STAT_CLOCK 0x04
66 /* S/PDIF output status clock */
Robert P. J. Daybeb7dd82007-05-09 07:14:03 +020067 /* (writing on rising edge - 0->1) */
Linus Torvalds1da177e2005-04-16 15:20:36 -070068 /* all except Delta44 */
69 /* look to CS8404A datasheet */
70#define ICE1712_DELTA_SPDIF_OUT_STAT_DATA 0x08
71 /* S/PDIF output status data */
72 /* all except Delta44 */
73 /* look to CS8404A datasheet */
74/* MidiMan M-Audio DeltaDiO */
75/* 0x01 = DFS */
76/* 0x02 = SPDIF_IN_STAT */
77/* 0x04 = SPDIF_OUT_STAT_CLOCK */
78/* 0x08 = SPDIF_OUT_STAT_DATA */
79#define ICE1712_DELTA_SPDIF_INPUT_SELECT 0x10
80 /* coaxial (0), optical (1) */
81 /* S/PDIF input select*/
82
83/* MidiMan M-Audio Delta1010 */
84/* 0x01 = DFS */
85/* 0x02 = SPDIF_IN_STAT */
86/* 0x04 = SPDIF_OUT_STAT_CLOCK */
87/* 0x08 = SPDIF_OUT_STAT_DATA */
88#define ICE1712_DELTA_WORD_CLOCK_SELECT 0x10
89 /* 1 - clock are taken from S/PDIF input */
90 /* 0 - clock are taken from Word Clock input */
91 /* affected SPMCLKIN pin of Envy24 */
92#define ICE1712_DELTA_WORD_CLOCK_STATUS 0x20
93 /* 0 = valid word clock signal is present */
94
95/* MidiMan M-Audio Delta66 */
96/* 0x01 = DFS */
97/* 0x02 = SPDIF_IN_STAT */
98/* 0x04 = SPDIF_OUT_STAT_CLOCK */
99/* 0x08 = SPDIF_OUT_STAT_DATA */
100#define ICE1712_DELTA_CODEC_SERIAL_DATA 0x10
101 /* AKM4524 serial data */
102#define ICE1712_DELTA_CODEC_SERIAL_CLOCK 0x20
103 /* AKM4524 serial clock */
Robert P. J. Daybeb7dd82007-05-09 07:14:03 +0200104 /* (writing on rising edge - 0->1 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105#define ICE1712_DELTA_CODEC_CHIP_A 0x40
106#define ICE1712_DELTA_CODEC_CHIP_B 0x80
107 /* 1 - select chip A or B */
108
109/* MidiMan M-Audio Delta44 */
110/* 0x01 = DFS */
111/* 0x10 = CODEC_SERIAL_DATA */
112/* 0x20 = CODEC_SERIAL_CLOCK */
113/* 0x40 = CODEC_CHIP_A */
114/* 0x80 = CODEC_CHIP_B */
115
116/* MidiMan M-Audio Audiophile/Delta410 definitions */
117/* thanks to Kristof Pelckmans <Kristof.Pelckmans@antwerpen.be> for Delta410 info */
118/* 0x01 = DFS */
119#define ICE1712_DELTA_AP_CCLK 0x02 /* SPI clock */
120 /* (clocking on rising edge - 0->1) */
121#define ICE1712_DELTA_AP_DIN 0x04 /* data input */
122#define ICE1712_DELTA_AP_DOUT 0x08 /* data output */
123#define ICE1712_DELTA_AP_CS_DIGITAL 0x10 /* CS8427 chip select */
124 /* low signal = select */
125#define ICE1712_DELTA_AP_CS_CODEC 0x20 /* AK4528 (audiophile), AK4529 (Delta410) chip select */
126 /* low signal = select */
127
128/* MidiMan M-Audio Delta1010LT definitions */
129/* thanks to Anders Johansson <ajh@watri.uwa.edu.au> */
130/* 0x01 = DFS */
131#define ICE1712_DELTA_1010LT_CCLK 0x02 /* SPI clock (AK4524 + CS8427) */
132#define ICE1712_DELTA_1010LT_DIN 0x04 /* data input (CS8427) */
133#define ICE1712_DELTA_1010LT_DOUT 0x08 /* data output (AK4524 + CS8427) */
134#define ICE1712_DELTA_1010LT_CS 0x70 /* mask for CS address */
135#define ICE1712_DELTA_1010LT_CS_CHIP_A 0x00 /* AK4524 #0 */
136#define ICE1712_DELTA_1010LT_CS_CHIP_B 0x10 /* AK4524 #1 */
137#define ICE1712_DELTA_1010LT_CS_CHIP_C 0x20 /* AK4524 #2 */
138#define ICE1712_DELTA_1010LT_CS_CHIP_D 0x30 /* AK4524 #3 */
139#define ICE1712_DELTA_1010LT_CS_CS8427 0x40 /* CS8427 */
140#define ICE1712_DELTA_1010LT_CS_NONE 0x50 /* nothing */
141#define ICE1712_DELTA_1010LT_WORDCLOCK 0x80 /* sample clock source: 0 = Word Clock Input, 1 = S/PDIF Input ??? */
142
143/* Digigram VX442 definitions */
144#define ICE1712_VX442_CCLK 0x02 /* SPI clock */
145#define ICE1712_VX442_DIN 0x04 /* data input */
146#define ICE1712_VX442_DOUT 0x08 /* data output */
147#define ICE1712_VX442_CS_DIGITAL 0x10 /* chip select, low = CS8427 */
148#define ICE1712_VX442_CODEC_CHIP_A 0x20 /* select chip A */
149#define ICE1712_VX442_CODEC_CHIP_B 0x40 /* select chip B */
150
151#endif /* __SOUND_DELTA_H */