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