18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci#ifndef __SOUND_DELTA_H 38c2ecf20Sopenharmony_ci#define __SOUND_DELTA_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci/* 68c2ecf20Sopenharmony_ci * ALSA driver for ICEnsemble ICE1712 (Envy24) 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * Lowlevel functions for M-Audio Delta 1010, 44, 66, Dio2496, Audiophile 98c2ecf20Sopenharmony_ci * Digigram VX442 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * Copyright (c) 2000 Jaroslav Kysela <perex@perex.cz> 128c2ecf20Sopenharmony_ci */ 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#define DELTA_DEVICE_DESC \ 158c2ecf20Sopenharmony_ci "{MidiMan M Audio,Delta 1010},"\ 168c2ecf20Sopenharmony_ci "{MidiMan M Audio,Delta 1010LT},"\ 178c2ecf20Sopenharmony_ci "{MidiMan M Audio,Delta DiO 2496},"\ 188c2ecf20Sopenharmony_ci "{MidiMan M Audio,Delta 66},"\ 198c2ecf20Sopenharmony_ci "{MidiMan M Audio,Delta 44},"\ 208c2ecf20Sopenharmony_ci "{MidiMan M Audio,Delta 410},"\ 218c2ecf20Sopenharmony_ci "{MidiMan M Audio,Audiophile 24/96},"\ 228c2ecf20Sopenharmony_ci "{Digigram,VX442},"\ 238c2ecf20Sopenharmony_ci "{Lionstracs,Mediastation},"\ 248c2ecf20Sopenharmony_ci "{Edirol,DA2496}," 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define ICE1712_SUBDEVICE_DELTA1010 0x121430d6 278c2ecf20Sopenharmony_ci#define ICE1712_SUBDEVICE_DELTA1010E 0xff1430d6 288c2ecf20Sopenharmony_ci#define ICE1712_SUBDEVICE_DELTADIO2496 0x121431d6 298c2ecf20Sopenharmony_ci#define ICE1712_SUBDEVICE_DELTA66 0x121432d6 308c2ecf20Sopenharmony_ci#define ICE1712_SUBDEVICE_DELTA66E 0xff1432d6 318c2ecf20Sopenharmony_ci#define ICE1712_SUBDEVICE_DELTA44 0x121433d6 328c2ecf20Sopenharmony_ci#define ICE1712_SUBDEVICE_AUDIOPHILE 0x121434d6 338c2ecf20Sopenharmony_ci#define ICE1712_SUBDEVICE_DELTA410 0x121438d6 348c2ecf20Sopenharmony_ci#define ICE1712_SUBDEVICE_DELTA1010LT 0x12143bd6 358c2ecf20Sopenharmony_ci#define ICE1712_SUBDEVICE_VX442 0x12143cd6 368c2ecf20Sopenharmony_ci#define ICE1712_SUBDEVICE_MEDIASTATION 0x694c0100 378c2ecf20Sopenharmony_ci#define ICE1712_SUBDEVICE_EDIROLDA2496 0xce164010 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci/* entry point */ 408c2ecf20Sopenharmony_ciextern struct snd_ice1712_card_info snd_ice1712_delta_cards[]; 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci/* 448c2ecf20Sopenharmony_ci * MidiMan M-Audio Delta GPIO definitions 458c2ecf20Sopenharmony_ci */ 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci/* MidiMan M-Audio Delta shared pins */ 488c2ecf20Sopenharmony_ci#define ICE1712_DELTA_DFS 0x01 /* fast/slow sample rate mode */ 498c2ecf20Sopenharmony_ci /* (>48kHz must be 1) */ 508c2ecf20Sopenharmony_ci#define ICE1712_DELTA_SPDIF_IN_STAT 0x02 518c2ecf20Sopenharmony_ci /* S/PDIF input status */ 528c2ecf20Sopenharmony_ci /* 0 = valid signal is present */ 538c2ecf20Sopenharmony_ci /* all except Delta44 */ 548c2ecf20Sopenharmony_ci /* look to CS8414 datasheet */ 558c2ecf20Sopenharmony_ci#define ICE1712_DELTA_SPDIF_OUT_STAT_CLOCK 0x04 568c2ecf20Sopenharmony_ci /* S/PDIF output status clock */ 578c2ecf20Sopenharmony_ci /* (writing on rising edge - 0->1) */ 588c2ecf20Sopenharmony_ci /* all except Delta44 */ 598c2ecf20Sopenharmony_ci /* look to CS8404A datasheet */ 608c2ecf20Sopenharmony_ci#define ICE1712_DELTA_SPDIF_OUT_STAT_DATA 0x08 618c2ecf20Sopenharmony_ci /* S/PDIF output status data */ 628c2ecf20Sopenharmony_ci /* all except Delta44 */ 638c2ecf20Sopenharmony_ci /* look to CS8404A datasheet */ 648c2ecf20Sopenharmony_ci/* MidiMan M-Audio DeltaDiO */ 658c2ecf20Sopenharmony_ci/* 0x01 = DFS */ 668c2ecf20Sopenharmony_ci/* 0x02 = SPDIF_IN_STAT */ 678c2ecf20Sopenharmony_ci/* 0x04 = SPDIF_OUT_STAT_CLOCK */ 688c2ecf20Sopenharmony_ci/* 0x08 = SPDIF_OUT_STAT_DATA */ 698c2ecf20Sopenharmony_ci#define ICE1712_DELTA_SPDIF_INPUT_SELECT 0x10 708c2ecf20Sopenharmony_ci /* coaxial (0), optical (1) */ 718c2ecf20Sopenharmony_ci /* S/PDIF input select*/ 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci/* MidiMan M-Audio Delta1010 */ 748c2ecf20Sopenharmony_ci/* 0x01 = DFS */ 758c2ecf20Sopenharmony_ci/* 0x02 = SPDIF_IN_STAT */ 768c2ecf20Sopenharmony_ci/* 0x04 = SPDIF_OUT_STAT_CLOCK */ 778c2ecf20Sopenharmony_ci/* 0x08 = SPDIF_OUT_STAT_DATA */ 788c2ecf20Sopenharmony_ci#define ICE1712_DELTA_WORD_CLOCK_SELECT 0x10 798c2ecf20Sopenharmony_ci /* 1 - clock are taken from S/PDIF input */ 808c2ecf20Sopenharmony_ci /* 0 - clock are taken from Word Clock input */ 818c2ecf20Sopenharmony_ci /* affected SPMCLKIN pin of Envy24 */ 828c2ecf20Sopenharmony_ci#define ICE1712_DELTA_WORD_CLOCK_STATUS 0x20 838c2ecf20Sopenharmony_ci /* 0 = valid word clock signal is present */ 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci/* MidiMan M-Audio Delta66 */ 868c2ecf20Sopenharmony_ci/* 0x01 = DFS */ 878c2ecf20Sopenharmony_ci/* 0x02 = SPDIF_IN_STAT */ 888c2ecf20Sopenharmony_ci/* 0x04 = SPDIF_OUT_STAT_CLOCK */ 898c2ecf20Sopenharmony_ci/* 0x08 = SPDIF_OUT_STAT_DATA */ 908c2ecf20Sopenharmony_ci#define ICE1712_DELTA_CODEC_SERIAL_DATA 0x10 918c2ecf20Sopenharmony_ci /* AKM4524 serial data */ 928c2ecf20Sopenharmony_ci#define ICE1712_DELTA_CODEC_SERIAL_CLOCK 0x20 938c2ecf20Sopenharmony_ci /* AKM4524 serial clock */ 948c2ecf20Sopenharmony_ci /* (writing on rising edge - 0->1 */ 958c2ecf20Sopenharmony_ci#define ICE1712_DELTA_CODEC_CHIP_A 0x40 968c2ecf20Sopenharmony_ci#define ICE1712_DELTA_CODEC_CHIP_B 0x80 978c2ecf20Sopenharmony_ci /* 1 - select chip A or B */ 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci/* MidiMan M-Audio Delta44 */ 1008c2ecf20Sopenharmony_ci/* 0x01 = DFS */ 1018c2ecf20Sopenharmony_ci/* 0x10 = CODEC_SERIAL_DATA */ 1028c2ecf20Sopenharmony_ci/* 0x20 = CODEC_SERIAL_CLOCK */ 1038c2ecf20Sopenharmony_ci/* 0x40 = CODEC_CHIP_A */ 1048c2ecf20Sopenharmony_ci/* 0x80 = CODEC_CHIP_B */ 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci/* MidiMan M-Audio Audiophile/Delta410 definitions */ 1078c2ecf20Sopenharmony_ci/* thanks to Kristof Pelckmans <Kristof.Pelckmans@antwerpen.be> for Delta410 info */ 1088c2ecf20Sopenharmony_ci/* 0x01 = DFS */ 1098c2ecf20Sopenharmony_ci#define ICE1712_DELTA_AP_CCLK 0x02 /* SPI clock */ 1108c2ecf20Sopenharmony_ci /* (clocking on rising edge - 0->1) */ 1118c2ecf20Sopenharmony_ci#define ICE1712_DELTA_AP_DIN 0x04 /* data input */ 1128c2ecf20Sopenharmony_ci#define ICE1712_DELTA_AP_DOUT 0x08 /* data output */ 1138c2ecf20Sopenharmony_ci#define ICE1712_DELTA_AP_CS_DIGITAL 0x10 /* CS8427 chip select */ 1148c2ecf20Sopenharmony_ci /* low signal = select */ 1158c2ecf20Sopenharmony_ci#define ICE1712_DELTA_AP_CS_CODEC 0x20 /* AK4528 (audiophile), AK4529 (Delta410) chip select */ 1168c2ecf20Sopenharmony_ci /* low signal = select */ 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ci/* MidiMan M-Audio Delta1010LT definitions */ 1198c2ecf20Sopenharmony_ci/* thanks to Anders Johansson <ajh@watri.uwa.edu.au> */ 1208c2ecf20Sopenharmony_ci/* 0x01 = DFS */ 1218c2ecf20Sopenharmony_ci#define ICE1712_DELTA_1010LT_CCLK 0x02 /* SPI clock (AK4524 + CS8427) */ 1228c2ecf20Sopenharmony_ci#define ICE1712_DELTA_1010LT_DIN 0x04 /* data input (CS8427) */ 1238c2ecf20Sopenharmony_ci#define ICE1712_DELTA_1010LT_DOUT 0x08 /* data output (AK4524 + CS8427) */ 1248c2ecf20Sopenharmony_ci#define ICE1712_DELTA_1010LT_CS 0x70 /* mask for CS address */ 1258c2ecf20Sopenharmony_ci#define ICE1712_DELTA_1010LT_CS_CHIP_A 0x00 /* AK4524 #0 */ 1268c2ecf20Sopenharmony_ci#define ICE1712_DELTA_1010LT_CS_CHIP_B 0x10 /* AK4524 #1 */ 1278c2ecf20Sopenharmony_ci#define ICE1712_DELTA_1010LT_CS_CHIP_C 0x20 /* AK4524 #2 */ 1288c2ecf20Sopenharmony_ci#define ICE1712_DELTA_1010LT_CS_CHIP_D 0x30 /* AK4524 #3 */ 1298c2ecf20Sopenharmony_ci#define ICE1712_DELTA_1010LT_CS_CS8427 0x40 /* CS8427 */ 1308c2ecf20Sopenharmony_ci#define ICE1712_DELTA_1010LT_CS_NONE 0x50 /* nothing */ 1318c2ecf20Sopenharmony_ci#define ICE1712_DELTA_1010LT_WORDCLOCK 0x80 /* sample clock source: 0 = Word Clock Input, 1 = S/PDIF Input ??? */ 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ci/* M-Audio Delta 66 rev. E definitions. 1348c2ecf20Sopenharmony_ci * Newer revisions of Delta 66 have CS8427 over SPI for 1358c2ecf20Sopenharmony_ci * S/PDIF transceiver instead of CS8404/CS8414. */ 1368c2ecf20Sopenharmony_ci/* 0x01 = DFS */ 1378c2ecf20Sopenharmony_ci#define ICE1712_DELTA_66E_CCLK 0x02 /* SPI clock */ 1388c2ecf20Sopenharmony_ci#define ICE1712_DELTA_66E_DIN 0x04 /* data input */ 1398c2ecf20Sopenharmony_ci#define ICE1712_DELTA_66E_DOUT 0x08 /* data output */ 1408c2ecf20Sopenharmony_ci#define ICE1712_DELTA_66E_CS_CS8427 0x10 /* chip select, low = CS8427 */ 1418c2ecf20Sopenharmony_ci#define ICE1712_DELTA_66E_CS_CHIP_A 0x20 /* AK4524 #0 */ 1428c2ecf20Sopenharmony_ci#define ICE1712_DELTA_66E_CS_CHIP_B 0x40 /* AK4524 #1 */ 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_ci/* Digigram VX442 definitions */ 1458c2ecf20Sopenharmony_ci#define ICE1712_VX442_CCLK 0x02 /* SPI clock */ 1468c2ecf20Sopenharmony_ci#define ICE1712_VX442_DIN 0x04 /* data input */ 1478c2ecf20Sopenharmony_ci#define ICE1712_VX442_DOUT 0x08 /* data output */ 1488c2ecf20Sopenharmony_ci#define ICE1712_VX442_CS_DIGITAL 0x10 /* chip select, low = CS8427 */ 1498c2ecf20Sopenharmony_ci#define ICE1712_VX442_CODEC_CHIP_A 0x20 /* select chip A */ 1508c2ecf20Sopenharmony_ci#define ICE1712_VX442_CODEC_CHIP_B 0x40 /* select chip B */ 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_ci#endif /* __SOUND_DELTA_H */ 153