m52790.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. m52790.h - definition for m52790 inputs and outputs
  4. Copyright (C) 2007 Hans Verkuil ([email protected])
  5. */
  6. #ifndef _M52790_H_
  7. #define _M52790_H_
  8. /* Input routing switch 1 */
  9. #define M52790_SW1_IN_MASK 0x0003
  10. #define M52790_SW1_IN_TUNER 0x0000
  11. #define M52790_SW1_IN_V2 0x0001
  12. #define M52790_SW1_IN_V3 0x0002
  13. #define M52790_SW1_IN_V4 0x0003
  14. /* Selects component input instead of composite */
  15. #define M52790_SW1_YCMIX 0x0004
  16. /* Input routing switch 2 */
  17. #define M52790_SW2_IN_MASK 0x0300
  18. #define M52790_SW2_IN_TUNER 0x0000
  19. #define M52790_SW2_IN_V2 0x0100
  20. #define M52790_SW2_IN_V3 0x0200
  21. #define M52790_SW2_IN_V4 0x0300
  22. /* Selects component input instead of composite */
  23. #define M52790_SW2_YCMIX 0x0400
  24. /* Output routing switch 1 */
  25. /* Enable 6dB amplifier for composite out */
  26. #define M52790_SW1_V_AMP 0x0008
  27. /* Enable 6dB amplifier for component out */
  28. #define M52790_SW1_YC_AMP 0x0010
  29. /* Audio output mode */
  30. #define M52790_SW1_AUDIO_MASK 0x00c0
  31. #define M52790_SW1_AUDIO_MUTE 0x0000
  32. #define M52790_SW1_AUDIO_R 0x0040
  33. #define M52790_SW1_AUDIO_L 0x0080
  34. #define M52790_SW1_AUDIO_STEREO 0x00c0
  35. /* Output routing switch 2 */
  36. /* Enable 6dB amplifier for composite out */
  37. #define M52790_SW2_V_AMP 0x0800
  38. /* Enable 6dB amplifier for component out */
  39. #define M52790_SW2_YC_AMP 0x1000
  40. /* Audio output mode */
  41. #define M52790_SW2_AUDIO_MASK 0xc000
  42. #define M52790_SW2_AUDIO_MUTE 0x0000
  43. #define M52790_SW2_AUDIO_R 0x4000
  44. #define M52790_SW2_AUDIO_L 0x8000
  45. #define M52790_SW2_AUDIO_STEREO 0xc000
  46. /* Common values */
  47. #define M52790_IN_TUNER (M52790_SW1_IN_TUNER | M52790_SW2_IN_TUNER)
  48. #define M52790_IN_V2 (M52790_SW1_IN_V2 | M52790_SW2_IN_V2)
  49. #define M52790_IN_V3 (M52790_SW1_IN_V3 | M52790_SW2_IN_V3)
  50. #define M52790_IN_V4 (M52790_SW1_IN_V4 | M52790_SW2_IN_V4)
  51. #define M52790_OUT_STEREO (M52790_SW1_AUDIO_STEREO | \
  52. M52790_SW2_AUDIO_STEREO)
  53. #define M52790_OUT_AMP_STEREO (M52790_SW1_AUDIO_STEREO | \
  54. M52790_SW1_V_AMP | \
  55. M52790_SW2_AUDIO_STEREO | \
  56. M52790_SW2_V_AMP)
  57. #endif