18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci m52790.h - definition for m52790 inputs and outputs 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci Copyright (C) 2007 Hans Verkuil (hverkuil@xs4all.nl) 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci*/ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef _M52790_H_ 108c2ecf20Sopenharmony_ci#define _M52790_H_ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci/* Input routing switch 1 */ 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#define M52790_SW1_IN_MASK 0x0003 158c2ecf20Sopenharmony_ci#define M52790_SW1_IN_TUNER 0x0000 168c2ecf20Sopenharmony_ci#define M52790_SW1_IN_V2 0x0001 178c2ecf20Sopenharmony_ci#define M52790_SW1_IN_V3 0x0002 188c2ecf20Sopenharmony_ci#define M52790_SW1_IN_V4 0x0003 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci/* Selects component input instead of composite */ 218c2ecf20Sopenharmony_ci#define M52790_SW1_YCMIX 0x0004 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci/* Input routing switch 2 */ 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define M52790_SW2_IN_MASK 0x0300 278c2ecf20Sopenharmony_ci#define M52790_SW2_IN_TUNER 0x0000 288c2ecf20Sopenharmony_ci#define M52790_SW2_IN_V2 0x0100 298c2ecf20Sopenharmony_ci#define M52790_SW2_IN_V3 0x0200 308c2ecf20Sopenharmony_ci#define M52790_SW2_IN_V4 0x0300 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci/* Selects component input instead of composite */ 338c2ecf20Sopenharmony_ci#define M52790_SW2_YCMIX 0x0400 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci/* Output routing switch 1 */ 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci/* Enable 6dB amplifier for composite out */ 398c2ecf20Sopenharmony_ci#define M52790_SW1_V_AMP 0x0008 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci/* Enable 6dB amplifier for component out */ 428c2ecf20Sopenharmony_ci#define M52790_SW1_YC_AMP 0x0010 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci/* Audio output mode */ 458c2ecf20Sopenharmony_ci#define M52790_SW1_AUDIO_MASK 0x00c0 468c2ecf20Sopenharmony_ci#define M52790_SW1_AUDIO_MUTE 0x0000 478c2ecf20Sopenharmony_ci#define M52790_SW1_AUDIO_R 0x0040 488c2ecf20Sopenharmony_ci#define M52790_SW1_AUDIO_L 0x0080 498c2ecf20Sopenharmony_ci#define M52790_SW1_AUDIO_STEREO 0x00c0 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci/* Output routing switch 2 */ 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci/* Enable 6dB amplifier for composite out */ 558c2ecf20Sopenharmony_ci#define M52790_SW2_V_AMP 0x0800 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci/* Enable 6dB amplifier for component out */ 588c2ecf20Sopenharmony_ci#define M52790_SW2_YC_AMP 0x1000 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci/* Audio output mode */ 618c2ecf20Sopenharmony_ci#define M52790_SW2_AUDIO_MASK 0xc000 628c2ecf20Sopenharmony_ci#define M52790_SW2_AUDIO_MUTE 0x0000 638c2ecf20Sopenharmony_ci#define M52790_SW2_AUDIO_R 0x4000 648c2ecf20Sopenharmony_ci#define M52790_SW2_AUDIO_L 0x8000 658c2ecf20Sopenharmony_ci#define M52790_SW2_AUDIO_STEREO 0xc000 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci/* Common values */ 698c2ecf20Sopenharmony_ci#define M52790_IN_TUNER (M52790_SW1_IN_TUNER | M52790_SW2_IN_TUNER) 708c2ecf20Sopenharmony_ci#define M52790_IN_V2 (M52790_SW1_IN_V2 | M52790_SW2_IN_V2) 718c2ecf20Sopenharmony_ci#define M52790_IN_V3 (M52790_SW1_IN_V3 | M52790_SW2_IN_V3) 728c2ecf20Sopenharmony_ci#define M52790_IN_V4 (M52790_SW1_IN_V4 | M52790_SW2_IN_V4) 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci#define M52790_OUT_STEREO (M52790_SW1_AUDIO_STEREO | \ 758c2ecf20Sopenharmony_ci M52790_SW2_AUDIO_STEREO) 768c2ecf20Sopenharmony_ci#define M52790_OUT_AMP_STEREO (M52790_SW1_AUDIO_STEREO | \ 778c2ecf20Sopenharmony_ci M52790_SW1_V_AMP | \ 788c2ecf20Sopenharmony_ci M52790_SW2_AUDIO_STEREO | \ 798c2ecf20Sopenharmony_ci M52790_SW2_V_AMP) 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci#endif 82