tas571x.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * TAS571x amplifier audio driver
  3. *
  4. * Copyright (C) 2015 Google, Inc.
  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. #ifndef _TAS571X_H
  12. #define _TAS571X_H
  13. /* device registers */
  14. #define TAS571X_CLK_CTRL_REG 0x00
  15. #define TAS571X_DEV_ID_REG 0x01
  16. #define TAS571X_ERR_STATUS_REG 0x02
  17. #define TAS571X_SYS_CTRL_1_REG 0x03
  18. #define TAS571X_SDI_REG 0x04
  19. #define TAS571X_SDI_FMT_MASK 0x0f
  20. #define TAS571X_SYS_CTRL_2_REG 0x05
  21. #define TAS571X_SYS_CTRL_2_SDN_MASK 0x40
  22. #define TAS571X_SOFT_MUTE_REG 0x06
  23. #define TAS571X_SOFT_MUTE_CH1_SHIFT 0
  24. #define TAS571X_SOFT_MUTE_CH2_SHIFT 1
  25. #define TAS571X_SOFT_MUTE_CH3_SHIFT 2
  26. #define TAS571X_MVOL_REG 0x07
  27. #define TAS571X_CH1_VOL_REG 0x08
  28. #define TAS571X_CH2_VOL_REG 0x09
  29. #define TAS571X_CH3_VOL_REG 0x0a
  30. #define TAS571X_VOL_CFG_REG 0x0e
  31. #define TAS571X_MODULATION_LIMIT_REG 0x10
  32. #define TAS571X_IC_DELAY_CH1_REG 0x11
  33. #define TAS571X_IC_DELAY_CH2_REG 0x12
  34. #define TAS571X_IC_DELAY_CH3_REG 0x13
  35. #define TAS571X_IC_DELAY_CH4_REG 0x14
  36. #define TAS571X_PWM_CH_SDN_GROUP_REG 0x19 /* N/A on TAS5717, TAS5719 */
  37. #define TAS571X_PWM_CH1_SDN_MASK (1<<0)
  38. #define TAS571X_PWM_CH2_SDN_SHIFT (1<<1)
  39. #define TAS571X_PWM_CH3_SDN_SHIFT (1<<2)
  40. #define TAS571X_PWM_CH4_SDN_SHIFT (1<<3)
  41. #define TAS571X_START_STOP_PERIOD_REG 0x1a
  42. #define TAS571X_OSC_TRIM_REG 0x1b
  43. #define TAS571X_BKND_ERR_REG 0x1c
  44. #define TAS571X_INPUT_MUX_REG 0x20
  45. #define TAS571X_CH4_SRC_SELECT_REG 0x21
  46. #define TAS571X_PWM_MUX_REG 0x25
  47. /* 20-byte biquad registers */
  48. #define TAS5717_CH1_BQ0_REG 0x26
  49. #define TAS5717_CH1_BQ1_REG 0x27
  50. #define TAS5717_CH1_BQ2_REG 0x28
  51. #define TAS5717_CH1_BQ3_REG 0x29
  52. #define TAS5717_CH1_BQ4_REG 0x2a
  53. #define TAS5717_CH1_BQ5_REG 0x2b
  54. #define TAS5717_CH1_BQ6_REG 0x2c
  55. #define TAS5717_CH1_BQ7_REG 0x2d
  56. #define TAS5717_CH1_BQ8_REG 0x2e
  57. #define TAS5717_CH1_BQ9_REG 0x2f
  58. #define TAS5717_CH2_BQ0_REG 0x30
  59. #define TAS5717_CH2_BQ1_REG 0x31
  60. #define TAS5717_CH2_BQ2_REG 0x32
  61. #define TAS5717_CH2_BQ3_REG 0x33
  62. #define TAS5717_CH2_BQ4_REG 0x34
  63. #define TAS5717_CH2_BQ5_REG 0x35
  64. #define TAS5717_CH2_BQ6_REG 0x36
  65. #define TAS5717_CH2_BQ7_REG 0x37
  66. #define TAS5717_CH2_BQ8_REG 0x38
  67. #define TAS5717_CH2_BQ9_REG 0x39
  68. #define TAS5717_CH1_BQ10_REG 0x58
  69. #define TAS5717_CH1_BQ11_REG 0x59
  70. #define TAS5717_CH4_BQ0_REG 0x5a
  71. #define TAS5717_CH4_BQ1_REG 0x5b
  72. #define TAS5717_CH2_BQ10_REG 0x5c
  73. #define TAS5717_CH2_BQ11_REG 0x5d
  74. #define TAS5717_CH3_BQ0_REG 0x5e
  75. #define TAS5717_CH3_BQ1_REG 0x5f
  76. #define TAS5717_CH1_RIGHT_CH_MIX_REG 0x72
  77. #define TAS5717_CH1_LEFT_CH_MIX_REG 0x73
  78. #define TAS5717_CH2_LEFT_CH_MIX_REG 0x76
  79. #define TAS5717_CH2_RIGHT_CH_MIX_REG 0x77
  80. #endif /* _TAS571X_H */