burgundy.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*
  2. * Driver for PowerMac Burgundy onboard soundchips
  3. * Copyright (c) 2001 by Takashi Iwai <tiwai@suse.de>
  4. * based on dmasound.c.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU 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 02111-1307 USA
  19. */
  20. #ifndef __BURGUNDY_H
  21. #define __BURGUNDY_H
  22. #define MASK_ADDR_BURGUNDY_INPBOOST (0x10 << 12)
  23. #define MASK_ADDR_BURGUNDY_INPSEL21 (0x11 << 12)
  24. #define MASK_ADDR_BURGUNDY_INPSEL3 (0x12 << 12)
  25. #define MASK_ADDR_BURGUNDY_GAINCH1 (0x13 << 12)
  26. #define MASK_ADDR_BURGUNDY_GAINCH2 (0x14 << 12)
  27. #define MASK_ADDR_BURGUNDY_GAINCH3 (0x15 << 12)
  28. #define MASK_ADDR_BURGUNDY_GAINCH4 (0x16 << 12)
  29. #define MASK_ADDR_BURGUNDY_VOLCH1 (0x20 << 12)
  30. #define MASK_ADDR_BURGUNDY_VOLCH2 (0x21 << 12)
  31. #define MASK_ADDR_BURGUNDY_VOLCH3 (0x22 << 12)
  32. #define MASK_ADDR_BURGUNDY_VOLCH4 (0x23 << 12)
  33. #define MASK_ADDR_BURGUNDY_CAPTURESELECTS (0x2A << 12)
  34. #define MASK_ADDR_BURGUNDY_OUTPUTSELECTS (0x2B << 12)
  35. #define MASK_ADDR_BURGUNDY_VOLMIX01 (0x2D << 12)
  36. #define MASK_ADDR_BURGUNDY_VOLMIX23 (0x2E << 12)
  37. #define MASK_ADDR_BURGUNDY_OUTPUTENABLES (0x2F << 12)
  38. #define MASK_ADDR_BURGUNDY_MASTER_VOLUME (0x30 << 12)
  39. #define MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES (0x60 << 12)
  40. #define MASK_ADDR_BURGUNDY_ATTENSPEAKER (0x62 << 12)
  41. #define MASK_ADDR_BURGUNDY_ATTENLINEOUT (0x63 << 12)
  42. #define MASK_ADDR_BURGUNDY_ATTENHP (0x64 << 12)
  43. #define MASK_ADDR_BURGUNDY_ATTENMONO (0x65 << 12)
  44. #define MASK_ADDR_BURGUNDY_HOSTIFAD (0x78 << 12)
  45. #define MASK_ADDR_BURGUNDY_HOSTIFEH (0x79 << 12)
  46. #define MASK_ADDR_BURGUNDY_VOLCD (MASK_ADDR_BURGUNDY_VOLCH1)
  47. #define MASK_ADDR_BURGUNDY_VOLLINE (MASK_ADDR_BURGUNDY_VOLCH2)
  48. #define MASK_ADDR_BURGUNDY_VOLMIC (MASK_ADDR_BURGUNDY_VOLCH3)
  49. #define MASK_ADDR_BURGUNDY_VOLMODEM (MASK_ADDR_BURGUNDY_VOLCH4)
  50. #define MASK_ADDR_BURGUNDY_GAINCD (MASK_ADDR_BURGUNDY_GAINCH1)
  51. #define MASK_ADDR_BURGUNDY_GAINLINE (MASK_ADDR_BURGUNDY_GAINCH2)
  52. #define MASK_ADDR_BURGUNDY_GAINMIC (MASK_ADDR_BURGUNDY_GAINCH3)
  53. #define MASK_ADDR_BURGUNDY_GAINMODEM (MASK_ADDR_BURGUNDY_VOLCH4)
  54. /* These are all default values for the burgundy */
  55. #define DEF_BURGUNDY_INPSEL21 (0xAA)
  56. #define DEF_BURGUNDY_INPSEL3_IMAC (0x0A)
  57. #define DEF_BURGUNDY_INPSEL3_PMAC (0x05)
  58. #define DEF_BURGUNDY_GAINCD (0x33)
  59. #define DEF_BURGUNDY_GAINLINE (0x44)
  60. #define DEF_BURGUNDY_GAINMIC (0x44)
  61. #define DEF_BURGUNDY_GAINMODEM (0x06)
  62. /* Remember: lowest volume here is 0x9B (155) */
  63. #define DEF_BURGUNDY_VOLCD (0xCCCCCCCC)
  64. #define DEF_BURGUNDY_VOLLINE (0x00000000)
  65. #define DEF_BURGUNDY_VOLMIC (0x00000000)
  66. #define DEF_BURGUNDY_VOLMODEM (0xCCCCCCCC)
  67. #define DEF_BURGUNDY_OUTPUTSELECTS (0x010F010F)
  68. #define DEF_BURGUNDY_OUTPUTENABLES (0x0100000A)
  69. /* #define DEF_BURGUNDY_MASTER_VOLUME (0xFFFFFFFF) */ /* too loud */
  70. #define DEF_BURGUNDY_MASTER_VOLUME (0xDDDDDDDD)
  71. #define DEF_BURGUNDY_MORE_OUTPUTENABLES (0x7E)
  72. #define DEF_BURGUNDY_ATTENSPEAKER (0x44)
  73. #define DEF_BURGUNDY_ATTENLINEOUT (0xCC)
  74. #define DEF_BURGUNDY_ATTENHP (0xCC)
  75. /* MORE_OUTPUTENABLES bits */
  76. #define BURGUNDY_OUTPUT_LEFT 0x02
  77. #define BURGUNDY_OUTPUT_RIGHT 0x04
  78. #define BURGUNDY_LINEOUT_LEFT 0x08
  79. #define BURGUNDY_LINEOUT_RIGHT 0x10
  80. #define BURGUNDY_HP_LEFT 0x20
  81. #define BURGUNDY_HP_RIGHT 0x40
  82. #define BURGUNDY_OUTPUT_INTERN 0x80
  83. /* Headphone detection bits */
  84. #define BURGUNDY_HPDETECT_PMAC_BACK 0x04
  85. #define BURGUNDY_HPDETECT_IMAC_SIDE 0x04
  86. #define BURGUNDY_HPDETECT_IMAC_UPPER 0x08
  87. #define BURGUNDY_HPDETECT_IMAC_LOWER 0x01
  88. /* Volume offset */
  89. #define BURGUNDY_VOLUME_OFFSET 155
  90. #endif /* __BURGUNDY_H */