Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * xc2028_types
0004  *
0005  * This file includes internal tipes to be used inside xc2028.
0006  * Shouldn't be included outside xc2028
0007  *
0008  * Copyright (c) 2007-2008 Mauro Carvalho Chehab <mchehab@kernel.org>
0009  */
0010 
0011 /* xc3028 firmware types */
0012 
0013 /* BASE firmware should be loaded before any other firmware */
0014 #define BASE        (1<<0)
0015 #define BASE_TYPES  (BASE|F8MHZ|MTS|FM|INPUT1|INPUT2|INIT1)
0016 
0017 /* F8MHZ marks BASE firmwares for 8 MHz Bandwidth */
0018 #define F8MHZ       (1<<1)
0019 
0020 /* Multichannel Television Sound (MTS)
0021    Those firmwares are capable of using xc2038 DSP to decode audio and
0022    produce a baseband audio output on some pins of the chip.
0023    There are MTS firmwares for the most used video standards. It should be
0024    required to use MTS firmwares, depending on the way audio is routed into
0025    the bridge chip
0026  */
0027 #define MTS     (1<<2)
0028 
0029 /* FIXME: I have no idea what's the difference between
0030    D2620 and D2633 firmwares
0031  */
0032 #define D2620       (1<<3)
0033 #define D2633       (1<<4)
0034 
0035 /* DTV firmwares for 6, 7 and 8 MHz
0036    DTV6 - 6MHz - ATSC/DVB-C/DVB-T/ISDB-T/DOCSIS
0037    DTV8 - 8MHz - DVB-C/DVB-T
0038  */
0039 #define DTV6           (1 << 5)
0040 #define QAM            (1 << 6)
0041 #define DTV7        (1<<7)
0042 #define DTV78       (1<<8)
0043 #define DTV8        (1<<9)
0044 
0045 #define DTV_TYPES   (D2620|D2633|DTV6|QAM|DTV7|DTV78|DTV8|ATSC)
0046 
0047 /* There's a FM | BASE firmware + FM specific firmware (std=0) */
0048 #define FM      (1<<10)
0049 
0050 #define STD_SPECIFIC_TYPES (MTS|FM|LCD|NOGD)
0051 
0052 /* Applies only for FM firmware
0053    Makes it use RF input 1 (pin #2) instead of input 2 (pin #4)
0054  */
0055 #define INPUT1      (1<<11)
0056 
0057 
0058 /* LCD firmwares exist only for MTS STD/MN (PAL or NTSC/M)
0059     and for non-MTS STD/MN (PAL, NTSC/M or NTSC/Kr)
0060     There are variants both with and without NOGD
0061     Those firmwares produce better result with LCD displays
0062  */
0063 #define LCD     (1<<12)
0064 
0065 /* NOGD firmwares exist only for MTS STD/MN (PAL or NTSC/M)
0066     and for non-MTS STD/MN (PAL, NTSC/M or NTSC/Kr)
0067     The NOGD firmwares don't have group delay compensation filter
0068  */
0069 #define NOGD        (1<<13)
0070 
0071 /* Old firmwares were broken into init0 and init1 */
0072 #define INIT1       (1<<14)
0073 
0074 /* SCODE firmware selects particular behaviours */
0075 #define MONO           (1 << 15)
0076 #define ATSC           (1 << 16)
0077 #define IF             (1 << 17)
0078 #define LG60           (1 << 18)
0079 #define ATI638         (1 << 19)
0080 #define OREN538        (1 << 20)
0081 #define OREN36         (1 << 21)
0082 #define TOYOTA388      (1 << 22)
0083 #define TOYOTA794      (1 << 23)
0084 #define DIBCOM52       (1 << 24)
0085 #define ZARLINK456     (1 << 25)
0086 #define CHINA          (1 << 26)
0087 #define F6MHZ          (1 << 27)
0088 #define INPUT2         (1 << 28)
0089 #define SCODE          (1 << 29)
0090 
0091 /* This flag identifies that the scode table has a new format */
0092 #define HAS_IF         (1 << 30)
0093 
0094 /* There are different scode tables for MTS and non-MTS.
0095    The MTS firmwares support mono only
0096   */
0097 #define SCODE_TYPES (SCODE | MTS)
0098 
0099 
0100 /* Newer types not defined on videodev2.h.
0101    The original idea were to move all those types to videodev2.h, but
0102    it seemed overkill, since, with the exception of SECAM/K3, the other
0103    types seem to be autodetected.
0104    It is not clear where secam/k3 is used, nor we have a feedback of this
0105    working or being autodetected by the standard secam firmware.
0106  */
0107 
0108 #define V4L2_STD_SECAM_K3   (0x04000000)
0109 
0110 /* Audio types */
0111 
0112 #define V4L2_STD_A2_A       (1LL<<32)
0113 #define V4L2_STD_A2_B       (1LL<<33)
0114 #define V4L2_STD_NICAM_A    (1LL<<34)
0115 #define V4L2_STD_NICAM_B    (1LL<<35)
0116 #define V4L2_STD_AM     (1LL<<36)
0117 #define V4L2_STD_BTSC       (1LL<<37)
0118 #define V4L2_STD_EIAJ       (1LL<<38)
0119 
0120 #define V4L2_STD_A2     (V4L2_STD_A2_A    | V4L2_STD_A2_B)
0121 #define V4L2_STD_NICAM      (V4L2_STD_NICAM_A | V4L2_STD_NICAM_B)
0122 
0123 /* To preserve backward compatibility,
0124    (std & V4L2_STD_AUDIO) = 0 means that ALL audio stds are supported
0125  */
0126 
0127 #define V4L2_STD_AUDIO      (V4L2_STD_A2    | \
0128                  V4L2_STD_NICAM | \
0129                  V4L2_STD_AM    | \
0130                  V4L2_STD_BTSC  | \
0131                  V4L2_STD_EIAJ)
0132 
0133 /* Used standards with audio restrictions */
0134 
0135 #define V4L2_STD_PAL_BG_A2_A    (V4L2_STD_PAL_BG | V4L2_STD_A2_A)
0136 #define V4L2_STD_PAL_BG_A2_B    (V4L2_STD_PAL_BG | V4L2_STD_A2_B)
0137 #define V4L2_STD_PAL_BG_NICAM_A (V4L2_STD_PAL_BG | V4L2_STD_NICAM_A)
0138 #define V4L2_STD_PAL_BG_NICAM_B (V4L2_STD_PAL_BG | V4L2_STD_NICAM_B)
0139 #define V4L2_STD_PAL_DK_A2  (V4L2_STD_PAL_DK | V4L2_STD_A2)
0140 #define V4L2_STD_PAL_DK_NICAM   (V4L2_STD_PAL_DK | V4L2_STD_NICAM)
0141 #define V4L2_STD_SECAM_L_NICAM  (V4L2_STD_SECAM_L | V4L2_STD_NICAM)
0142 #define V4L2_STD_SECAM_L_AM (V4L2_STD_SECAM_L | V4L2_STD_AM)