1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 m52790.h - definition for m52790 inputs and outputs
5 Copyright (C) 2007 Hans Verkuil (hverkuil@xs4all.nl)
12 /* Input routing switch 1 */
14 #define M52790_SW1_IN_MASK 0x0003
15 #define M52790_SW1_IN_TUNER 0x0000
16 #define M52790_SW1_IN_V2 0x0001
17 #define M52790_SW1_IN_V3 0x0002
18 #define M52790_SW1_IN_V4 0x0003
20 /* Selects component input instead of composite */
21 #define M52790_SW1_YCMIX 0x0004
24 /* Input routing switch 2 */
26 #define M52790_SW2_IN_MASK 0x0300
27 #define M52790_SW2_IN_TUNER 0x0000
28 #define M52790_SW2_IN_V2 0x0100
29 #define M52790_SW2_IN_V3 0x0200
30 #define M52790_SW2_IN_V4 0x0300
32 /* Selects component input instead of composite */
33 #define M52790_SW2_YCMIX 0x0400
36 /* Output routing switch 1 */
38 /* Enable 6dB amplifier for composite out */
39 #define M52790_SW1_V_AMP 0x0008
41 /* Enable 6dB amplifier for component out */
42 #define M52790_SW1_YC_AMP 0x0010
44 /* Audio output mode */
45 #define M52790_SW1_AUDIO_MASK 0x00c0
46 #define M52790_SW1_AUDIO_MUTE 0x0000
47 #define M52790_SW1_AUDIO_R 0x0040
48 #define M52790_SW1_AUDIO_L 0x0080
49 #define M52790_SW1_AUDIO_STEREO 0x00c0
52 /* Output routing switch 2 */
54 /* Enable 6dB amplifier for composite out */
55 #define M52790_SW2_V_AMP 0x0800
57 /* Enable 6dB amplifier for component out */
58 #define M52790_SW2_YC_AMP 0x1000
60 /* Audio output mode */
61 #define M52790_SW2_AUDIO_MASK 0xc000
62 #define M52790_SW2_AUDIO_MUTE 0x0000
63 #define M52790_SW2_AUDIO_R 0x4000
64 #define M52790_SW2_AUDIO_L 0x8000
65 #define M52790_SW2_AUDIO_STEREO 0xc000
69 #define M52790_IN_TUNER (M52790_SW1_IN_TUNER | M52790_SW2_IN_TUNER)
70 #define M52790_IN_V2 (M52790_SW1_IN_V2 | M52790_SW2_IN_V2)
71 #define M52790_IN_V3 (M52790_SW1_IN_V3 | M52790_SW2_IN_V3)
72 #define M52790_IN_V4 (M52790_SW1_IN_V4 | M52790_SW2_IN_V4)
74 #define M52790_OUT_STEREO (M52790_SW1_AUDIO_STEREO | \
75 M52790_SW2_AUDIO_STEREO)
76 #define M52790_OUT_AMP_STEREO (M52790_SW1_AUDIO_STEREO | \
78 M52790_SW2_AUDIO_STEREO | \