#ifndef __SOUND_DELTA_H1#define __SOUND_DELTA_H23/*4* ALSA driver for ICEnsemble ICE1712 (Envy24)5*6* Lowlevel functions for M-Audio Delta 1010, 44, 66, Dio2496, Audiophile7* Digigram VX4428*9* Copyright (c) 2000 Jaroslav Kysela <[email protected]>10*11* This program is free software; you can redistribute it and/or modify12* it under the terms of the GNU General Public License as published by13* the Free Software Foundation; either version 2 of the License, or14* (at your option) any later version.15*16* This program is distributed in the hope that it will be useful,17* but WITHOUT ANY WARRANTY; without even the implied warranty of18* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the19* GNU General Public License for more details.20*21* You should have received a copy of the GNU General Public License22* along with this program; if not, write to the Free Software23* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA24*25*/2627#define DELTA_DEVICE_DESC \28"{MidiMan M Audio,Delta 1010},"\29"{MidiMan M Audio,Delta 1010LT},"\30"{MidiMan M Audio,Delta DiO 2496},"\31"{MidiMan M Audio,Delta 66},"\32"{MidiMan M Audio,Delta 44},"\33"{MidiMan M Audio,Delta 410},"\34"{MidiMan M Audio,Audiophile 24/96},"\35"{Digigram,VX442},"\36"{Lionstracs,Mediastation},"\37"{Edirol,DA2496},"3839#define ICE1712_SUBDEVICE_DELTA1010 0x121430d640#define ICE1712_SUBDEVICE_DELTA1010E 0xff1430d641#define ICE1712_SUBDEVICE_DELTADIO2496 0x121431d642#define ICE1712_SUBDEVICE_DELTA66 0x121432d643#define ICE1712_SUBDEVICE_DELTA66E 0xff1432d644#define ICE1712_SUBDEVICE_DELTA44 0x121433d645#define ICE1712_SUBDEVICE_AUDIOPHILE 0x121434d646#define ICE1712_SUBDEVICE_DELTA410 0x121438d647#define ICE1712_SUBDEVICE_DELTA1010LT 0x12143bd648#define ICE1712_SUBDEVICE_VX442 0x12143cd649#define ICE1712_SUBDEVICE_MEDIASTATION 0x694c010050#define ICE1712_SUBDEVICE_EDIROLDA2496 0xce1640105152/* entry point */53extern struct snd_ice1712_card_info snd_ice1712_delta_cards[];545556/*57* MidiMan M-Audio Delta GPIO definitions58*/5960/* MidiMan M-Audio Delta shared pins */61#define ICE1712_DELTA_DFS 0x01 /* fast/slow sample rate mode */62/* (>48kHz must be 1) */63#define ICE1712_DELTA_SPDIF_IN_STAT 0x0264/* S/PDIF input status */65/* 0 = valid signal is present */66/* all except Delta44 */67/* look to CS8414 datasheet */68#define ICE1712_DELTA_SPDIF_OUT_STAT_CLOCK 0x0469/* S/PDIF output status clock */70/* (writing on rising edge - 0->1) */71/* all except Delta44 */72/* look to CS8404A datasheet */73#define ICE1712_DELTA_SPDIF_OUT_STAT_DATA 0x0874/* S/PDIF output status data */75/* all except Delta44 */76/* look to CS8404A datasheet */77/* MidiMan M-Audio DeltaDiO */78/* 0x01 = DFS */79/* 0x02 = SPDIF_IN_STAT */80/* 0x04 = SPDIF_OUT_STAT_CLOCK */81/* 0x08 = SPDIF_OUT_STAT_DATA */82#define ICE1712_DELTA_SPDIF_INPUT_SELECT 0x1083/* coaxial (0), optical (1) */84/* S/PDIF input select*/8586/* MidiMan M-Audio Delta1010 */87/* 0x01 = DFS */88/* 0x02 = SPDIF_IN_STAT */89/* 0x04 = SPDIF_OUT_STAT_CLOCK */90/* 0x08 = SPDIF_OUT_STAT_DATA */91#define ICE1712_DELTA_WORD_CLOCK_SELECT 0x1092/* 1 - clock are taken from S/PDIF input */93/* 0 - clock are taken from Word Clock input */94/* affected SPMCLKIN pin of Envy24 */95#define ICE1712_DELTA_WORD_CLOCK_STATUS 0x2096/* 0 = valid word clock signal is present */9798/* MidiMan M-Audio Delta66 */99/* 0x01 = DFS */100/* 0x02 = SPDIF_IN_STAT */101/* 0x04 = SPDIF_OUT_STAT_CLOCK */102/* 0x08 = SPDIF_OUT_STAT_DATA */103#define ICE1712_DELTA_CODEC_SERIAL_DATA 0x10104/* AKM4524 serial data */105#define ICE1712_DELTA_CODEC_SERIAL_CLOCK 0x20106/* AKM4524 serial clock */107/* (writing on rising edge - 0->1 */108#define ICE1712_DELTA_CODEC_CHIP_A 0x40109#define ICE1712_DELTA_CODEC_CHIP_B 0x80110/* 1 - select chip A or B */111112/* MidiMan M-Audio Delta44 */113/* 0x01 = DFS */114/* 0x10 = CODEC_SERIAL_DATA */115/* 0x20 = CODEC_SERIAL_CLOCK */116/* 0x40 = CODEC_CHIP_A */117/* 0x80 = CODEC_CHIP_B */118119/* MidiMan M-Audio Audiophile/Delta410 definitions */120/* thanks to Kristof Pelckmans <[email protected]> for Delta410 info */121/* 0x01 = DFS */122#define ICE1712_DELTA_AP_CCLK 0x02 /* SPI clock */123/* (clocking on rising edge - 0->1) */124#define ICE1712_DELTA_AP_DIN 0x04 /* data input */125#define ICE1712_DELTA_AP_DOUT 0x08 /* data output */126#define ICE1712_DELTA_AP_CS_DIGITAL 0x10 /* CS8427 chip select */127/* low signal = select */128#define ICE1712_DELTA_AP_CS_CODEC 0x20 /* AK4528 (audiophile), AK4529 (Delta410) chip select */129/* low signal = select */130131/* MidiMan M-Audio Delta1010LT definitions */132/* thanks to Anders Johansson <[email protected]> */133/* 0x01 = DFS */134#define ICE1712_DELTA_1010LT_CCLK 0x02 /* SPI clock (AK4524 + CS8427) */135#define ICE1712_DELTA_1010LT_DIN 0x04 /* data input (CS8427) */136#define ICE1712_DELTA_1010LT_DOUT 0x08 /* data output (AK4524 + CS8427) */137#define ICE1712_DELTA_1010LT_CS 0x70 /* mask for CS address */138#define ICE1712_DELTA_1010LT_CS_CHIP_A 0x00 /* AK4524 #0 */139#define ICE1712_DELTA_1010LT_CS_CHIP_B 0x10 /* AK4524 #1 */140#define ICE1712_DELTA_1010LT_CS_CHIP_C 0x20 /* AK4524 #2 */141#define ICE1712_DELTA_1010LT_CS_CHIP_D 0x30 /* AK4524 #3 */142#define ICE1712_DELTA_1010LT_CS_CS8427 0x40 /* CS8427 */143#define ICE1712_DELTA_1010LT_CS_NONE 0x50 /* nothing */144#define ICE1712_DELTA_1010LT_WORDCLOCK 0x80 /* sample clock source: 0 = Word Clock Input, 1 = S/PDIF Input ??? */145146/* M-Audio Delta 66 rev. E definitions.147* Newer revisions of Delta 66 have CS8427 over SPI for148* S/PDIF transceiver instead of CS8404/CS8414. */149/* 0x01 = DFS */150#define ICE1712_DELTA_66E_CCLK 0x02 /* SPI clock */151#define ICE1712_DELTA_66E_DIN 0x04 /* data input */152#define ICE1712_DELTA_66E_DOUT 0x08 /* data output */153#define ICE1712_DELTA_66E_CS_CS8427 0x10 /* chip select, low = CS8427 */154#define ICE1712_DELTA_66E_CS_CHIP_A 0x20 /* AK4524 #0 */155#define ICE1712_DELTA_66E_CS_CHIP_B 0x40 /* AK4524 #1 */156157/* Digigram VX442 definitions */158#define ICE1712_VX442_CCLK 0x02 /* SPI clock */159#define ICE1712_VX442_DIN 0x04 /* data input */160#define ICE1712_VX442_DOUT 0x08 /* data output */161#define ICE1712_VX442_CS_DIGITAL 0x10 /* chip select, low = CS8427 */162#define ICE1712_VX442_CODEC_CHIP_A 0x20 /* select chip A */163#define ICE1712_VX442_CODEC_CHIP_B 0x40 /* select chip B */164165#endif /* __SOUND_DELTA_H */166167168