at73c213.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /*
  2. * Driver for the AT73C213 16-bit stereo DAC on Atmel ATSTK1000
  3. *
  4. * Copyright (C) 2006 - 2007 Atmel Corporation
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation; either version 2 of the
  9. * License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  19. * 02111-1307, USA.
  20. *
  21. * The full GNU General Public License is included in this
  22. * distribution in the file called COPYING.
  23. */
  24. #ifndef _SND_AT73C213_H
  25. #define _SND_AT73C213_H
  26. /* DAC control register */
  27. #define DAC_CTRL 0x00
  28. #define DAC_CTRL_ONPADRV 7
  29. #define DAC_CTRL_ONAUXIN 6
  30. #define DAC_CTRL_ONDACR 5
  31. #define DAC_CTRL_ONDACL 4
  32. #define DAC_CTRL_ONLNOR 3
  33. #define DAC_CTRL_ONLNOL 2
  34. #define DAC_CTRL_ONLNIR 1
  35. #define DAC_CTRL_ONLNIL 0
  36. /* DAC left line in gain register */
  37. #define DAC_LLIG 0x01
  38. #define DAC_LLIG_LLIG 0
  39. /* DAC right line in gain register */
  40. #define DAC_RLIG 0x02
  41. #define DAC_RLIG_RLIG 0
  42. /* DAC Left Master Playback Gain Register */
  43. #define DAC_LMPG 0x03
  44. #define DAC_LMPG_LMPG 0
  45. /* DAC Right Master Playback Gain Register */
  46. #define DAC_RMPG 0x04
  47. #define DAC_RMPG_RMPG 0
  48. /* DAC Left Line Out Gain Register */
  49. #define DAC_LLOG 0x05
  50. #define DAC_LLOG_LLOG 0
  51. /* DAC Right Line Out Gain Register */
  52. #define DAC_RLOG 0x06
  53. #define DAC_RLOG_RLOG 0
  54. /* DAC Output Level Control Register */
  55. #define DAC_OLC 0x07
  56. #define DAC_OLC_RSHORT 7
  57. #define DAC_OLC_ROLC 4
  58. #define DAC_OLC_LSHORT 3
  59. #define DAC_OLC_LOLC 0
  60. /* DAC Mixer Control Register */
  61. #define DAC_MC 0x08
  62. #define DAC_MC_INVR 5
  63. #define DAC_MC_INVL 4
  64. #define DAC_MC_RMSMIN2 3
  65. #define DAC_MC_RMSMIN1 2
  66. #define DAC_MC_LMSMIN2 1
  67. #define DAC_MC_LMSMIN1 0
  68. /* DAC Clock and Sampling Frequency Control Register */
  69. #define DAC_CSFC 0x09
  70. #define DAC_CSFC_OVRSEL 4
  71. /* DAC Miscellaneous Register */
  72. #define DAC_MISC 0x0A
  73. #define DAC_MISC_VCMCAPSEL 7
  74. #define DAC_MISC_DINTSEL 4
  75. #define DAC_MISC_DITHEN 3
  76. #define DAC_MISC_DEEMPEN 2
  77. #define DAC_MISC_NBITS 0
  78. /* DAC Precharge Control Register */
  79. #define DAC_PRECH 0x0C
  80. #define DAC_PRECH_PRCHGPDRV 7
  81. #define DAC_PRECH_PRCHGAUX1 6
  82. #define DAC_PRECH_PRCHGLNOR 5
  83. #define DAC_PRECH_PRCHGLNOL 4
  84. #define DAC_PRECH_PRCHGLNIR 3
  85. #define DAC_PRECH_PRCHGLNIL 2
  86. #define DAC_PRECH_PRCHG 1
  87. #define DAC_PRECH_ONMSTR 0
  88. /* DAC Auxiliary Input Gain Control Register */
  89. #define DAC_AUXG 0x0D
  90. #define DAC_AUXG_AUXG 0
  91. /* DAC Reset Register */
  92. #define DAC_RST 0x10
  93. #define DAC_RST_RESMASK 2
  94. #define DAC_RST_RESFILZ 1
  95. #define DAC_RST_RSTZ 0
  96. /* Power Amplifier Control Register */
  97. #define PA_CTRL 0x11
  98. #define PA_CTRL_APAON 6
  99. #define PA_CTRL_APAPRECH 5
  100. #define PA_CTRL_APALP 4
  101. #define PA_CTRL_APAGAIN 0
  102. #endif /* _SND_AT73C213_H */