m52790.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. m52790.h - definition for m52790 inputs and outputs
  3. Copyright (C) 2007 Hans Verkuil (hverkuil@xs4all.nl)
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. */
  16. #ifndef _M52790_H_
  17. #define _M52790_H_
  18. /* Input routing switch 1 */
  19. #define M52790_SW1_IN_MASK 0x0003
  20. #define M52790_SW1_IN_TUNER 0x0000
  21. #define M52790_SW1_IN_V2 0x0001
  22. #define M52790_SW1_IN_V3 0x0002
  23. #define M52790_SW1_IN_V4 0x0003
  24. /* Selects component input instead of composite */
  25. #define M52790_SW1_YCMIX 0x0004
  26. /* Input routing switch 2 */
  27. #define M52790_SW2_IN_MASK 0x0300
  28. #define M52790_SW2_IN_TUNER 0x0000
  29. #define M52790_SW2_IN_V2 0x0100
  30. #define M52790_SW2_IN_V3 0x0200
  31. #define M52790_SW2_IN_V4 0x0300
  32. /* Selects component input instead of composite */
  33. #define M52790_SW2_YCMIX 0x0400
  34. /* Output routing switch 1 */
  35. /* Enable 6dB amplifier for composite out */
  36. #define M52790_SW1_V_AMP 0x0008
  37. /* Enable 6dB amplifier for component out */
  38. #define M52790_SW1_YC_AMP 0x0010
  39. /* Audio output mode */
  40. #define M52790_SW1_AUDIO_MASK 0x00c0
  41. #define M52790_SW1_AUDIO_MUTE 0x0000
  42. #define M52790_SW1_AUDIO_R 0x0040
  43. #define M52790_SW1_AUDIO_L 0x0080
  44. #define M52790_SW1_AUDIO_STEREO 0x00c0
  45. /* Output routing switch 2 */
  46. /* Enable 6dB amplifier for composite out */
  47. #define M52790_SW2_V_AMP 0x0800
  48. /* Enable 6dB amplifier for component out */
  49. #define M52790_SW2_YC_AMP 0x1000
  50. /* Audio output mode */
  51. #define M52790_SW2_AUDIO_MASK 0xc000
  52. #define M52790_SW2_AUDIO_MUTE 0x0000
  53. #define M52790_SW2_AUDIO_R 0x4000
  54. #define M52790_SW2_AUDIO_L 0x8000
  55. #define M52790_SW2_AUDIO_STEREO 0xc000
  56. /* Common values */
  57. #define M52790_IN_TUNER (M52790_SW1_IN_TUNER | M52790_SW2_IN_TUNER)
  58. #define M52790_IN_V2 (M52790_SW1_IN_V2 | M52790_SW2_IN_V2)
  59. #define M52790_IN_V3 (M52790_SW1_IN_V3 | M52790_SW2_IN_V3)
  60. #define M52790_IN_V4 (M52790_SW1_IN_V4 | M52790_SW2_IN_V4)
  61. #define M52790_OUT_STEREO (M52790_SW1_AUDIO_STEREO | \
  62. M52790_SW2_AUDIO_STEREO)
  63. #define M52790_OUT_AMP_STEREO (M52790_SW1_AUDIO_STEREO | \
  64. M52790_SW1_V_AMP | \
  65. M52790_SW2_AUDIO_STEREO | \
  66. M52790_SW2_V_AMP)
  67. #endif