delta.h 6.3 KB

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