Commit 953cafc04e9ef9d2fd9f8afb3b3bbde1f8bb9317
Committed by
Mauro Carvalho Chehab
1 parent
649e13a95b
Exists in
master
and in
7 other branches
V4L/DVB (9268): tuner: add FMD1216MEX tuner
This tuner was already supported by proxy as an FMD1216ME, however, the MEX uses a different FM Radio IF so this addition is now required. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Showing 5 changed files with 37 additions and 2 deletions Inline Diff
Documentation/video4linux/CARDLIST.tuner
1 | tuner=0 - Temic PAL (4002 FH5) | 1 | tuner=0 - Temic PAL (4002 FH5) |
2 | tuner=1 - Philips PAL_I (FI1246 and compatibles) | 2 | tuner=1 - Philips PAL_I (FI1246 and compatibles) |
3 | tuner=2 - Philips NTSC (FI1236,FM1236 and compatibles) | 3 | tuner=2 - Philips NTSC (FI1236,FM1236 and compatibles) |
4 | tuner=3 - Philips (SECAM+PAL_BG) (FI1216MF, FM1216MF, FR1216MF) | 4 | tuner=3 - Philips (SECAM+PAL_BG) (FI1216MF, FM1216MF, FR1216MF) |
5 | tuner=4 - NoTuner | 5 | tuner=4 - NoTuner |
6 | tuner=5 - Philips PAL_BG (FI1216 and compatibles) | 6 | tuner=5 - Philips PAL_BG (FI1216 and compatibles) |
7 | tuner=6 - Temic NTSC (4032 FY5) | 7 | tuner=6 - Temic NTSC (4032 FY5) |
8 | tuner=7 - Temic PAL_I (4062 FY5) | 8 | tuner=7 - Temic PAL_I (4062 FY5) |
9 | tuner=8 - Temic NTSC (4036 FY5) | 9 | tuner=8 - Temic NTSC (4036 FY5) |
10 | tuner=9 - Alps HSBH1 | 10 | tuner=9 - Alps HSBH1 |
11 | tuner=10 - Alps TSBE1 | 11 | tuner=10 - Alps TSBE1 |
12 | tuner=11 - Alps TSBB5 | 12 | tuner=11 - Alps TSBB5 |
13 | tuner=12 - Alps TSBE5 | 13 | tuner=12 - Alps TSBE5 |
14 | tuner=13 - Alps TSBC5 | 14 | tuner=13 - Alps TSBC5 |
15 | tuner=14 - Temic PAL_BG (4006FH5) | 15 | tuner=14 - Temic PAL_BG (4006FH5) |
16 | tuner=15 - Alps TSCH6 | 16 | tuner=15 - Alps TSCH6 |
17 | tuner=16 - Temic PAL_DK (4016 FY5) | 17 | tuner=16 - Temic PAL_DK (4016 FY5) |
18 | tuner=17 - Philips NTSC_M (MK2) | 18 | tuner=17 - Philips NTSC_M (MK2) |
19 | tuner=18 - Temic PAL_I (4066 FY5) | 19 | tuner=18 - Temic PAL_I (4066 FY5) |
20 | tuner=19 - Temic PAL* auto (4006 FN5) | 20 | tuner=19 - Temic PAL* auto (4006 FN5) |
21 | tuner=20 - Temic PAL_BG (4009 FR5) or PAL_I (4069 FR5) | 21 | tuner=20 - Temic PAL_BG (4009 FR5) or PAL_I (4069 FR5) |
22 | tuner=21 - Temic NTSC (4039 FR5) | 22 | tuner=21 - Temic NTSC (4039 FR5) |
23 | tuner=22 - Temic PAL/SECAM multi (4046 FM5) | 23 | tuner=22 - Temic PAL/SECAM multi (4046 FM5) |
24 | tuner=23 - Philips PAL_DK (FI1256 and compatibles) | 24 | tuner=23 - Philips PAL_DK (FI1256 and compatibles) |
25 | tuner=24 - Philips PAL/SECAM multi (FQ1216ME) | 25 | tuner=24 - Philips PAL/SECAM multi (FQ1216ME) |
26 | tuner=25 - LG PAL_I+FM (TAPC-I001D) | 26 | tuner=25 - LG PAL_I+FM (TAPC-I001D) |
27 | tuner=26 - LG PAL_I (TAPC-I701D) | 27 | tuner=26 - LG PAL_I (TAPC-I701D) |
28 | tuner=27 - LG NTSC+FM (TPI8NSR01F) | 28 | tuner=27 - LG NTSC+FM (TPI8NSR01F) |
29 | tuner=28 - LG PAL_BG+FM (TPI8PSB01D) | 29 | tuner=28 - LG PAL_BG+FM (TPI8PSB01D) |
30 | tuner=29 - LG PAL_BG (TPI8PSB11D) | 30 | tuner=29 - LG PAL_BG (TPI8PSB11D) |
31 | tuner=30 - Temic PAL* auto + FM (4009 FN5) | 31 | tuner=30 - Temic PAL* auto + FM (4009 FN5) |
32 | tuner=31 - SHARP NTSC_JP (2U5JF5540) | 32 | tuner=31 - SHARP NTSC_JP (2U5JF5540) |
33 | tuner=32 - Samsung PAL TCPM9091PD27 | 33 | tuner=32 - Samsung PAL TCPM9091PD27 |
34 | tuner=33 - MT20xx universal | 34 | tuner=33 - MT20xx universal |
35 | tuner=34 - Temic PAL_BG (4106 FH5) | 35 | tuner=34 - Temic PAL_BG (4106 FH5) |
36 | tuner=35 - Temic PAL_DK/SECAM_L (4012 FY5) | 36 | tuner=35 - Temic PAL_DK/SECAM_L (4012 FY5) |
37 | tuner=36 - Temic NTSC (4136 FY5) | 37 | tuner=36 - Temic NTSC (4136 FY5) |
38 | tuner=37 - LG PAL (newer TAPC series) | 38 | tuner=37 - LG PAL (newer TAPC series) |
39 | tuner=38 - Philips PAL/SECAM multi (FM1216ME MK3) | 39 | tuner=38 - Philips PAL/SECAM multi (FM1216ME MK3) |
40 | tuner=39 - LG NTSC (newer TAPC series) | 40 | tuner=39 - LG NTSC (newer TAPC series) |
41 | tuner=40 - HITACHI V7-J180AT | 41 | tuner=40 - HITACHI V7-J180AT |
42 | tuner=41 - Philips PAL_MK (FI1216 MK) | 42 | tuner=41 - Philips PAL_MK (FI1216 MK) |
43 | tuner=42 - Philips FCV1236D ATSC/NTSC dual in | 43 | tuner=42 - Philips FCV1236D ATSC/NTSC dual in |
44 | tuner=43 - Philips NTSC MK3 (FM1236MK3 or FM1236/F) | 44 | tuner=43 - Philips NTSC MK3 (FM1236MK3 or FM1236/F) |
45 | tuner=44 - Philips 4 in 1 (ATI TV Wonder Pro/Conexant) | 45 | tuner=44 - Philips 4 in 1 (ATI TV Wonder Pro/Conexant) |
46 | tuner=45 - Microtune 4049 FM5 | 46 | tuner=45 - Microtune 4049 FM5 |
47 | tuner=46 - Panasonic VP27s/ENGE4324D | 47 | tuner=46 - Panasonic VP27s/ENGE4324D |
48 | tuner=47 - LG NTSC (TAPE series) | 48 | tuner=47 - LG NTSC (TAPE series) |
49 | tuner=48 - Tenna TNF 8831 BGFF) | 49 | tuner=48 - Tenna TNF 8831 BGFF) |
50 | tuner=49 - Microtune 4042 FI5 ATSC/NTSC dual in | 50 | tuner=49 - Microtune 4042 FI5 ATSC/NTSC dual in |
51 | tuner=50 - TCL 2002N | 51 | tuner=50 - TCL 2002N |
52 | tuner=51 - Philips PAL/SECAM_D (FM 1256 I-H3) | 52 | tuner=51 - Philips PAL/SECAM_D (FM 1256 I-H3) |
53 | tuner=52 - Thomson DTT 7610 (ATSC/NTSC) | 53 | tuner=52 - Thomson DTT 7610 (ATSC/NTSC) |
54 | tuner=53 - Philips FQ1286 | 54 | tuner=53 - Philips FQ1286 |
55 | tuner=54 - Philips/NXP TDA 8290/8295 + 8275/8275A/18271 | 55 | tuner=54 - Philips/NXP TDA 8290/8295 + 8275/8275A/18271 |
56 | tuner=55 - TCL 2002MB | 56 | tuner=55 - TCL 2002MB |
57 | tuner=56 - Philips PAL/SECAM multi (FQ1216AME MK4) | 57 | tuner=56 - Philips PAL/SECAM multi (FQ1216AME MK4) |
58 | tuner=57 - Philips FQ1236A MK4 | 58 | tuner=57 - Philips FQ1236A MK4 |
59 | tuner=58 - Ymec TVision TVF-8531MF/8831MF/8731MF | 59 | tuner=58 - Ymec TVision TVF-8531MF/8831MF/8731MF |
60 | tuner=59 - Ymec TVision TVF-5533MF | 60 | tuner=59 - Ymec TVision TVF-5533MF |
61 | tuner=60 - Thomson DTT 761X (ATSC/NTSC) | 61 | tuner=60 - Thomson DTT 761X (ATSC/NTSC) |
62 | tuner=61 - Tena TNF9533-D/IF/TNF9533-B/DF | 62 | tuner=61 - Tena TNF9533-D/IF/TNF9533-B/DF |
63 | tuner=62 - Philips TEA5767HN FM Radio | 63 | tuner=62 - Philips TEA5767HN FM Radio |
64 | tuner=63 - Philips FMD1216ME MK3 Hybrid Tuner | 64 | tuner=63 - Philips FMD1216ME MK3 Hybrid Tuner |
65 | tuner=64 - LG TDVS-H06xF | 65 | tuner=64 - LG TDVS-H06xF |
66 | tuner=65 - Ymec TVF66T5-B/DFF | 66 | tuner=65 - Ymec TVF66T5-B/DFF |
67 | tuner=66 - LG TALN series | 67 | tuner=66 - LG TALN series |
68 | tuner=67 - Philips TD1316 Hybrid Tuner | 68 | tuner=67 - Philips TD1316 Hybrid Tuner |
69 | tuner=68 - Philips TUV1236D ATSC/NTSC dual in | 69 | tuner=68 - Philips TUV1236D ATSC/NTSC dual in |
70 | tuner=69 - Tena TNF 5335 and similar models | 70 | tuner=69 - Tena TNF 5335 and similar models |
71 | tuner=70 - Samsung TCPN 2121P30A | 71 | tuner=70 - Samsung TCPN 2121P30A |
72 | tuner=71 - Xceive xc2028/xc3028 tuner | 72 | tuner=71 - Xceive xc2028/xc3028 tuner |
73 | tuner=72 - Thomson FE6600 | 73 | tuner=72 - Thomson FE6600 |
74 | tuner=73 - Samsung TCPG 6121P30A | 74 | tuner=73 - Samsung TCPG 6121P30A |
75 | tuner=75 - Philips TEA5761 FM Radio | 75 | tuner=75 - Philips TEA5761 FM Radio |
76 | tuner=76 - Xceive 5000 tuner | 76 | tuner=76 - Xceive 5000 tuner |
77 | tuner=77 - TCL tuner MF02GIP-5N-E | 77 | tuner=77 - TCL tuner MF02GIP-5N-E |
78 | tuner=78 - Philips FMD1216MEX MK3 Hybrid Tuner | ||
78 | 79 |
drivers/media/common/tuners/tuner-simple.c
1 | /* | 1 | /* |
2 | * i2c tv tuner chip device driver | 2 | * i2c tv tuner chip device driver |
3 | * controls all those simple 4-control-bytes style tuners. | 3 | * controls all those simple 4-control-bytes style tuners. |
4 | * | 4 | * |
5 | * This "tuner-simple" module was split apart from the original "tuner" module. | 5 | * This "tuner-simple" module was split apart from the original "tuner" module. |
6 | */ | 6 | */ |
7 | #include <linux/delay.h> | 7 | #include <linux/delay.h> |
8 | #include <linux/i2c.h> | 8 | #include <linux/i2c.h> |
9 | #include <linux/videodev2.h> | 9 | #include <linux/videodev2.h> |
10 | #include <media/tuner.h> | 10 | #include <media/tuner.h> |
11 | #include <media/v4l2-common.h> | 11 | #include <media/v4l2-common.h> |
12 | #include <media/tuner-types.h> | 12 | #include <media/tuner-types.h> |
13 | #include "tuner-i2c.h" | 13 | #include "tuner-i2c.h" |
14 | #include "tuner-simple.h" | 14 | #include "tuner-simple.h" |
15 | 15 | ||
16 | static int debug; | 16 | static int debug; |
17 | module_param(debug, int, 0644); | 17 | module_param(debug, int, 0644); |
18 | MODULE_PARM_DESC(debug, "enable verbose debug messages"); | 18 | MODULE_PARM_DESC(debug, "enable verbose debug messages"); |
19 | 19 | ||
20 | #define TUNER_SIMPLE_MAX 64 | 20 | #define TUNER_SIMPLE_MAX 64 |
21 | static unsigned int simple_devcount; | 21 | static unsigned int simple_devcount; |
22 | 22 | ||
23 | static int offset; | 23 | static int offset; |
24 | module_param(offset, int, 0664); | 24 | module_param(offset, int, 0664); |
25 | MODULE_PARM_DESC(offset, "Allows to specify an offset for tuner"); | 25 | MODULE_PARM_DESC(offset, "Allows to specify an offset for tuner"); |
26 | 26 | ||
27 | static unsigned int atv_input[TUNER_SIMPLE_MAX] = \ | 27 | static unsigned int atv_input[TUNER_SIMPLE_MAX] = \ |
28 | { [0 ... (TUNER_SIMPLE_MAX-1)] = 0 }; | 28 | { [0 ... (TUNER_SIMPLE_MAX-1)] = 0 }; |
29 | static unsigned int dtv_input[TUNER_SIMPLE_MAX] = \ | 29 | static unsigned int dtv_input[TUNER_SIMPLE_MAX] = \ |
30 | { [0 ... (TUNER_SIMPLE_MAX-1)] = 0 }; | 30 | { [0 ... (TUNER_SIMPLE_MAX-1)] = 0 }; |
31 | module_param_array(atv_input, int, NULL, 0644); | 31 | module_param_array(atv_input, int, NULL, 0644); |
32 | module_param_array(dtv_input, int, NULL, 0644); | 32 | module_param_array(dtv_input, int, NULL, 0644); |
33 | MODULE_PARM_DESC(atv_input, "specify atv rf input, 0 for autoselect"); | 33 | MODULE_PARM_DESC(atv_input, "specify atv rf input, 0 for autoselect"); |
34 | MODULE_PARM_DESC(dtv_input, "specify dtv rf input, 0 for autoselect"); | 34 | MODULE_PARM_DESC(dtv_input, "specify dtv rf input, 0 for autoselect"); |
35 | 35 | ||
36 | /* ---------------------------------------------------------------------- */ | 36 | /* ---------------------------------------------------------------------- */ |
37 | 37 | ||
38 | /* tv standard selection for Temic 4046 FM5 | 38 | /* tv standard selection for Temic 4046 FM5 |
39 | this value takes the low bits of control byte 2 | 39 | this value takes the low bits of control byte 2 |
40 | from datasheet Rev.01, Feb.00 | 40 | from datasheet Rev.01, Feb.00 |
41 | standard BG I L L2 D | 41 | standard BG I L L2 D |
42 | picture IF 38.9 38.9 38.9 33.95 38.9 | 42 | picture IF 38.9 38.9 38.9 33.95 38.9 |
43 | sound 1 33.4 32.9 32.4 40.45 32.4 | 43 | sound 1 33.4 32.9 32.4 40.45 32.4 |
44 | sound 2 33.16 | 44 | sound 2 33.16 |
45 | NICAM 33.05 32.348 33.05 33.05 | 45 | NICAM 33.05 32.348 33.05 33.05 |
46 | */ | 46 | */ |
47 | #define TEMIC_SET_PAL_I 0x05 | 47 | #define TEMIC_SET_PAL_I 0x05 |
48 | #define TEMIC_SET_PAL_DK 0x09 | 48 | #define TEMIC_SET_PAL_DK 0x09 |
49 | #define TEMIC_SET_PAL_L 0x0a /* SECAM ? */ | 49 | #define TEMIC_SET_PAL_L 0x0a /* SECAM ? */ |
50 | #define TEMIC_SET_PAL_L2 0x0b /* change IF ! */ | 50 | #define TEMIC_SET_PAL_L2 0x0b /* change IF ! */ |
51 | #define TEMIC_SET_PAL_BG 0x0c | 51 | #define TEMIC_SET_PAL_BG 0x0c |
52 | 52 | ||
53 | /* tv tuner system standard selection for Philips FQ1216ME | 53 | /* tv tuner system standard selection for Philips FQ1216ME |
54 | this value takes the low bits of control byte 2 | 54 | this value takes the low bits of control byte 2 |
55 | from datasheet "1999 Nov 16" (supersedes "1999 Mar 23") | 55 | from datasheet "1999 Nov 16" (supersedes "1999 Mar 23") |
56 | standard BG DK I L L` | 56 | standard BG DK I L L` |
57 | picture carrier 38.90 38.90 38.90 38.90 33.95 | 57 | picture carrier 38.90 38.90 38.90 38.90 33.95 |
58 | colour 34.47 34.47 34.47 34.47 38.38 | 58 | colour 34.47 34.47 34.47 34.47 38.38 |
59 | sound 1 33.40 32.40 32.90 32.40 40.45 | 59 | sound 1 33.40 32.40 32.90 32.40 40.45 |
60 | sound 2 33.16 - - - - | 60 | sound 2 33.16 - - - - |
61 | NICAM 33.05 33.05 32.35 33.05 39.80 | 61 | NICAM 33.05 33.05 32.35 33.05 39.80 |
62 | */ | 62 | */ |
63 | #define PHILIPS_SET_PAL_I 0x01 /* Bit 2 always zero !*/ | 63 | #define PHILIPS_SET_PAL_I 0x01 /* Bit 2 always zero !*/ |
64 | #define PHILIPS_SET_PAL_BGDK 0x09 | 64 | #define PHILIPS_SET_PAL_BGDK 0x09 |
65 | #define PHILIPS_SET_PAL_L2 0x0a | 65 | #define PHILIPS_SET_PAL_L2 0x0a |
66 | #define PHILIPS_SET_PAL_L 0x0b | 66 | #define PHILIPS_SET_PAL_L 0x0b |
67 | 67 | ||
68 | /* system switching for Philips FI1216MF MK2 | 68 | /* system switching for Philips FI1216MF MK2 |
69 | from datasheet "1996 Jul 09", | 69 | from datasheet "1996 Jul 09", |
70 | standard BG L L' | 70 | standard BG L L' |
71 | picture carrier 38.90 38.90 33.95 | 71 | picture carrier 38.90 38.90 33.95 |
72 | colour 34.47 34.37 38.38 | 72 | colour 34.47 34.37 38.38 |
73 | sound 1 33.40 32.40 40.45 | 73 | sound 1 33.40 32.40 40.45 |
74 | sound 2 33.16 - - | 74 | sound 2 33.16 - - |
75 | NICAM 33.05 33.05 39.80 | 75 | NICAM 33.05 33.05 39.80 |
76 | */ | 76 | */ |
77 | #define PHILIPS_MF_SET_STD_BG 0x01 /* Bit 2 must be zero, Bit 3 is system output */ | 77 | #define PHILIPS_MF_SET_STD_BG 0x01 /* Bit 2 must be zero, Bit 3 is system output */ |
78 | #define PHILIPS_MF_SET_STD_L 0x03 /* Used on Secam France */ | 78 | #define PHILIPS_MF_SET_STD_L 0x03 /* Used on Secam France */ |
79 | #define PHILIPS_MF_SET_STD_LC 0x02 /* Used on SECAM L' */ | 79 | #define PHILIPS_MF_SET_STD_LC 0x02 /* Used on SECAM L' */ |
80 | 80 | ||
81 | /* Control byte */ | 81 | /* Control byte */ |
82 | 82 | ||
83 | #define TUNER_RATIO_MASK 0x06 /* Bit cb1:cb2 */ | 83 | #define TUNER_RATIO_MASK 0x06 /* Bit cb1:cb2 */ |
84 | #define TUNER_RATIO_SELECT_50 0x00 | 84 | #define TUNER_RATIO_SELECT_50 0x00 |
85 | #define TUNER_RATIO_SELECT_32 0x02 | 85 | #define TUNER_RATIO_SELECT_32 0x02 |
86 | #define TUNER_RATIO_SELECT_166 0x04 | 86 | #define TUNER_RATIO_SELECT_166 0x04 |
87 | #define TUNER_RATIO_SELECT_62 0x06 | 87 | #define TUNER_RATIO_SELECT_62 0x06 |
88 | 88 | ||
89 | #define TUNER_CHARGE_PUMP 0x40 /* Bit cb6 */ | 89 | #define TUNER_CHARGE_PUMP 0x40 /* Bit cb6 */ |
90 | 90 | ||
91 | /* Status byte */ | 91 | /* Status byte */ |
92 | 92 | ||
93 | #define TUNER_POR 0x80 | 93 | #define TUNER_POR 0x80 |
94 | #define TUNER_FL 0x40 | 94 | #define TUNER_FL 0x40 |
95 | #define TUNER_MODE 0x38 | 95 | #define TUNER_MODE 0x38 |
96 | #define TUNER_AFC 0x07 | 96 | #define TUNER_AFC 0x07 |
97 | #define TUNER_SIGNAL 0x07 | 97 | #define TUNER_SIGNAL 0x07 |
98 | #define TUNER_STEREO 0x10 | 98 | #define TUNER_STEREO 0x10 |
99 | 99 | ||
100 | #define TUNER_PLL_LOCKED 0x40 | 100 | #define TUNER_PLL_LOCKED 0x40 |
101 | #define TUNER_STEREO_MK3 0x04 | 101 | #define TUNER_STEREO_MK3 0x04 |
102 | 102 | ||
103 | static DEFINE_MUTEX(tuner_simple_list_mutex); | 103 | static DEFINE_MUTEX(tuner_simple_list_mutex); |
104 | static LIST_HEAD(hybrid_tuner_instance_list); | 104 | static LIST_HEAD(hybrid_tuner_instance_list); |
105 | 105 | ||
106 | struct tuner_simple_priv { | 106 | struct tuner_simple_priv { |
107 | unsigned int nr; | 107 | unsigned int nr; |
108 | u16 last_div; | 108 | u16 last_div; |
109 | 109 | ||
110 | struct tuner_i2c_props i2c_props; | 110 | struct tuner_i2c_props i2c_props; |
111 | struct list_head hybrid_tuner_instance_list; | 111 | struct list_head hybrid_tuner_instance_list; |
112 | 112 | ||
113 | unsigned int type; | 113 | unsigned int type; |
114 | struct tunertype *tun; | 114 | struct tunertype *tun; |
115 | 115 | ||
116 | u32 frequency; | 116 | u32 frequency; |
117 | u32 bandwidth; | 117 | u32 bandwidth; |
118 | }; | 118 | }; |
119 | 119 | ||
120 | /* ---------------------------------------------------------------------- */ | 120 | /* ---------------------------------------------------------------------- */ |
121 | 121 | ||
122 | static int tuner_read_status(struct dvb_frontend *fe) | 122 | static int tuner_read_status(struct dvb_frontend *fe) |
123 | { | 123 | { |
124 | struct tuner_simple_priv *priv = fe->tuner_priv; | 124 | struct tuner_simple_priv *priv = fe->tuner_priv; |
125 | unsigned char byte; | 125 | unsigned char byte; |
126 | 126 | ||
127 | if (1 != tuner_i2c_xfer_recv(&priv->i2c_props, &byte, 1)) | 127 | if (1 != tuner_i2c_xfer_recv(&priv->i2c_props, &byte, 1)) |
128 | return 0; | 128 | return 0; |
129 | 129 | ||
130 | return byte; | 130 | return byte; |
131 | } | 131 | } |
132 | 132 | ||
133 | static inline int tuner_signal(const int status) | 133 | static inline int tuner_signal(const int status) |
134 | { | 134 | { |
135 | return (status & TUNER_SIGNAL) << 13; | 135 | return (status & TUNER_SIGNAL) << 13; |
136 | } | 136 | } |
137 | 137 | ||
138 | static inline int tuner_stereo(const int type, const int status) | 138 | static inline int tuner_stereo(const int type, const int status) |
139 | { | 139 | { |
140 | switch (type) { | 140 | switch (type) { |
141 | case TUNER_PHILIPS_FM1216ME_MK3: | 141 | case TUNER_PHILIPS_FM1216ME_MK3: |
142 | case TUNER_PHILIPS_FM1236_MK3: | 142 | case TUNER_PHILIPS_FM1236_MK3: |
143 | case TUNER_PHILIPS_FM1256_IH3: | 143 | case TUNER_PHILIPS_FM1256_IH3: |
144 | case TUNER_LG_NTSC_TAPE: | 144 | case TUNER_LG_NTSC_TAPE: |
145 | case TUNER_TCL_MF02GIP_5N: | 145 | case TUNER_TCL_MF02GIP_5N: |
146 | return ((status & TUNER_SIGNAL) == TUNER_STEREO_MK3); | 146 | return ((status & TUNER_SIGNAL) == TUNER_STEREO_MK3); |
147 | default: | 147 | default: |
148 | return status & TUNER_STEREO; | 148 | return status & TUNER_STEREO; |
149 | } | 149 | } |
150 | } | 150 | } |
151 | 151 | ||
152 | static inline int tuner_islocked(const int status) | 152 | static inline int tuner_islocked(const int status) |
153 | { | 153 | { |
154 | return (status & TUNER_FL); | 154 | return (status & TUNER_FL); |
155 | } | 155 | } |
156 | 156 | ||
157 | static inline int tuner_afcstatus(const int status) | 157 | static inline int tuner_afcstatus(const int status) |
158 | { | 158 | { |
159 | return (status & TUNER_AFC) - 2; | 159 | return (status & TUNER_AFC) - 2; |
160 | } | 160 | } |
161 | 161 | ||
162 | 162 | ||
163 | static int simple_get_status(struct dvb_frontend *fe, u32 *status) | 163 | static int simple_get_status(struct dvb_frontend *fe, u32 *status) |
164 | { | 164 | { |
165 | struct tuner_simple_priv *priv = fe->tuner_priv; | 165 | struct tuner_simple_priv *priv = fe->tuner_priv; |
166 | int tuner_status; | 166 | int tuner_status; |
167 | 167 | ||
168 | if (priv->i2c_props.adap == NULL) | 168 | if (priv->i2c_props.adap == NULL) |
169 | return -EINVAL; | 169 | return -EINVAL; |
170 | 170 | ||
171 | tuner_status = tuner_read_status(fe); | 171 | tuner_status = tuner_read_status(fe); |
172 | 172 | ||
173 | *status = 0; | 173 | *status = 0; |
174 | 174 | ||
175 | if (tuner_islocked(tuner_status)) | 175 | if (tuner_islocked(tuner_status)) |
176 | *status = TUNER_STATUS_LOCKED; | 176 | *status = TUNER_STATUS_LOCKED; |
177 | if (tuner_stereo(priv->type, tuner_status)) | 177 | if (tuner_stereo(priv->type, tuner_status)) |
178 | *status |= TUNER_STATUS_STEREO; | 178 | *status |= TUNER_STATUS_STEREO; |
179 | 179 | ||
180 | tuner_dbg("AFC Status: %d\n", tuner_afcstatus(tuner_status)); | 180 | tuner_dbg("AFC Status: %d\n", tuner_afcstatus(tuner_status)); |
181 | 181 | ||
182 | return 0; | 182 | return 0; |
183 | } | 183 | } |
184 | 184 | ||
185 | static int simple_get_rf_strength(struct dvb_frontend *fe, u16 *strength) | 185 | static int simple_get_rf_strength(struct dvb_frontend *fe, u16 *strength) |
186 | { | 186 | { |
187 | struct tuner_simple_priv *priv = fe->tuner_priv; | 187 | struct tuner_simple_priv *priv = fe->tuner_priv; |
188 | int signal; | 188 | int signal; |
189 | 189 | ||
190 | if (priv->i2c_props.adap == NULL) | 190 | if (priv->i2c_props.adap == NULL) |
191 | return -EINVAL; | 191 | return -EINVAL; |
192 | 192 | ||
193 | signal = tuner_signal(tuner_read_status(fe)); | 193 | signal = tuner_signal(tuner_read_status(fe)); |
194 | 194 | ||
195 | *strength = signal; | 195 | *strength = signal; |
196 | 196 | ||
197 | tuner_dbg("Signal strength: %d\n", signal); | 197 | tuner_dbg("Signal strength: %d\n", signal); |
198 | 198 | ||
199 | return 0; | 199 | return 0; |
200 | } | 200 | } |
201 | 201 | ||
202 | /* ---------------------------------------------------------------------- */ | 202 | /* ---------------------------------------------------------------------- */ |
203 | 203 | ||
204 | static inline char *tuner_param_name(enum param_type type) | 204 | static inline char *tuner_param_name(enum param_type type) |
205 | { | 205 | { |
206 | char *name; | 206 | char *name; |
207 | 207 | ||
208 | switch (type) { | 208 | switch (type) { |
209 | case TUNER_PARAM_TYPE_RADIO: | 209 | case TUNER_PARAM_TYPE_RADIO: |
210 | name = "radio"; | 210 | name = "radio"; |
211 | break; | 211 | break; |
212 | case TUNER_PARAM_TYPE_PAL: | 212 | case TUNER_PARAM_TYPE_PAL: |
213 | name = "pal"; | 213 | name = "pal"; |
214 | break; | 214 | break; |
215 | case TUNER_PARAM_TYPE_SECAM: | 215 | case TUNER_PARAM_TYPE_SECAM: |
216 | name = "secam"; | 216 | name = "secam"; |
217 | break; | 217 | break; |
218 | case TUNER_PARAM_TYPE_NTSC: | 218 | case TUNER_PARAM_TYPE_NTSC: |
219 | name = "ntsc"; | 219 | name = "ntsc"; |
220 | break; | 220 | break; |
221 | case TUNER_PARAM_TYPE_DIGITAL: | 221 | case TUNER_PARAM_TYPE_DIGITAL: |
222 | name = "digital"; | 222 | name = "digital"; |
223 | break; | 223 | break; |
224 | default: | 224 | default: |
225 | name = "unknown"; | 225 | name = "unknown"; |
226 | break; | 226 | break; |
227 | } | 227 | } |
228 | return name; | 228 | return name; |
229 | } | 229 | } |
230 | 230 | ||
231 | static struct tuner_params *simple_tuner_params(struct dvb_frontend *fe, | 231 | static struct tuner_params *simple_tuner_params(struct dvb_frontend *fe, |
232 | enum param_type desired_type) | 232 | enum param_type desired_type) |
233 | { | 233 | { |
234 | struct tuner_simple_priv *priv = fe->tuner_priv; | 234 | struct tuner_simple_priv *priv = fe->tuner_priv; |
235 | struct tunertype *tun = priv->tun; | 235 | struct tunertype *tun = priv->tun; |
236 | int i; | 236 | int i; |
237 | 237 | ||
238 | for (i = 0; i < tun->count; i++) | 238 | for (i = 0; i < tun->count; i++) |
239 | if (desired_type == tun->params[i].type) | 239 | if (desired_type == tun->params[i].type) |
240 | break; | 240 | break; |
241 | 241 | ||
242 | /* use default tuner params if desired_type not available */ | 242 | /* use default tuner params if desired_type not available */ |
243 | if (i == tun->count) { | 243 | if (i == tun->count) { |
244 | tuner_dbg("desired params (%s) undefined for tuner %d\n", | 244 | tuner_dbg("desired params (%s) undefined for tuner %d\n", |
245 | tuner_param_name(desired_type), priv->type); | 245 | tuner_param_name(desired_type), priv->type); |
246 | i = 0; | 246 | i = 0; |
247 | } | 247 | } |
248 | 248 | ||
249 | tuner_dbg("using tuner params #%d (%s)\n", i, | 249 | tuner_dbg("using tuner params #%d (%s)\n", i, |
250 | tuner_param_name(tun->params[i].type)); | 250 | tuner_param_name(tun->params[i].type)); |
251 | 251 | ||
252 | return &tun->params[i]; | 252 | return &tun->params[i]; |
253 | } | 253 | } |
254 | 254 | ||
255 | static int simple_config_lookup(struct dvb_frontend *fe, | 255 | static int simple_config_lookup(struct dvb_frontend *fe, |
256 | struct tuner_params *t_params, | 256 | struct tuner_params *t_params, |
257 | unsigned *frequency, u8 *config, u8 *cb) | 257 | unsigned *frequency, u8 *config, u8 *cb) |
258 | { | 258 | { |
259 | struct tuner_simple_priv *priv = fe->tuner_priv; | 259 | struct tuner_simple_priv *priv = fe->tuner_priv; |
260 | int i; | 260 | int i; |
261 | 261 | ||
262 | for (i = 0; i < t_params->count; i++) { | 262 | for (i = 0; i < t_params->count; i++) { |
263 | if (*frequency > t_params->ranges[i].limit) | 263 | if (*frequency > t_params->ranges[i].limit) |
264 | continue; | 264 | continue; |
265 | break; | 265 | break; |
266 | } | 266 | } |
267 | if (i == t_params->count) { | 267 | if (i == t_params->count) { |
268 | tuner_dbg("frequency out of range (%d > %d)\n", | 268 | tuner_dbg("frequency out of range (%d > %d)\n", |
269 | *frequency, t_params->ranges[i - 1].limit); | 269 | *frequency, t_params->ranges[i - 1].limit); |
270 | *frequency = t_params->ranges[--i].limit; | 270 | *frequency = t_params->ranges[--i].limit; |
271 | } | 271 | } |
272 | *config = t_params->ranges[i].config; | 272 | *config = t_params->ranges[i].config; |
273 | *cb = t_params->ranges[i].cb; | 273 | *cb = t_params->ranges[i].cb; |
274 | 274 | ||
275 | tuner_dbg("freq = %d.%02d (%d), range = %d, " | 275 | tuner_dbg("freq = %d.%02d (%d), range = %d, " |
276 | "config = 0x%02x, cb = 0x%02x\n", | 276 | "config = 0x%02x, cb = 0x%02x\n", |
277 | *frequency / 16, *frequency % 16 * 100 / 16, *frequency, | 277 | *frequency / 16, *frequency % 16 * 100 / 16, *frequency, |
278 | i, *config, *cb); | 278 | i, *config, *cb); |
279 | 279 | ||
280 | return i; | 280 | return i; |
281 | } | 281 | } |
282 | 282 | ||
283 | /* ---------------------------------------------------------------------- */ | 283 | /* ---------------------------------------------------------------------- */ |
284 | 284 | ||
285 | static void simple_set_rf_input(struct dvb_frontend *fe, | 285 | static void simple_set_rf_input(struct dvb_frontend *fe, |
286 | u8 *config, u8 *cb, unsigned int rf) | 286 | u8 *config, u8 *cb, unsigned int rf) |
287 | { | 287 | { |
288 | struct tuner_simple_priv *priv = fe->tuner_priv; | 288 | struct tuner_simple_priv *priv = fe->tuner_priv; |
289 | 289 | ||
290 | switch (priv->type) { | 290 | switch (priv->type) { |
291 | case TUNER_PHILIPS_TUV1236D: | 291 | case TUNER_PHILIPS_TUV1236D: |
292 | switch (rf) { | 292 | switch (rf) { |
293 | case 1: | 293 | case 1: |
294 | *cb |= 0x08; | 294 | *cb |= 0x08; |
295 | break; | 295 | break; |
296 | default: | 296 | default: |
297 | *cb &= ~0x08; | 297 | *cb &= ~0x08; |
298 | break; | 298 | break; |
299 | } | 299 | } |
300 | break; | 300 | break; |
301 | case TUNER_PHILIPS_FCV1236D: | 301 | case TUNER_PHILIPS_FCV1236D: |
302 | switch (rf) { | 302 | switch (rf) { |
303 | case 1: | 303 | case 1: |
304 | *cb |= 0x01; | 304 | *cb |= 0x01; |
305 | break; | 305 | break; |
306 | default: | 306 | default: |
307 | *cb &= ~0x01; | 307 | *cb &= ~0x01; |
308 | break; | 308 | break; |
309 | } | 309 | } |
310 | break; | 310 | break; |
311 | default: | 311 | default: |
312 | break; | 312 | break; |
313 | } | 313 | } |
314 | } | 314 | } |
315 | 315 | ||
316 | static int simple_std_setup(struct dvb_frontend *fe, | 316 | static int simple_std_setup(struct dvb_frontend *fe, |
317 | struct analog_parameters *params, | 317 | struct analog_parameters *params, |
318 | u8 *config, u8 *cb) | 318 | u8 *config, u8 *cb) |
319 | { | 319 | { |
320 | struct tuner_simple_priv *priv = fe->tuner_priv; | 320 | struct tuner_simple_priv *priv = fe->tuner_priv; |
321 | u8 tuneraddr; | 321 | u8 tuneraddr; |
322 | int rc; | 322 | int rc; |
323 | 323 | ||
324 | /* tv norm specific stuff for multi-norm tuners */ | 324 | /* tv norm specific stuff for multi-norm tuners */ |
325 | switch (priv->type) { | 325 | switch (priv->type) { |
326 | case TUNER_PHILIPS_SECAM: /* FI1216MF */ | 326 | case TUNER_PHILIPS_SECAM: /* FI1216MF */ |
327 | /* 0x01 -> ??? no change ??? */ | 327 | /* 0x01 -> ??? no change ??? */ |
328 | /* 0x02 -> PAL BDGHI / SECAM L */ | 328 | /* 0x02 -> PAL BDGHI / SECAM L */ |
329 | /* 0x04 -> ??? PAL others / SECAM others ??? */ | 329 | /* 0x04 -> ??? PAL others / SECAM others ??? */ |
330 | *cb &= ~0x03; | 330 | *cb &= ~0x03; |
331 | if (params->std & V4L2_STD_SECAM_L) | 331 | if (params->std & V4L2_STD_SECAM_L) |
332 | /* also valid for V4L2_STD_SECAM */ | 332 | /* also valid for V4L2_STD_SECAM */ |
333 | *cb |= PHILIPS_MF_SET_STD_L; | 333 | *cb |= PHILIPS_MF_SET_STD_L; |
334 | else if (params->std & V4L2_STD_SECAM_LC) | 334 | else if (params->std & V4L2_STD_SECAM_LC) |
335 | *cb |= PHILIPS_MF_SET_STD_LC; | 335 | *cb |= PHILIPS_MF_SET_STD_LC; |
336 | else /* V4L2_STD_B|V4L2_STD_GH */ | 336 | else /* V4L2_STD_B|V4L2_STD_GH */ |
337 | *cb |= PHILIPS_MF_SET_STD_BG; | 337 | *cb |= PHILIPS_MF_SET_STD_BG; |
338 | break; | 338 | break; |
339 | 339 | ||
340 | case TUNER_TEMIC_4046FM5: | 340 | case TUNER_TEMIC_4046FM5: |
341 | *cb &= ~0x0f; | 341 | *cb &= ~0x0f; |
342 | 342 | ||
343 | if (params->std & V4L2_STD_PAL_BG) { | 343 | if (params->std & V4L2_STD_PAL_BG) { |
344 | *cb |= TEMIC_SET_PAL_BG; | 344 | *cb |= TEMIC_SET_PAL_BG; |
345 | 345 | ||
346 | } else if (params->std & V4L2_STD_PAL_I) { | 346 | } else if (params->std & V4L2_STD_PAL_I) { |
347 | *cb |= TEMIC_SET_PAL_I; | 347 | *cb |= TEMIC_SET_PAL_I; |
348 | 348 | ||
349 | } else if (params->std & V4L2_STD_PAL_DK) { | 349 | } else if (params->std & V4L2_STD_PAL_DK) { |
350 | *cb |= TEMIC_SET_PAL_DK; | 350 | *cb |= TEMIC_SET_PAL_DK; |
351 | 351 | ||
352 | } else if (params->std & V4L2_STD_SECAM_L) { | 352 | } else if (params->std & V4L2_STD_SECAM_L) { |
353 | *cb |= TEMIC_SET_PAL_L; | 353 | *cb |= TEMIC_SET_PAL_L; |
354 | 354 | ||
355 | } | 355 | } |
356 | break; | 356 | break; |
357 | 357 | ||
358 | case TUNER_PHILIPS_FQ1216ME: | 358 | case TUNER_PHILIPS_FQ1216ME: |
359 | *cb &= ~0x0f; | 359 | *cb &= ~0x0f; |
360 | 360 | ||
361 | if (params->std & (V4L2_STD_PAL_BG|V4L2_STD_PAL_DK)) { | 361 | if (params->std & (V4L2_STD_PAL_BG|V4L2_STD_PAL_DK)) { |
362 | *cb |= PHILIPS_SET_PAL_BGDK; | 362 | *cb |= PHILIPS_SET_PAL_BGDK; |
363 | 363 | ||
364 | } else if (params->std & V4L2_STD_PAL_I) { | 364 | } else if (params->std & V4L2_STD_PAL_I) { |
365 | *cb |= PHILIPS_SET_PAL_I; | 365 | *cb |= PHILIPS_SET_PAL_I; |
366 | 366 | ||
367 | } else if (params->std & V4L2_STD_SECAM_L) { | 367 | } else if (params->std & V4L2_STD_SECAM_L) { |
368 | *cb |= PHILIPS_SET_PAL_L; | 368 | *cb |= PHILIPS_SET_PAL_L; |
369 | 369 | ||
370 | } | 370 | } |
371 | break; | 371 | break; |
372 | 372 | ||
373 | case TUNER_PHILIPS_FCV1236D: | 373 | case TUNER_PHILIPS_FCV1236D: |
374 | /* 0x00 -> ATSC antenna input 1 */ | 374 | /* 0x00 -> ATSC antenna input 1 */ |
375 | /* 0x01 -> ATSC antenna input 2 */ | 375 | /* 0x01 -> ATSC antenna input 2 */ |
376 | /* 0x02 -> NTSC antenna input 1 */ | 376 | /* 0x02 -> NTSC antenna input 1 */ |
377 | /* 0x03 -> NTSC antenna input 2 */ | 377 | /* 0x03 -> NTSC antenna input 2 */ |
378 | *cb &= ~0x03; | 378 | *cb &= ~0x03; |
379 | if (!(params->std & V4L2_STD_ATSC)) | 379 | if (!(params->std & V4L2_STD_ATSC)) |
380 | *cb |= 2; | 380 | *cb |= 2; |
381 | break; | 381 | break; |
382 | 382 | ||
383 | case TUNER_MICROTUNE_4042FI5: | 383 | case TUNER_MICROTUNE_4042FI5: |
384 | /* Set the charge pump for fast tuning */ | 384 | /* Set the charge pump for fast tuning */ |
385 | *config |= TUNER_CHARGE_PUMP; | 385 | *config |= TUNER_CHARGE_PUMP; |
386 | break; | 386 | break; |
387 | 387 | ||
388 | case TUNER_PHILIPS_TUV1236D: | 388 | case TUNER_PHILIPS_TUV1236D: |
389 | { | 389 | { |
390 | /* 0x40 -> ATSC antenna input 1 */ | 390 | /* 0x40 -> ATSC antenna input 1 */ |
391 | /* 0x48 -> ATSC antenna input 2 */ | 391 | /* 0x48 -> ATSC antenna input 2 */ |
392 | /* 0x00 -> NTSC antenna input 1 */ | 392 | /* 0x00 -> NTSC antenna input 1 */ |
393 | /* 0x08 -> NTSC antenna input 2 */ | 393 | /* 0x08 -> NTSC antenna input 2 */ |
394 | u8 buffer[4] = { 0x14, 0x00, 0x17, 0x00}; | 394 | u8 buffer[4] = { 0x14, 0x00, 0x17, 0x00}; |
395 | *cb &= ~0x40; | 395 | *cb &= ~0x40; |
396 | if (params->std & V4L2_STD_ATSC) { | 396 | if (params->std & V4L2_STD_ATSC) { |
397 | *cb |= 0x40; | 397 | *cb |= 0x40; |
398 | buffer[1] = 0x04; | 398 | buffer[1] = 0x04; |
399 | } | 399 | } |
400 | /* set to the correct mode (analog or digital) */ | 400 | /* set to the correct mode (analog or digital) */ |
401 | tuneraddr = priv->i2c_props.addr; | 401 | tuneraddr = priv->i2c_props.addr; |
402 | priv->i2c_props.addr = 0x0a; | 402 | priv->i2c_props.addr = 0x0a; |
403 | rc = tuner_i2c_xfer_send(&priv->i2c_props, &buffer[0], 2); | 403 | rc = tuner_i2c_xfer_send(&priv->i2c_props, &buffer[0], 2); |
404 | if (2 != rc) | 404 | if (2 != rc) |
405 | tuner_warn("i2c i/o error: rc == %d " | 405 | tuner_warn("i2c i/o error: rc == %d " |
406 | "(should be 2)\n", rc); | 406 | "(should be 2)\n", rc); |
407 | rc = tuner_i2c_xfer_send(&priv->i2c_props, &buffer[2], 2); | 407 | rc = tuner_i2c_xfer_send(&priv->i2c_props, &buffer[2], 2); |
408 | if (2 != rc) | 408 | if (2 != rc) |
409 | tuner_warn("i2c i/o error: rc == %d " | 409 | tuner_warn("i2c i/o error: rc == %d " |
410 | "(should be 2)\n", rc); | 410 | "(should be 2)\n", rc); |
411 | priv->i2c_props.addr = tuneraddr; | 411 | priv->i2c_props.addr = tuneraddr; |
412 | break; | 412 | break; |
413 | } | 413 | } |
414 | } | 414 | } |
415 | if (atv_input[priv->nr]) | 415 | if (atv_input[priv->nr]) |
416 | simple_set_rf_input(fe, config, cb, atv_input[priv->nr]); | 416 | simple_set_rf_input(fe, config, cb, atv_input[priv->nr]); |
417 | 417 | ||
418 | return 0; | 418 | return 0; |
419 | } | 419 | } |
420 | 420 | ||
421 | static int simple_post_tune(struct dvb_frontend *fe, u8 *buffer, | 421 | static int simple_post_tune(struct dvb_frontend *fe, u8 *buffer, |
422 | u16 div, u8 config, u8 cb) | 422 | u16 div, u8 config, u8 cb) |
423 | { | 423 | { |
424 | struct tuner_simple_priv *priv = fe->tuner_priv; | 424 | struct tuner_simple_priv *priv = fe->tuner_priv; |
425 | int rc; | 425 | int rc; |
426 | 426 | ||
427 | switch (priv->type) { | 427 | switch (priv->type) { |
428 | case TUNER_LG_TDVS_H06XF: | 428 | case TUNER_LG_TDVS_H06XF: |
429 | /* Set the Auxiliary Byte. */ | 429 | /* Set the Auxiliary Byte. */ |
430 | buffer[0] = buffer[2]; | 430 | buffer[0] = buffer[2]; |
431 | buffer[0] &= ~0x20; | 431 | buffer[0] &= ~0x20; |
432 | buffer[0] |= 0x18; | 432 | buffer[0] |= 0x18; |
433 | buffer[1] = 0x20; | 433 | buffer[1] = 0x20; |
434 | tuner_dbg("tv 0x%02x 0x%02x\n", buffer[0], buffer[1]); | 434 | tuner_dbg("tv 0x%02x 0x%02x\n", buffer[0], buffer[1]); |
435 | 435 | ||
436 | rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer, 2); | 436 | rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer, 2); |
437 | if (2 != rc) | 437 | if (2 != rc) |
438 | tuner_warn("i2c i/o error: rc == %d " | 438 | tuner_warn("i2c i/o error: rc == %d " |
439 | "(should be 2)\n", rc); | 439 | "(should be 2)\n", rc); |
440 | break; | 440 | break; |
441 | case TUNER_MICROTUNE_4042FI5: | 441 | case TUNER_MICROTUNE_4042FI5: |
442 | { | 442 | { |
443 | /* FIXME - this may also work for other tuners */ | 443 | /* FIXME - this may also work for other tuners */ |
444 | unsigned long timeout = jiffies + msecs_to_jiffies(1); | 444 | unsigned long timeout = jiffies + msecs_to_jiffies(1); |
445 | u8 status_byte = 0; | 445 | u8 status_byte = 0; |
446 | 446 | ||
447 | /* Wait until the PLL locks */ | 447 | /* Wait until the PLL locks */ |
448 | for (;;) { | 448 | for (;;) { |
449 | if (time_after(jiffies, timeout)) | 449 | if (time_after(jiffies, timeout)) |
450 | return 0; | 450 | return 0; |
451 | rc = tuner_i2c_xfer_recv(&priv->i2c_props, | 451 | rc = tuner_i2c_xfer_recv(&priv->i2c_props, |
452 | &status_byte, 1); | 452 | &status_byte, 1); |
453 | if (1 != rc) { | 453 | if (1 != rc) { |
454 | tuner_warn("i2c i/o read error: rc == %d " | 454 | tuner_warn("i2c i/o read error: rc == %d " |
455 | "(should be 1)\n", rc); | 455 | "(should be 1)\n", rc); |
456 | break; | 456 | break; |
457 | } | 457 | } |
458 | if (status_byte & TUNER_PLL_LOCKED) | 458 | if (status_byte & TUNER_PLL_LOCKED) |
459 | break; | 459 | break; |
460 | udelay(10); | 460 | udelay(10); |
461 | } | 461 | } |
462 | 462 | ||
463 | /* Set the charge pump for optimized phase noise figure */ | 463 | /* Set the charge pump for optimized phase noise figure */ |
464 | config &= ~TUNER_CHARGE_PUMP; | 464 | config &= ~TUNER_CHARGE_PUMP; |
465 | buffer[0] = (div>>8) & 0x7f; | 465 | buffer[0] = (div>>8) & 0x7f; |
466 | buffer[1] = div & 0xff; | 466 | buffer[1] = div & 0xff; |
467 | buffer[2] = config; | 467 | buffer[2] = config; |
468 | buffer[3] = cb; | 468 | buffer[3] = cb; |
469 | tuner_dbg("tv 0x%02x 0x%02x 0x%02x 0x%02x\n", | 469 | tuner_dbg("tv 0x%02x 0x%02x 0x%02x 0x%02x\n", |
470 | buffer[0], buffer[1], buffer[2], buffer[3]); | 470 | buffer[0], buffer[1], buffer[2], buffer[3]); |
471 | 471 | ||
472 | rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer, 4); | 472 | rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer, 4); |
473 | if (4 != rc) | 473 | if (4 != rc) |
474 | tuner_warn("i2c i/o error: rc == %d " | 474 | tuner_warn("i2c i/o error: rc == %d " |
475 | "(should be 4)\n", rc); | 475 | "(should be 4)\n", rc); |
476 | break; | 476 | break; |
477 | } | 477 | } |
478 | } | 478 | } |
479 | 479 | ||
480 | return 0; | 480 | return 0; |
481 | } | 481 | } |
482 | 482 | ||
483 | static int simple_radio_bandswitch(struct dvb_frontend *fe, u8 *buffer) | 483 | static int simple_radio_bandswitch(struct dvb_frontend *fe, u8 *buffer) |
484 | { | 484 | { |
485 | struct tuner_simple_priv *priv = fe->tuner_priv; | 485 | struct tuner_simple_priv *priv = fe->tuner_priv; |
486 | 486 | ||
487 | switch (priv->type) { | 487 | switch (priv->type) { |
488 | case TUNER_TENA_9533_DI: | 488 | case TUNER_TENA_9533_DI: |
489 | case TUNER_YMEC_TVF_5533MF: | 489 | case TUNER_YMEC_TVF_5533MF: |
490 | tuner_dbg("This tuner doesn't have FM. " | 490 | tuner_dbg("This tuner doesn't have FM. " |
491 | "Most cards have a TEA5767 for FM\n"); | 491 | "Most cards have a TEA5767 for FM\n"); |
492 | return 0; | 492 | return 0; |
493 | case TUNER_PHILIPS_FM1216ME_MK3: | 493 | case TUNER_PHILIPS_FM1216ME_MK3: |
494 | case TUNER_PHILIPS_FM1236_MK3: | 494 | case TUNER_PHILIPS_FM1236_MK3: |
495 | case TUNER_PHILIPS_FMD1216ME_MK3: | 495 | case TUNER_PHILIPS_FMD1216ME_MK3: |
496 | case TUNER_PHILIPS_FMD1216MEX_MK3: | ||
496 | case TUNER_LG_NTSC_TAPE: | 497 | case TUNER_LG_NTSC_TAPE: |
497 | case TUNER_PHILIPS_FM1256_IH3: | 498 | case TUNER_PHILIPS_FM1256_IH3: |
498 | case TUNER_TCL_MF02GIP_5N: | 499 | case TUNER_TCL_MF02GIP_5N: |
499 | buffer[3] = 0x19; | 500 | buffer[3] = 0x19; |
500 | break; | 501 | break; |
501 | case TUNER_TNF_5335MF: | 502 | case TUNER_TNF_5335MF: |
502 | buffer[3] = 0x11; | 503 | buffer[3] = 0x11; |
503 | break; | 504 | break; |
504 | case TUNER_LG_PAL_FM: | 505 | case TUNER_LG_PAL_FM: |
505 | buffer[3] = 0xa5; | 506 | buffer[3] = 0xa5; |
506 | break; | 507 | break; |
507 | case TUNER_THOMSON_DTT761X: | 508 | case TUNER_THOMSON_DTT761X: |
508 | buffer[3] = 0x39; | 509 | buffer[3] = 0x39; |
509 | break; | 510 | break; |
510 | case TUNER_MICROTUNE_4049FM5: | 511 | case TUNER_MICROTUNE_4049FM5: |
511 | default: | 512 | default: |
512 | buffer[3] = 0xa4; | 513 | buffer[3] = 0xa4; |
513 | break; | 514 | break; |
514 | } | 515 | } |
515 | 516 | ||
516 | return 0; | 517 | return 0; |
517 | } | 518 | } |
518 | 519 | ||
519 | /* ---------------------------------------------------------------------- */ | 520 | /* ---------------------------------------------------------------------- */ |
520 | 521 | ||
521 | static int simple_set_tv_freq(struct dvb_frontend *fe, | 522 | static int simple_set_tv_freq(struct dvb_frontend *fe, |
522 | struct analog_parameters *params) | 523 | struct analog_parameters *params) |
523 | { | 524 | { |
524 | struct tuner_simple_priv *priv = fe->tuner_priv; | 525 | struct tuner_simple_priv *priv = fe->tuner_priv; |
525 | u8 config, cb; | 526 | u8 config, cb; |
526 | u16 div; | 527 | u16 div; |
527 | struct tunertype *tun; | 528 | struct tunertype *tun; |
528 | u8 buffer[4]; | 529 | u8 buffer[4]; |
529 | int rc, IFPCoff, i; | 530 | int rc, IFPCoff, i; |
530 | enum param_type desired_type; | 531 | enum param_type desired_type; |
531 | struct tuner_params *t_params; | 532 | struct tuner_params *t_params; |
532 | 533 | ||
533 | tun = priv->tun; | 534 | tun = priv->tun; |
534 | 535 | ||
535 | /* IFPCoff = Video Intermediate Frequency - Vif: | 536 | /* IFPCoff = Video Intermediate Frequency - Vif: |
536 | 940 =16*58.75 NTSC/J (Japan) | 537 | 940 =16*58.75 NTSC/J (Japan) |
537 | 732 =16*45.75 M/N STD | 538 | 732 =16*45.75 M/N STD |
538 | 704 =16*44 ATSC (at DVB code) | 539 | 704 =16*44 ATSC (at DVB code) |
539 | 632 =16*39.50 I U.K. | 540 | 632 =16*39.50 I U.K. |
540 | 622.4=16*38.90 B/G D/K I, L STD | 541 | 622.4=16*38.90 B/G D/K I, L STD |
541 | 592 =16*37.00 D China | 542 | 592 =16*37.00 D China |
542 | 590 =16.36.875 B Australia | 543 | 590 =16.36.875 B Australia |
543 | 543.2=16*33.95 L' STD | 544 | 543.2=16*33.95 L' STD |
544 | 171.2=16*10.70 FM Radio (at set_radio_freq) | 545 | 171.2=16*10.70 FM Radio (at set_radio_freq) |
545 | */ | 546 | */ |
546 | 547 | ||
547 | if (params->std == V4L2_STD_NTSC_M_JP) { | 548 | if (params->std == V4L2_STD_NTSC_M_JP) { |
548 | IFPCoff = 940; | 549 | IFPCoff = 940; |
549 | desired_type = TUNER_PARAM_TYPE_NTSC; | 550 | desired_type = TUNER_PARAM_TYPE_NTSC; |
550 | } else if ((params->std & V4L2_STD_MN) && | 551 | } else if ((params->std & V4L2_STD_MN) && |
551 | !(params->std & ~V4L2_STD_MN)) { | 552 | !(params->std & ~V4L2_STD_MN)) { |
552 | IFPCoff = 732; | 553 | IFPCoff = 732; |
553 | desired_type = TUNER_PARAM_TYPE_NTSC; | 554 | desired_type = TUNER_PARAM_TYPE_NTSC; |
554 | } else if (params->std == V4L2_STD_SECAM_LC) { | 555 | } else if (params->std == V4L2_STD_SECAM_LC) { |
555 | IFPCoff = 543; | 556 | IFPCoff = 543; |
556 | desired_type = TUNER_PARAM_TYPE_SECAM; | 557 | desired_type = TUNER_PARAM_TYPE_SECAM; |
557 | } else { | 558 | } else { |
558 | IFPCoff = 623; | 559 | IFPCoff = 623; |
559 | desired_type = TUNER_PARAM_TYPE_PAL; | 560 | desired_type = TUNER_PARAM_TYPE_PAL; |
560 | } | 561 | } |
561 | 562 | ||
562 | t_params = simple_tuner_params(fe, desired_type); | 563 | t_params = simple_tuner_params(fe, desired_type); |
563 | 564 | ||
564 | i = simple_config_lookup(fe, t_params, ¶ms->frequency, | 565 | i = simple_config_lookup(fe, t_params, ¶ms->frequency, |
565 | &config, &cb); | 566 | &config, &cb); |
566 | 567 | ||
567 | div = params->frequency + IFPCoff + offset; | 568 | div = params->frequency + IFPCoff + offset; |
568 | 569 | ||
569 | tuner_dbg("Freq= %d.%02d MHz, V_IF=%d.%02d MHz, " | 570 | tuner_dbg("Freq= %d.%02d MHz, V_IF=%d.%02d MHz, " |
570 | "Offset=%d.%02d MHz, div=%0d\n", | 571 | "Offset=%d.%02d MHz, div=%0d\n", |
571 | params->frequency / 16, params->frequency % 16 * 100 / 16, | 572 | params->frequency / 16, params->frequency % 16 * 100 / 16, |
572 | IFPCoff / 16, IFPCoff % 16 * 100 / 16, | 573 | IFPCoff / 16, IFPCoff % 16 * 100 / 16, |
573 | offset / 16, offset % 16 * 100 / 16, div); | 574 | offset / 16, offset % 16 * 100 / 16, div); |
574 | 575 | ||
575 | /* tv norm specific stuff for multi-norm tuners */ | 576 | /* tv norm specific stuff for multi-norm tuners */ |
576 | simple_std_setup(fe, params, &config, &cb); | 577 | simple_std_setup(fe, params, &config, &cb); |
577 | 578 | ||
578 | if (t_params->cb_first_if_lower_freq && div < priv->last_div) { | 579 | if (t_params->cb_first_if_lower_freq && div < priv->last_div) { |
579 | buffer[0] = config; | 580 | buffer[0] = config; |
580 | buffer[1] = cb; | 581 | buffer[1] = cb; |
581 | buffer[2] = (div>>8) & 0x7f; | 582 | buffer[2] = (div>>8) & 0x7f; |
582 | buffer[3] = div & 0xff; | 583 | buffer[3] = div & 0xff; |
583 | } else { | 584 | } else { |
584 | buffer[0] = (div>>8) & 0x7f; | 585 | buffer[0] = (div>>8) & 0x7f; |
585 | buffer[1] = div & 0xff; | 586 | buffer[1] = div & 0xff; |
586 | buffer[2] = config; | 587 | buffer[2] = config; |
587 | buffer[3] = cb; | 588 | buffer[3] = cb; |
588 | } | 589 | } |
589 | priv->last_div = div; | 590 | priv->last_div = div; |
590 | if (t_params->has_tda9887) { | 591 | if (t_params->has_tda9887) { |
591 | struct v4l2_priv_tun_config tda9887_cfg; | 592 | struct v4l2_priv_tun_config tda9887_cfg; |
592 | int tda_config = 0; | 593 | int tda_config = 0; |
593 | int is_secam_l = (params->std & (V4L2_STD_SECAM_L | | 594 | int is_secam_l = (params->std & (V4L2_STD_SECAM_L | |
594 | V4L2_STD_SECAM_LC)) && | 595 | V4L2_STD_SECAM_LC)) && |
595 | !(params->std & ~(V4L2_STD_SECAM_L | | 596 | !(params->std & ~(V4L2_STD_SECAM_L | |
596 | V4L2_STD_SECAM_LC)); | 597 | V4L2_STD_SECAM_LC)); |
597 | 598 | ||
598 | tda9887_cfg.tuner = TUNER_TDA9887; | 599 | tda9887_cfg.tuner = TUNER_TDA9887; |
599 | tda9887_cfg.priv = &tda_config; | 600 | tda9887_cfg.priv = &tda_config; |
600 | 601 | ||
601 | if (params->std == V4L2_STD_SECAM_LC) { | 602 | if (params->std == V4L2_STD_SECAM_LC) { |
602 | if (t_params->port1_active ^ t_params->port1_invert_for_secam_lc) | 603 | if (t_params->port1_active ^ t_params->port1_invert_for_secam_lc) |
603 | tda_config |= TDA9887_PORT1_ACTIVE; | 604 | tda_config |= TDA9887_PORT1_ACTIVE; |
604 | if (t_params->port2_active ^ t_params->port2_invert_for_secam_lc) | 605 | if (t_params->port2_active ^ t_params->port2_invert_for_secam_lc) |
605 | tda_config |= TDA9887_PORT2_ACTIVE; | 606 | tda_config |= TDA9887_PORT2_ACTIVE; |
606 | } else { | 607 | } else { |
607 | if (t_params->port1_active) | 608 | if (t_params->port1_active) |
608 | tda_config |= TDA9887_PORT1_ACTIVE; | 609 | tda_config |= TDA9887_PORT1_ACTIVE; |
609 | if (t_params->port2_active) | 610 | if (t_params->port2_active) |
610 | tda_config |= TDA9887_PORT2_ACTIVE; | 611 | tda_config |= TDA9887_PORT2_ACTIVE; |
611 | } | 612 | } |
612 | if (t_params->intercarrier_mode) | 613 | if (t_params->intercarrier_mode) |
613 | tda_config |= TDA9887_INTERCARRIER; | 614 | tda_config |= TDA9887_INTERCARRIER; |
614 | if (is_secam_l) { | 615 | if (is_secam_l) { |
615 | if (i == 0 && t_params->default_top_secam_low) | 616 | if (i == 0 && t_params->default_top_secam_low) |
616 | tda_config |= TDA9887_TOP(t_params->default_top_secam_low); | 617 | tda_config |= TDA9887_TOP(t_params->default_top_secam_low); |
617 | else if (i == 1 && t_params->default_top_secam_mid) | 618 | else if (i == 1 && t_params->default_top_secam_mid) |
618 | tda_config |= TDA9887_TOP(t_params->default_top_secam_mid); | 619 | tda_config |= TDA9887_TOP(t_params->default_top_secam_mid); |
619 | else if (t_params->default_top_secam_high) | 620 | else if (t_params->default_top_secam_high) |
620 | tda_config |= TDA9887_TOP(t_params->default_top_secam_high); | 621 | tda_config |= TDA9887_TOP(t_params->default_top_secam_high); |
621 | } else { | 622 | } else { |
622 | if (i == 0 && t_params->default_top_low) | 623 | if (i == 0 && t_params->default_top_low) |
623 | tda_config |= TDA9887_TOP(t_params->default_top_low); | 624 | tda_config |= TDA9887_TOP(t_params->default_top_low); |
624 | else if (i == 1 && t_params->default_top_mid) | 625 | else if (i == 1 && t_params->default_top_mid) |
625 | tda_config |= TDA9887_TOP(t_params->default_top_mid); | 626 | tda_config |= TDA9887_TOP(t_params->default_top_mid); |
626 | else if (t_params->default_top_high) | 627 | else if (t_params->default_top_high) |
627 | tda_config |= TDA9887_TOP(t_params->default_top_high); | 628 | tda_config |= TDA9887_TOP(t_params->default_top_high); |
628 | } | 629 | } |
629 | if (t_params->default_pll_gating_18) | 630 | if (t_params->default_pll_gating_18) |
630 | tda_config |= TDA9887_GATING_18; | 631 | tda_config |= TDA9887_GATING_18; |
631 | i2c_clients_command(priv->i2c_props.adap, TUNER_SET_CONFIG, | 632 | i2c_clients_command(priv->i2c_props.adap, TUNER_SET_CONFIG, |
632 | &tda9887_cfg); | 633 | &tda9887_cfg); |
633 | } | 634 | } |
634 | tuner_dbg("tv 0x%02x 0x%02x 0x%02x 0x%02x\n", | 635 | tuner_dbg("tv 0x%02x 0x%02x 0x%02x 0x%02x\n", |
635 | buffer[0], buffer[1], buffer[2], buffer[3]); | 636 | buffer[0], buffer[1], buffer[2], buffer[3]); |
636 | 637 | ||
637 | rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer, 4); | 638 | rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer, 4); |
638 | if (4 != rc) | 639 | if (4 != rc) |
639 | tuner_warn("i2c i/o error: rc == %d (should be 4)\n", rc); | 640 | tuner_warn("i2c i/o error: rc == %d (should be 4)\n", rc); |
640 | 641 | ||
641 | simple_post_tune(fe, &buffer[0], div, config, cb); | 642 | simple_post_tune(fe, &buffer[0], div, config, cb); |
642 | 643 | ||
643 | return 0; | 644 | return 0; |
644 | } | 645 | } |
645 | 646 | ||
646 | static int simple_set_radio_freq(struct dvb_frontend *fe, | 647 | static int simple_set_radio_freq(struct dvb_frontend *fe, |
647 | struct analog_parameters *params) | 648 | struct analog_parameters *params) |
648 | { | 649 | { |
649 | struct tunertype *tun; | 650 | struct tunertype *tun; |
650 | struct tuner_simple_priv *priv = fe->tuner_priv; | 651 | struct tuner_simple_priv *priv = fe->tuner_priv; |
651 | u8 buffer[4]; | 652 | u8 buffer[4]; |
652 | u16 div; | 653 | u16 div; |
653 | int rc, j; | 654 | int rc, j; |
654 | struct tuner_params *t_params; | 655 | struct tuner_params *t_params; |
655 | unsigned int freq = params->frequency; | 656 | unsigned int freq = params->frequency; |
656 | 657 | ||
657 | tun = priv->tun; | 658 | tun = priv->tun; |
658 | 659 | ||
659 | for (j = tun->count-1; j > 0; j--) | 660 | for (j = tun->count-1; j > 0; j--) |
660 | if (tun->params[j].type == TUNER_PARAM_TYPE_RADIO) | 661 | if (tun->params[j].type == TUNER_PARAM_TYPE_RADIO) |
661 | break; | 662 | break; |
662 | /* default t_params (j=0) will be used if desired type wasn't found */ | 663 | /* default t_params (j=0) will be used if desired type wasn't found */ |
663 | t_params = &tun->params[j]; | 664 | t_params = &tun->params[j]; |
664 | 665 | ||
665 | /* Select Radio 1st IF used */ | 666 | /* Select Radio 1st IF used */ |
666 | switch (t_params->radio_if) { | 667 | switch (t_params->radio_if) { |
667 | case 0: /* 10.7 MHz */ | 668 | case 0: /* 10.7 MHz */ |
668 | freq += (unsigned int)(10.7*16000); | 669 | freq += (unsigned int)(10.7*16000); |
669 | break; | 670 | break; |
670 | case 1: /* 33.3 MHz */ | 671 | case 1: /* 33.3 MHz */ |
671 | freq += (unsigned int)(33.3*16000); | 672 | freq += (unsigned int)(33.3*16000); |
672 | break; | 673 | break; |
673 | case 2: /* 41.3 MHz */ | 674 | case 2: /* 41.3 MHz */ |
674 | freq += (unsigned int)(41.3*16000); | 675 | freq += (unsigned int)(41.3*16000); |
675 | break; | 676 | break; |
676 | default: | 677 | default: |
677 | tuner_warn("Unsupported radio_if value %d\n", | 678 | tuner_warn("Unsupported radio_if value %d\n", |
678 | t_params->radio_if); | 679 | t_params->radio_if); |
679 | return 0; | 680 | return 0; |
680 | } | 681 | } |
681 | 682 | ||
682 | /* Bandswitch byte */ | 683 | /* Bandswitch byte */ |
683 | simple_radio_bandswitch(fe, &buffer[0]); | 684 | simple_radio_bandswitch(fe, &buffer[0]); |
684 | 685 | ||
685 | buffer[2] = (t_params->ranges[0].config & ~TUNER_RATIO_MASK) | | 686 | buffer[2] = (t_params->ranges[0].config & ~TUNER_RATIO_MASK) | |
686 | TUNER_RATIO_SELECT_50; /* 50 kHz step */ | 687 | TUNER_RATIO_SELECT_50; /* 50 kHz step */ |
687 | 688 | ||
688 | /* Convert from 1/16 kHz V4L steps to 1/20 MHz (=50 kHz) PLL steps | 689 | /* Convert from 1/16 kHz V4L steps to 1/20 MHz (=50 kHz) PLL steps |
689 | freq * (1 Mhz / 16000 V4L steps) * (20 PLL steps / 1 MHz) = | 690 | freq * (1 Mhz / 16000 V4L steps) * (20 PLL steps / 1 MHz) = |
690 | freq * (1/800) */ | 691 | freq * (1/800) */ |
691 | div = (freq + 400) / 800; | 692 | div = (freq + 400) / 800; |
692 | 693 | ||
693 | if (t_params->cb_first_if_lower_freq && div < priv->last_div) { | 694 | if (t_params->cb_first_if_lower_freq && div < priv->last_div) { |
694 | buffer[0] = buffer[2]; | 695 | buffer[0] = buffer[2]; |
695 | buffer[1] = buffer[3]; | 696 | buffer[1] = buffer[3]; |
696 | buffer[2] = (div>>8) & 0x7f; | 697 | buffer[2] = (div>>8) & 0x7f; |
697 | buffer[3] = div & 0xff; | 698 | buffer[3] = div & 0xff; |
698 | } else { | 699 | } else { |
699 | buffer[0] = (div>>8) & 0x7f; | 700 | buffer[0] = (div>>8) & 0x7f; |
700 | buffer[1] = div & 0xff; | 701 | buffer[1] = div & 0xff; |
701 | } | 702 | } |
702 | 703 | ||
703 | tuner_dbg("radio 0x%02x 0x%02x 0x%02x 0x%02x\n", | 704 | tuner_dbg("radio 0x%02x 0x%02x 0x%02x 0x%02x\n", |
704 | buffer[0], buffer[1], buffer[2], buffer[3]); | 705 | buffer[0], buffer[1], buffer[2], buffer[3]); |
705 | priv->last_div = div; | 706 | priv->last_div = div; |
706 | 707 | ||
707 | if (t_params->has_tda9887) { | 708 | if (t_params->has_tda9887) { |
708 | int config = 0; | 709 | int config = 0; |
709 | struct v4l2_priv_tun_config tda9887_cfg; | 710 | struct v4l2_priv_tun_config tda9887_cfg; |
710 | 711 | ||
711 | tda9887_cfg.tuner = TUNER_TDA9887; | 712 | tda9887_cfg.tuner = TUNER_TDA9887; |
712 | tda9887_cfg.priv = &config; | 713 | tda9887_cfg.priv = &config; |
713 | 714 | ||
714 | if (t_params->port1_active && | 715 | if (t_params->port1_active && |
715 | !t_params->port1_fm_high_sensitivity) | 716 | !t_params->port1_fm_high_sensitivity) |
716 | config |= TDA9887_PORT1_ACTIVE; | 717 | config |= TDA9887_PORT1_ACTIVE; |
717 | if (t_params->port2_active && | 718 | if (t_params->port2_active && |
718 | !t_params->port2_fm_high_sensitivity) | 719 | !t_params->port2_fm_high_sensitivity) |
719 | config |= TDA9887_PORT2_ACTIVE; | 720 | config |= TDA9887_PORT2_ACTIVE; |
720 | if (t_params->intercarrier_mode) | 721 | if (t_params->intercarrier_mode) |
721 | config |= TDA9887_INTERCARRIER; | 722 | config |= TDA9887_INTERCARRIER; |
722 | /* if (t_params->port1_set_for_fm_mono) | 723 | /* if (t_params->port1_set_for_fm_mono) |
723 | config &= ~TDA9887_PORT1_ACTIVE;*/ | 724 | config &= ~TDA9887_PORT1_ACTIVE;*/ |
724 | if (t_params->fm_gain_normal) | 725 | if (t_params->fm_gain_normal) |
725 | config |= TDA9887_GAIN_NORMAL; | 726 | config |= TDA9887_GAIN_NORMAL; |
726 | if (t_params->radio_if == 2) | 727 | if (t_params->radio_if == 2) |
727 | config |= TDA9887_RIF_41_3; | 728 | config |= TDA9887_RIF_41_3; |
728 | i2c_clients_command(priv->i2c_props.adap, TUNER_SET_CONFIG, | 729 | i2c_clients_command(priv->i2c_props.adap, TUNER_SET_CONFIG, |
729 | &tda9887_cfg); | 730 | &tda9887_cfg); |
730 | } | 731 | } |
731 | rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer, 4); | 732 | rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer, 4); |
732 | if (4 != rc) | 733 | if (4 != rc) |
733 | tuner_warn("i2c i/o error: rc == %d (should be 4)\n", rc); | 734 | tuner_warn("i2c i/o error: rc == %d (should be 4)\n", rc); |
734 | 735 | ||
735 | return 0; | 736 | return 0; |
736 | } | 737 | } |
737 | 738 | ||
738 | static int simple_set_params(struct dvb_frontend *fe, | 739 | static int simple_set_params(struct dvb_frontend *fe, |
739 | struct analog_parameters *params) | 740 | struct analog_parameters *params) |
740 | { | 741 | { |
741 | struct tuner_simple_priv *priv = fe->tuner_priv; | 742 | struct tuner_simple_priv *priv = fe->tuner_priv; |
742 | int ret = -EINVAL; | 743 | int ret = -EINVAL; |
743 | 744 | ||
744 | if (priv->i2c_props.adap == NULL) | 745 | if (priv->i2c_props.adap == NULL) |
745 | return -EINVAL; | 746 | return -EINVAL; |
746 | 747 | ||
747 | switch (params->mode) { | 748 | switch (params->mode) { |
748 | case V4L2_TUNER_RADIO: | 749 | case V4L2_TUNER_RADIO: |
749 | ret = simple_set_radio_freq(fe, params); | 750 | ret = simple_set_radio_freq(fe, params); |
750 | priv->frequency = params->frequency * 125 / 2; | 751 | priv->frequency = params->frequency * 125 / 2; |
751 | break; | 752 | break; |
752 | case V4L2_TUNER_ANALOG_TV: | 753 | case V4L2_TUNER_ANALOG_TV: |
753 | case V4L2_TUNER_DIGITAL_TV: | 754 | case V4L2_TUNER_DIGITAL_TV: |
754 | ret = simple_set_tv_freq(fe, params); | 755 | ret = simple_set_tv_freq(fe, params); |
755 | priv->frequency = params->frequency * 62500; | 756 | priv->frequency = params->frequency * 62500; |
756 | break; | 757 | break; |
757 | } | 758 | } |
758 | priv->bandwidth = 0; | 759 | priv->bandwidth = 0; |
759 | 760 | ||
760 | return ret; | 761 | return ret; |
761 | } | 762 | } |
762 | 763 | ||
763 | static void simple_set_dvb(struct dvb_frontend *fe, u8 *buf, | 764 | static void simple_set_dvb(struct dvb_frontend *fe, u8 *buf, |
764 | const struct dvb_frontend_parameters *params) | 765 | const struct dvb_frontend_parameters *params) |
765 | { | 766 | { |
766 | struct tuner_simple_priv *priv = fe->tuner_priv; | 767 | struct tuner_simple_priv *priv = fe->tuner_priv; |
767 | 768 | ||
768 | switch (priv->type) { | 769 | switch (priv->type) { |
769 | case TUNER_PHILIPS_FMD1216ME_MK3: | 770 | case TUNER_PHILIPS_FMD1216ME_MK3: |
771 | case TUNER_PHILIPS_FMD1216MEX_MK3: | ||
770 | if (params->u.ofdm.bandwidth == BANDWIDTH_8_MHZ && | 772 | if (params->u.ofdm.bandwidth == BANDWIDTH_8_MHZ && |
771 | params->frequency >= 158870000) | 773 | params->frequency >= 158870000) |
772 | buf[3] |= 0x08; | 774 | buf[3] |= 0x08; |
773 | break; | 775 | break; |
774 | case TUNER_PHILIPS_TD1316: | 776 | case TUNER_PHILIPS_TD1316: |
775 | /* determine band */ | 777 | /* determine band */ |
776 | buf[3] |= (params->frequency < 161000000) ? 1 : | 778 | buf[3] |= (params->frequency < 161000000) ? 1 : |
777 | (params->frequency < 444000000) ? 2 : 4; | 779 | (params->frequency < 444000000) ? 2 : 4; |
778 | 780 | ||
779 | /* setup PLL filter */ | 781 | /* setup PLL filter */ |
780 | if (params->u.ofdm.bandwidth == BANDWIDTH_8_MHZ) | 782 | if (params->u.ofdm.bandwidth == BANDWIDTH_8_MHZ) |
781 | buf[3] |= 1 << 3; | 783 | buf[3] |= 1 << 3; |
782 | break; | 784 | break; |
783 | case TUNER_PHILIPS_TUV1236D: | 785 | case TUNER_PHILIPS_TUV1236D: |
784 | case TUNER_PHILIPS_FCV1236D: | 786 | case TUNER_PHILIPS_FCV1236D: |
785 | { | 787 | { |
786 | unsigned int new_rf; | 788 | unsigned int new_rf; |
787 | 789 | ||
788 | if (dtv_input[priv->nr]) | 790 | if (dtv_input[priv->nr]) |
789 | new_rf = dtv_input[priv->nr]; | 791 | new_rf = dtv_input[priv->nr]; |
790 | else | 792 | else |
791 | switch (params->u.vsb.modulation) { | 793 | switch (params->u.vsb.modulation) { |
792 | case QAM_64: | 794 | case QAM_64: |
793 | case QAM_256: | 795 | case QAM_256: |
794 | new_rf = 1; | 796 | new_rf = 1; |
795 | break; | 797 | break; |
796 | case VSB_8: | 798 | case VSB_8: |
797 | default: | 799 | default: |
798 | new_rf = 0; | 800 | new_rf = 0; |
799 | break; | 801 | break; |
800 | } | 802 | } |
801 | simple_set_rf_input(fe, &buf[2], &buf[3], new_rf); | 803 | simple_set_rf_input(fe, &buf[2], &buf[3], new_rf); |
802 | break; | 804 | break; |
803 | } | 805 | } |
804 | default: | 806 | default: |
805 | break; | 807 | break; |
806 | } | 808 | } |
807 | } | 809 | } |
808 | 810 | ||
809 | static u32 simple_dvb_configure(struct dvb_frontend *fe, u8 *buf, | 811 | static u32 simple_dvb_configure(struct dvb_frontend *fe, u8 *buf, |
810 | const struct dvb_frontend_parameters *params) | 812 | const struct dvb_frontend_parameters *params) |
811 | { | 813 | { |
812 | /* This function returns the tuned frequency on success, 0 on error */ | 814 | /* This function returns the tuned frequency on success, 0 on error */ |
813 | struct tuner_simple_priv *priv = fe->tuner_priv; | 815 | struct tuner_simple_priv *priv = fe->tuner_priv; |
814 | struct tunertype *tun = priv->tun; | 816 | struct tunertype *tun = priv->tun; |
815 | static struct tuner_params *t_params; | 817 | static struct tuner_params *t_params; |
816 | u8 config, cb; | 818 | u8 config, cb; |
817 | u32 div; | 819 | u32 div; |
818 | int ret; | 820 | int ret; |
819 | unsigned frequency = params->frequency / 62500; | 821 | unsigned frequency = params->frequency / 62500; |
820 | 822 | ||
821 | t_params = simple_tuner_params(fe, TUNER_PARAM_TYPE_DIGITAL); | 823 | t_params = simple_tuner_params(fe, TUNER_PARAM_TYPE_DIGITAL); |
822 | ret = simple_config_lookup(fe, t_params, &frequency, &config, &cb); | 824 | ret = simple_config_lookup(fe, t_params, &frequency, &config, &cb); |
823 | if (ret < 0) | 825 | if (ret < 0) |
824 | return 0; /* failure */ | 826 | return 0; /* failure */ |
825 | 827 | ||
826 | div = ((frequency + t_params->iffreq) * 62500 + offset + | 828 | div = ((frequency + t_params->iffreq) * 62500 + offset + |
827 | tun->stepsize/2) / tun->stepsize; | 829 | tun->stepsize/2) / tun->stepsize; |
828 | 830 | ||
829 | buf[0] = div >> 8; | 831 | buf[0] = div >> 8; |
830 | buf[1] = div & 0xff; | 832 | buf[1] = div & 0xff; |
831 | buf[2] = config; | 833 | buf[2] = config; |
832 | buf[3] = cb; | 834 | buf[3] = cb; |
833 | 835 | ||
834 | simple_set_dvb(fe, buf, params); | 836 | simple_set_dvb(fe, buf, params); |
835 | 837 | ||
836 | tuner_dbg("%s: div=%d | buf=0x%02x,0x%02x,0x%02x,0x%02x\n", | 838 | tuner_dbg("%s: div=%d | buf=0x%02x,0x%02x,0x%02x,0x%02x\n", |
837 | tun->name, div, buf[0], buf[1], buf[2], buf[3]); | 839 | tun->name, div, buf[0], buf[1], buf[2], buf[3]); |
838 | 840 | ||
839 | /* calculate the frequency we set it to */ | 841 | /* calculate the frequency we set it to */ |
840 | return (div * tun->stepsize) - t_params->iffreq; | 842 | return (div * tun->stepsize) - t_params->iffreq; |
841 | } | 843 | } |
842 | 844 | ||
843 | static int simple_dvb_calc_regs(struct dvb_frontend *fe, | 845 | static int simple_dvb_calc_regs(struct dvb_frontend *fe, |
844 | struct dvb_frontend_parameters *params, | 846 | struct dvb_frontend_parameters *params, |
845 | u8 *buf, int buf_len) | 847 | u8 *buf, int buf_len) |
846 | { | 848 | { |
847 | struct tuner_simple_priv *priv = fe->tuner_priv; | 849 | struct tuner_simple_priv *priv = fe->tuner_priv; |
848 | u32 frequency; | 850 | u32 frequency; |
849 | 851 | ||
850 | if (buf_len < 5) | 852 | if (buf_len < 5) |
851 | return -EINVAL; | 853 | return -EINVAL; |
852 | 854 | ||
853 | frequency = simple_dvb_configure(fe, buf+1, params); | 855 | frequency = simple_dvb_configure(fe, buf+1, params); |
854 | if (frequency == 0) | 856 | if (frequency == 0) |
855 | return -EINVAL; | 857 | return -EINVAL; |
856 | 858 | ||
857 | buf[0] = priv->i2c_props.addr; | 859 | buf[0] = priv->i2c_props.addr; |
858 | 860 | ||
859 | priv->frequency = frequency; | 861 | priv->frequency = frequency; |
860 | priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? | 862 | priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? |
861 | params->u.ofdm.bandwidth : 0; | 863 | params->u.ofdm.bandwidth : 0; |
862 | 864 | ||
863 | return 5; | 865 | return 5; |
864 | } | 866 | } |
865 | 867 | ||
866 | static int simple_dvb_set_params(struct dvb_frontend *fe, | 868 | static int simple_dvb_set_params(struct dvb_frontend *fe, |
867 | struct dvb_frontend_parameters *params) | 869 | struct dvb_frontend_parameters *params) |
868 | { | 870 | { |
869 | struct tuner_simple_priv *priv = fe->tuner_priv; | 871 | struct tuner_simple_priv *priv = fe->tuner_priv; |
870 | u32 prev_freq, prev_bw; | 872 | u32 prev_freq, prev_bw; |
871 | int ret; | 873 | int ret; |
872 | u8 buf[5]; | 874 | u8 buf[5]; |
873 | 875 | ||
874 | if (priv->i2c_props.adap == NULL) | 876 | if (priv->i2c_props.adap == NULL) |
875 | return -EINVAL; | 877 | return -EINVAL; |
876 | 878 | ||
877 | prev_freq = priv->frequency; | 879 | prev_freq = priv->frequency; |
878 | prev_bw = priv->bandwidth; | 880 | prev_bw = priv->bandwidth; |
879 | 881 | ||
880 | ret = simple_dvb_calc_regs(fe, params, buf, 5); | 882 | ret = simple_dvb_calc_regs(fe, params, buf, 5); |
881 | if (ret != 5) | 883 | if (ret != 5) |
882 | goto fail; | 884 | goto fail; |
883 | 885 | ||
884 | /* put analog demod in standby when tuning digital */ | 886 | /* put analog demod in standby when tuning digital */ |
885 | if (fe->ops.analog_ops.standby) | 887 | if (fe->ops.analog_ops.standby) |
886 | fe->ops.analog_ops.standby(fe); | 888 | fe->ops.analog_ops.standby(fe); |
887 | 889 | ||
888 | if (fe->ops.i2c_gate_ctrl) | 890 | if (fe->ops.i2c_gate_ctrl) |
889 | fe->ops.i2c_gate_ctrl(fe, 1); | 891 | fe->ops.i2c_gate_ctrl(fe, 1); |
890 | 892 | ||
891 | /* buf[0] contains the i2c address, but * | 893 | /* buf[0] contains the i2c address, but * |
892 | * we already have it in i2c_props.addr */ | 894 | * we already have it in i2c_props.addr */ |
893 | ret = tuner_i2c_xfer_send(&priv->i2c_props, buf+1, 4); | 895 | ret = tuner_i2c_xfer_send(&priv->i2c_props, buf+1, 4); |
894 | if (ret != 4) | 896 | if (ret != 4) |
895 | goto fail; | 897 | goto fail; |
896 | 898 | ||
897 | return 0; | 899 | return 0; |
898 | fail: | 900 | fail: |
899 | /* calc_regs sets frequency and bandwidth. if we failed, unset them */ | 901 | /* calc_regs sets frequency and bandwidth. if we failed, unset them */ |
900 | priv->frequency = prev_freq; | 902 | priv->frequency = prev_freq; |
901 | priv->bandwidth = prev_bw; | 903 | priv->bandwidth = prev_bw; |
902 | 904 | ||
903 | return ret; | 905 | return ret; |
904 | } | 906 | } |
905 | 907 | ||
906 | static int simple_init(struct dvb_frontend *fe) | 908 | static int simple_init(struct dvb_frontend *fe) |
907 | { | 909 | { |
908 | struct tuner_simple_priv *priv = fe->tuner_priv; | 910 | struct tuner_simple_priv *priv = fe->tuner_priv; |
909 | 911 | ||
910 | if (priv->i2c_props.adap == NULL) | 912 | if (priv->i2c_props.adap == NULL) |
911 | return -EINVAL; | 913 | return -EINVAL; |
912 | 914 | ||
913 | if (priv->tun->initdata) { | 915 | if (priv->tun->initdata) { |
914 | int ret; | 916 | int ret; |
915 | 917 | ||
916 | if (fe->ops.i2c_gate_ctrl) | 918 | if (fe->ops.i2c_gate_ctrl) |
917 | fe->ops.i2c_gate_ctrl(fe, 1); | 919 | fe->ops.i2c_gate_ctrl(fe, 1); |
918 | 920 | ||
919 | ret = tuner_i2c_xfer_send(&priv->i2c_props, | 921 | ret = tuner_i2c_xfer_send(&priv->i2c_props, |
920 | priv->tun->initdata + 1, | 922 | priv->tun->initdata + 1, |
921 | priv->tun->initdata[0]); | 923 | priv->tun->initdata[0]); |
922 | if (ret != priv->tun->initdata[0]) | 924 | if (ret != priv->tun->initdata[0]) |
923 | return ret; | 925 | return ret; |
924 | } | 926 | } |
925 | 927 | ||
926 | return 0; | 928 | return 0; |
927 | } | 929 | } |
928 | 930 | ||
929 | static int simple_sleep(struct dvb_frontend *fe) | 931 | static int simple_sleep(struct dvb_frontend *fe) |
930 | { | 932 | { |
931 | struct tuner_simple_priv *priv = fe->tuner_priv; | 933 | struct tuner_simple_priv *priv = fe->tuner_priv; |
932 | 934 | ||
933 | if (priv->i2c_props.adap == NULL) | 935 | if (priv->i2c_props.adap == NULL) |
934 | return -EINVAL; | 936 | return -EINVAL; |
935 | 937 | ||
936 | if (priv->tun->sleepdata) { | 938 | if (priv->tun->sleepdata) { |
937 | int ret; | 939 | int ret; |
938 | 940 | ||
939 | if (fe->ops.i2c_gate_ctrl) | 941 | if (fe->ops.i2c_gate_ctrl) |
940 | fe->ops.i2c_gate_ctrl(fe, 1); | 942 | fe->ops.i2c_gate_ctrl(fe, 1); |
941 | 943 | ||
942 | ret = tuner_i2c_xfer_send(&priv->i2c_props, | 944 | ret = tuner_i2c_xfer_send(&priv->i2c_props, |
943 | priv->tun->sleepdata + 1, | 945 | priv->tun->sleepdata + 1, |
944 | priv->tun->sleepdata[0]); | 946 | priv->tun->sleepdata[0]); |
945 | if (ret != priv->tun->sleepdata[0]) | 947 | if (ret != priv->tun->sleepdata[0]) |
946 | return ret; | 948 | return ret; |
947 | } | 949 | } |
948 | 950 | ||
949 | return 0; | 951 | return 0; |
950 | } | 952 | } |
951 | 953 | ||
952 | static int simple_release(struct dvb_frontend *fe) | 954 | static int simple_release(struct dvb_frontend *fe) |
953 | { | 955 | { |
954 | struct tuner_simple_priv *priv = fe->tuner_priv; | 956 | struct tuner_simple_priv *priv = fe->tuner_priv; |
955 | 957 | ||
956 | mutex_lock(&tuner_simple_list_mutex); | 958 | mutex_lock(&tuner_simple_list_mutex); |
957 | 959 | ||
958 | if (priv) | 960 | if (priv) |
959 | hybrid_tuner_release_state(priv); | 961 | hybrid_tuner_release_state(priv); |
960 | 962 | ||
961 | mutex_unlock(&tuner_simple_list_mutex); | 963 | mutex_unlock(&tuner_simple_list_mutex); |
962 | 964 | ||
963 | fe->tuner_priv = NULL; | 965 | fe->tuner_priv = NULL; |
964 | 966 | ||
965 | return 0; | 967 | return 0; |
966 | } | 968 | } |
967 | 969 | ||
968 | static int simple_get_frequency(struct dvb_frontend *fe, u32 *frequency) | 970 | static int simple_get_frequency(struct dvb_frontend *fe, u32 *frequency) |
969 | { | 971 | { |
970 | struct tuner_simple_priv *priv = fe->tuner_priv; | 972 | struct tuner_simple_priv *priv = fe->tuner_priv; |
971 | *frequency = priv->frequency; | 973 | *frequency = priv->frequency; |
972 | return 0; | 974 | return 0; |
973 | } | 975 | } |
974 | 976 | ||
975 | static int simple_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) | 977 | static int simple_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) |
976 | { | 978 | { |
977 | struct tuner_simple_priv *priv = fe->tuner_priv; | 979 | struct tuner_simple_priv *priv = fe->tuner_priv; |
978 | *bandwidth = priv->bandwidth; | 980 | *bandwidth = priv->bandwidth; |
979 | return 0; | 981 | return 0; |
980 | } | 982 | } |
981 | 983 | ||
982 | static struct dvb_tuner_ops simple_tuner_ops = { | 984 | static struct dvb_tuner_ops simple_tuner_ops = { |
983 | .init = simple_init, | 985 | .init = simple_init, |
984 | .sleep = simple_sleep, | 986 | .sleep = simple_sleep, |
985 | .set_analog_params = simple_set_params, | 987 | .set_analog_params = simple_set_params, |
986 | .set_params = simple_dvb_set_params, | 988 | .set_params = simple_dvb_set_params, |
987 | .calc_regs = simple_dvb_calc_regs, | 989 | .calc_regs = simple_dvb_calc_regs, |
988 | .release = simple_release, | 990 | .release = simple_release, |
989 | .get_frequency = simple_get_frequency, | 991 | .get_frequency = simple_get_frequency, |
990 | .get_bandwidth = simple_get_bandwidth, | 992 | .get_bandwidth = simple_get_bandwidth, |
991 | .get_status = simple_get_status, | 993 | .get_status = simple_get_status, |
992 | .get_rf_strength = simple_get_rf_strength, | 994 | .get_rf_strength = simple_get_rf_strength, |
993 | }; | 995 | }; |
994 | 996 | ||
995 | struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe, | 997 | struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe, |
996 | struct i2c_adapter *i2c_adap, | 998 | struct i2c_adapter *i2c_adap, |
997 | u8 i2c_addr, | 999 | u8 i2c_addr, |
998 | unsigned int type) | 1000 | unsigned int type) |
999 | { | 1001 | { |
1000 | struct tuner_simple_priv *priv = NULL; | 1002 | struct tuner_simple_priv *priv = NULL; |
1001 | int instance; | 1003 | int instance; |
1002 | 1004 | ||
1003 | if (type >= tuner_count) { | 1005 | if (type >= tuner_count) { |
1004 | printk(KERN_WARNING "%s: invalid tuner type: %d (max: %d)\n", | 1006 | printk(KERN_WARNING "%s: invalid tuner type: %d (max: %d)\n", |
1005 | __func__, type, tuner_count-1); | 1007 | __func__, type, tuner_count-1); |
1006 | return NULL; | 1008 | return NULL; |
1007 | } | 1009 | } |
1008 | 1010 | ||
1009 | /* If i2c_adap is set, check that the tuner is at the correct address. | 1011 | /* If i2c_adap is set, check that the tuner is at the correct address. |
1010 | * Otherwise, if i2c_adap is NULL, the tuner will be programmed directly | 1012 | * Otherwise, if i2c_adap is NULL, the tuner will be programmed directly |
1011 | * by the digital demod via calc_regs. | 1013 | * by the digital demod via calc_regs. |
1012 | */ | 1014 | */ |
1013 | if (i2c_adap != NULL) { | 1015 | if (i2c_adap != NULL) { |
1014 | u8 b[1]; | 1016 | u8 b[1]; |
1015 | struct i2c_msg msg = { | 1017 | struct i2c_msg msg = { |
1016 | .addr = i2c_addr, .flags = I2C_M_RD, | 1018 | .addr = i2c_addr, .flags = I2C_M_RD, |
1017 | .buf = b, .len = 1, | 1019 | .buf = b, .len = 1, |
1018 | }; | 1020 | }; |
1019 | 1021 | ||
1020 | if (fe->ops.i2c_gate_ctrl) | 1022 | if (fe->ops.i2c_gate_ctrl) |
1021 | fe->ops.i2c_gate_ctrl(fe, 1); | 1023 | fe->ops.i2c_gate_ctrl(fe, 1); |
1022 | 1024 | ||
1023 | if (1 != i2c_transfer(i2c_adap, &msg, 1)) | 1025 | if (1 != i2c_transfer(i2c_adap, &msg, 1)) |
1024 | printk(KERN_WARNING "tuner-simple %d-%04x: " | 1026 | printk(KERN_WARNING "tuner-simple %d-%04x: " |
1025 | "unable to probe %s, proceeding anyway.", | 1027 | "unable to probe %s, proceeding anyway.", |
1026 | i2c_adapter_id(i2c_adap), i2c_addr, | 1028 | i2c_adapter_id(i2c_adap), i2c_addr, |
1027 | tuners[type].name); | 1029 | tuners[type].name); |
1028 | 1030 | ||
1029 | if (fe->ops.i2c_gate_ctrl) | 1031 | if (fe->ops.i2c_gate_ctrl) |
1030 | fe->ops.i2c_gate_ctrl(fe, 0); | 1032 | fe->ops.i2c_gate_ctrl(fe, 0); |
1031 | } | 1033 | } |
1032 | 1034 | ||
1033 | mutex_lock(&tuner_simple_list_mutex); | 1035 | mutex_lock(&tuner_simple_list_mutex); |
1034 | 1036 | ||
1035 | instance = hybrid_tuner_request_state(struct tuner_simple_priv, priv, | 1037 | instance = hybrid_tuner_request_state(struct tuner_simple_priv, priv, |
1036 | hybrid_tuner_instance_list, | 1038 | hybrid_tuner_instance_list, |
1037 | i2c_adap, i2c_addr, | 1039 | i2c_adap, i2c_addr, |
1038 | "tuner-simple"); | 1040 | "tuner-simple"); |
1039 | switch (instance) { | 1041 | switch (instance) { |
1040 | case 0: | 1042 | case 0: |
1041 | mutex_unlock(&tuner_simple_list_mutex); | 1043 | mutex_unlock(&tuner_simple_list_mutex); |
1042 | return NULL; | 1044 | return NULL; |
1043 | case 1: | 1045 | case 1: |
1044 | fe->tuner_priv = priv; | 1046 | fe->tuner_priv = priv; |
1045 | 1047 | ||
1046 | priv->type = type; | 1048 | priv->type = type; |
1047 | priv->tun = &tuners[type]; | 1049 | priv->tun = &tuners[type]; |
1048 | priv->nr = simple_devcount++; | 1050 | priv->nr = simple_devcount++; |
1049 | break; | 1051 | break; |
1050 | default: | 1052 | default: |
1051 | fe->tuner_priv = priv; | 1053 | fe->tuner_priv = priv; |
1052 | break; | 1054 | break; |
1053 | } | 1055 | } |
1054 | 1056 | ||
1055 | mutex_unlock(&tuner_simple_list_mutex); | 1057 | mutex_unlock(&tuner_simple_list_mutex); |
1056 | 1058 | ||
1057 | memcpy(&fe->ops.tuner_ops, &simple_tuner_ops, | 1059 | memcpy(&fe->ops.tuner_ops, &simple_tuner_ops, |
1058 | sizeof(struct dvb_tuner_ops)); | 1060 | sizeof(struct dvb_tuner_ops)); |
1059 | 1061 | ||
1060 | tuner_info("type set to %d (%s)\n", type, priv->tun->name); | 1062 | tuner_info("type set to %d (%s)\n", type, priv->tun->name); |
1061 | 1063 | ||
1062 | if ((debug) || ((atv_input[priv->nr] > 0) || | 1064 | if ((debug) || ((atv_input[priv->nr] > 0) || |
1063 | (dtv_input[priv->nr] > 0))) { | 1065 | (dtv_input[priv->nr] > 0))) { |
1064 | if (0 == atv_input[priv->nr]) | 1066 | if (0 == atv_input[priv->nr]) |
1065 | tuner_info("tuner %d atv rf input will be " | 1067 | tuner_info("tuner %d atv rf input will be " |
1066 | "autoselected\n", priv->nr); | 1068 | "autoselected\n", priv->nr); |
1067 | else | 1069 | else |
1068 | tuner_info("tuner %d atv rf input will be " | 1070 | tuner_info("tuner %d atv rf input will be " |
1069 | "set to input %d (insmod option)\n", | 1071 | "set to input %d (insmod option)\n", |
1070 | priv->nr, atv_input[priv->nr]); | 1072 | priv->nr, atv_input[priv->nr]); |
1071 | if (0 == dtv_input[priv->nr]) | 1073 | if (0 == dtv_input[priv->nr]) |
1072 | tuner_info("tuner %d dtv rf input will be " | 1074 | tuner_info("tuner %d dtv rf input will be " |
1073 | "autoselected\n", priv->nr); | 1075 | "autoselected\n", priv->nr); |
1074 | else | 1076 | else |
1075 | tuner_info("tuner %d dtv rf input will be " | 1077 | tuner_info("tuner %d dtv rf input will be " |
1076 | "set to input %d (insmod option)\n", | 1078 | "set to input %d (insmod option)\n", |
1077 | priv->nr, dtv_input[priv->nr]); | 1079 | priv->nr, dtv_input[priv->nr]); |
1078 | } | 1080 | } |
1079 | 1081 | ||
1080 | strlcpy(fe->ops.tuner_ops.info.name, priv->tun->name, | 1082 | strlcpy(fe->ops.tuner_ops.info.name, priv->tun->name, |
1081 | sizeof(fe->ops.tuner_ops.info.name)); | 1083 | sizeof(fe->ops.tuner_ops.info.name)); |
1082 | 1084 | ||
1083 | return fe; | 1085 | return fe; |
1084 | } | 1086 | } |
1085 | EXPORT_SYMBOL_GPL(simple_tuner_attach); | 1087 | EXPORT_SYMBOL_GPL(simple_tuner_attach); |
1086 | 1088 | ||
1087 | MODULE_DESCRIPTION("Simple 4-control-bytes style tuner driver"); | 1089 | MODULE_DESCRIPTION("Simple 4-control-bytes style tuner driver"); |
1088 | MODULE_AUTHOR("Ralph Metzler, Gerd Knorr, Gunther Mayer"); | 1090 | MODULE_AUTHOR("Ralph Metzler, Gerd Knorr, Gunther Mayer"); |
1089 | MODULE_LICENSE("GPL"); | 1091 | MODULE_LICENSE("GPL"); |
1090 | 1092 | ||
1091 | /* | 1093 | /* |
1092 | * Overrides for Emacs so that we follow Linus's tabbing style. | 1094 | * Overrides for Emacs so that we follow Linus's tabbing style. |
1093 | * --------------------------------------------------------------------------- | 1095 | * --------------------------------------------------------------------------- |
1094 | * Local variables: | 1096 | * Local variables: |
1095 | * c-basic-offset: 8 | 1097 | * c-basic-offset: 8 |
1096 | * End: | 1098 | * End: |
1097 | */ | 1099 | */ |
1098 | 1100 |
drivers/media/common/tuners/tuner-types.c
1 | /* | 1 | /* |
2 | * | 2 | * |
3 | * i2c tv tuner chip device type database. | 3 | * i2c tv tuner chip device type database. |
4 | * | 4 | * |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/i2c.h> | 7 | #include <linux/i2c.h> |
8 | #include <media/tuner.h> | 8 | #include <media/tuner.h> |
9 | #include <media/tuner-types.h> | 9 | #include <media/tuner-types.h> |
10 | 10 | ||
11 | /* ---------------------------------------------------------------------- */ | 11 | /* ---------------------------------------------------------------------- */ |
12 | 12 | ||
13 | /* | 13 | /* |
14 | * The floats in the tuner struct are computed at compile time | 14 | * The floats in the tuner struct are computed at compile time |
15 | * by gcc and cast back to integers. Thus we don't violate the | 15 | * by gcc and cast back to integers. Thus we don't violate the |
16 | * "no float in kernel" rule. | 16 | * "no float in kernel" rule. |
17 | * | 17 | * |
18 | * A tuner_range may be referenced by multiple tuner_params structs. | 18 | * A tuner_range may be referenced by multiple tuner_params structs. |
19 | * There are many duplicates in here. Reusing tuner_range structs, | 19 | * There are many duplicates in here. Reusing tuner_range structs, |
20 | * rather than defining new ones for each tuner, will cut down on | 20 | * rather than defining new ones for each tuner, will cut down on |
21 | * memory usage, and is preferred when possible. | 21 | * memory usage, and is preferred when possible. |
22 | * | 22 | * |
23 | * Each tuner_params array may contain one or more elements, one | 23 | * Each tuner_params array may contain one or more elements, one |
24 | * for each video standard. | 24 | * for each video standard. |
25 | * | 25 | * |
26 | * FIXME: tuner_params struct contains an element, tda988x. We must | 26 | * FIXME: tuner_params struct contains an element, tda988x. We must |
27 | * set this for all tuners that contain a tda988x chip, and then we | 27 | * set this for all tuners that contain a tda988x chip, and then we |
28 | * can remove this setting from the various card structs. | 28 | * can remove this setting from the various card structs. |
29 | * | 29 | * |
30 | * FIXME: Right now, all tuners are using the first tuner_params[] | 30 | * FIXME: Right now, all tuners are using the first tuner_params[] |
31 | * array element for analog mode. In the future, we will be merging | 31 | * array element for analog mode. In the future, we will be merging |
32 | * similar tuner definitions together, such that each tuner definition | 32 | * similar tuner definitions together, such that each tuner definition |
33 | * will have a tuner_params struct for each available video standard. | 33 | * will have a tuner_params struct for each available video standard. |
34 | * At that point, the tuner_params[] array element will be chosen | 34 | * At that point, the tuner_params[] array element will be chosen |
35 | * based on the video standard in use. | 35 | * based on the video standard in use. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | /* The following was taken from dvb-pll.c: */ | 38 | /* The following was taken from dvb-pll.c: */ |
39 | 39 | ||
40 | /* Set AGC TOP value to 103 dBuV: | 40 | /* Set AGC TOP value to 103 dBuV: |
41 | * 0x80 = Control Byte | 41 | * 0x80 = Control Byte |
42 | * 0x40 = 250 uA charge pump (irrelevant) | 42 | * 0x40 = 250 uA charge pump (irrelevant) |
43 | * 0x18 = Aux Byte to follow | 43 | * 0x18 = Aux Byte to follow |
44 | * 0x06 = 64.5 kHz divider (irrelevant) | 44 | * 0x06 = 64.5 kHz divider (irrelevant) |
45 | * 0x01 = Disable Vt (aka sleep) | 45 | * 0x01 = Disable Vt (aka sleep) |
46 | * | 46 | * |
47 | * 0x00 = AGC Time constant 2s Iagc = 300 nA (vs 0x80 = 9 nA) | 47 | * 0x00 = AGC Time constant 2s Iagc = 300 nA (vs 0x80 = 9 nA) |
48 | * 0x50 = AGC Take over point = 103 dBuV | 48 | * 0x50 = AGC Take over point = 103 dBuV |
49 | */ | 49 | */ |
50 | static u8 tua603x_agc103[] = { 2, 0x80|0x40|0x18|0x06|0x01, 0x00|0x50 }; | 50 | static u8 tua603x_agc103[] = { 2, 0x80|0x40|0x18|0x06|0x01, 0x00|0x50 }; |
51 | 51 | ||
52 | /* 0x04 = 166.67 kHz divider | 52 | /* 0x04 = 166.67 kHz divider |
53 | * | 53 | * |
54 | * 0x80 = AGC Time constant 50ms Iagc = 9 uA | 54 | * 0x80 = AGC Time constant 50ms Iagc = 9 uA |
55 | * 0x20 = AGC Take over point = 112 dBuV | 55 | * 0x20 = AGC Take over point = 112 dBuV |
56 | */ | 56 | */ |
57 | static u8 tua603x_agc112[] = { 2, 0x80|0x40|0x18|0x04|0x01, 0x80|0x20 }; | 57 | static u8 tua603x_agc112[] = { 2, 0x80|0x40|0x18|0x04|0x01, 0x80|0x20 }; |
58 | 58 | ||
59 | /* 0-9 */ | 59 | /* 0-9 */ |
60 | /* ------------ TUNER_TEMIC_PAL - TEMIC PAL ------------ */ | 60 | /* ------------ TUNER_TEMIC_PAL - TEMIC PAL ------------ */ |
61 | 61 | ||
62 | static struct tuner_range tuner_temic_pal_ranges[] = { | 62 | static struct tuner_range tuner_temic_pal_ranges[] = { |
63 | { 16 * 140.25 /*MHz*/, 0x8e, 0x02, }, | 63 | { 16 * 140.25 /*MHz*/, 0x8e, 0x02, }, |
64 | { 16 * 463.25 /*MHz*/, 0x8e, 0x04, }, | 64 | { 16 * 463.25 /*MHz*/, 0x8e, 0x04, }, |
65 | { 16 * 999.99 , 0x8e, 0x01, }, | 65 | { 16 * 999.99 , 0x8e, 0x01, }, |
66 | }; | 66 | }; |
67 | 67 | ||
68 | static struct tuner_params tuner_temic_pal_params[] = { | 68 | static struct tuner_params tuner_temic_pal_params[] = { |
69 | { | 69 | { |
70 | .type = TUNER_PARAM_TYPE_PAL, | 70 | .type = TUNER_PARAM_TYPE_PAL, |
71 | .ranges = tuner_temic_pal_ranges, | 71 | .ranges = tuner_temic_pal_ranges, |
72 | .count = ARRAY_SIZE(tuner_temic_pal_ranges), | 72 | .count = ARRAY_SIZE(tuner_temic_pal_ranges), |
73 | }, | 73 | }, |
74 | }; | 74 | }; |
75 | 75 | ||
76 | /* ------------ TUNER_PHILIPS_PAL_I - Philips PAL_I ------------ */ | 76 | /* ------------ TUNER_PHILIPS_PAL_I - Philips PAL_I ------------ */ |
77 | 77 | ||
78 | static struct tuner_range tuner_philips_pal_i_ranges[] = { | 78 | static struct tuner_range tuner_philips_pal_i_ranges[] = { |
79 | { 16 * 140.25 /*MHz*/, 0x8e, 0xa0, }, | 79 | { 16 * 140.25 /*MHz*/, 0x8e, 0xa0, }, |
80 | { 16 * 463.25 /*MHz*/, 0x8e, 0x90, }, | 80 | { 16 * 463.25 /*MHz*/, 0x8e, 0x90, }, |
81 | { 16 * 999.99 , 0x8e, 0x30, }, | 81 | { 16 * 999.99 , 0x8e, 0x30, }, |
82 | }; | 82 | }; |
83 | 83 | ||
84 | static struct tuner_params tuner_philips_pal_i_params[] = { | 84 | static struct tuner_params tuner_philips_pal_i_params[] = { |
85 | { | 85 | { |
86 | .type = TUNER_PARAM_TYPE_PAL, | 86 | .type = TUNER_PARAM_TYPE_PAL, |
87 | .ranges = tuner_philips_pal_i_ranges, | 87 | .ranges = tuner_philips_pal_i_ranges, |
88 | .count = ARRAY_SIZE(tuner_philips_pal_i_ranges), | 88 | .count = ARRAY_SIZE(tuner_philips_pal_i_ranges), |
89 | }, | 89 | }, |
90 | }; | 90 | }; |
91 | 91 | ||
92 | /* ------------ TUNER_PHILIPS_NTSC - Philips NTSC ------------ */ | 92 | /* ------------ TUNER_PHILIPS_NTSC - Philips NTSC ------------ */ |
93 | 93 | ||
94 | static struct tuner_range tuner_philips_ntsc_ranges[] = { | 94 | static struct tuner_range tuner_philips_ntsc_ranges[] = { |
95 | { 16 * 157.25 /*MHz*/, 0x8e, 0xa0, }, | 95 | { 16 * 157.25 /*MHz*/, 0x8e, 0xa0, }, |
96 | { 16 * 451.25 /*MHz*/, 0x8e, 0x90, }, | 96 | { 16 * 451.25 /*MHz*/, 0x8e, 0x90, }, |
97 | { 16 * 999.99 , 0x8e, 0x30, }, | 97 | { 16 * 999.99 , 0x8e, 0x30, }, |
98 | }; | 98 | }; |
99 | 99 | ||
100 | static struct tuner_params tuner_philips_ntsc_params[] = { | 100 | static struct tuner_params tuner_philips_ntsc_params[] = { |
101 | { | 101 | { |
102 | .type = TUNER_PARAM_TYPE_NTSC, | 102 | .type = TUNER_PARAM_TYPE_NTSC, |
103 | .ranges = tuner_philips_ntsc_ranges, | 103 | .ranges = tuner_philips_ntsc_ranges, |
104 | .count = ARRAY_SIZE(tuner_philips_ntsc_ranges), | 104 | .count = ARRAY_SIZE(tuner_philips_ntsc_ranges), |
105 | .cb_first_if_lower_freq = 1, | 105 | .cb_first_if_lower_freq = 1, |
106 | }, | 106 | }, |
107 | }; | 107 | }; |
108 | 108 | ||
109 | /* ------------ TUNER_PHILIPS_SECAM - Philips SECAM ------------ */ | 109 | /* ------------ TUNER_PHILIPS_SECAM - Philips SECAM ------------ */ |
110 | 110 | ||
111 | static struct tuner_range tuner_philips_secam_ranges[] = { | 111 | static struct tuner_range tuner_philips_secam_ranges[] = { |
112 | { 16 * 168.25 /*MHz*/, 0x8e, 0xa7, }, | 112 | { 16 * 168.25 /*MHz*/, 0x8e, 0xa7, }, |
113 | { 16 * 447.25 /*MHz*/, 0x8e, 0x97, }, | 113 | { 16 * 447.25 /*MHz*/, 0x8e, 0x97, }, |
114 | { 16 * 999.99 , 0x8e, 0x37, }, | 114 | { 16 * 999.99 , 0x8e, 0x37, }, |
115 | }; | 115 | }; |
116 | 116 | ||
117 | static struct tuner_params tuner_philips_secam_params[] = { | 117 | static struct tuner_params tuner_philips_secam_params[] = { |
118 | { | 118 | { |
119 | .type = TUNER_PARAM_TYPE_SECAM, | 119 | .type = TUNER_PARAM_TYPE_SECAM, |
120 | .ranges = tuner_philips_secam_ranges, | 120 | .ranges = tuner_philips_secam_ranges, |
121 | .count = ARRAY_SIZE(tuner_philips_secam_ranges), | 121 | .count = ARRAY_SIZE(tuner_philips_secam_ranges), |
122 | .cb_first_if_lower_freq = 1, | 122 | .cb_first_if_lower_freq = 1, |
123 | }, | 123 | }, |
124 | }; | 124 | }; |
125 | 125 | ||
126 | /* ------------ TUNER_PHILIPS_PAL - Philips PAL ------------ */ | 126 | /* ------------ TUNER_PHILIPS_PAL - Philips PAL ------------ */ |
127 | 127 | ||
128 | static struct tuner_range tuner_philips_pal_ranges[] = { | 128 | static struct tuner_range tuner_philips_pal_ranges[] = { |
129 | { 16 * 168.25 /*MHz*/, 0x8e, 0xa0, }, | 129 | { 16 * 168.25 /*MHz*/, 0x8e, 0xa0, }, |
130 | { 16 * 447.25 /*MHz*/, 0x8e, 0x90, }, | 130 | { 16 * 447.25 /*MHz*/, 0x8e, 0x90, }, |
131 | { 16 * 999.99 , 0x8e, 0x30, }, | 131 | { 16 * 999.99 , 0x8e, 0x30, }, |
132 | }; | 132 | }; |
133 | 133 | ||
134 | static struct tuner_params tuner_philips_pal_params[] = { | 134 | static struct tuner_params tuner_philips_pal_params[] = { |
135 | { | 135 | { |
136 | .type = TUNER_PARAM_TYPE_PAL, | 136 | .type = TUNER_PARAM_TYPE_PAL, |
137 | .ranges = tuner_philips_pal_ranges, | 137 | .ranges = tuner_philips_pal_ranges, |
138 | .count = ARRAY_SIZE(tuner_philips_pal_ranges), | 138 | .count = ARRAY_SIZE(tuner_philips_pal_ranges), |
139 | .cb_first_if_lower_freq = 1, | 139 | .cb_first_if_lower_freq = 1, |
140 | }, | 140 | }, |
141 | }; | 141 | }; |
142 | 142 | ||
143 | /* ------------ TUNER_TEMIC_NTSC - TEMIC NTSC ------------ */ | 143 | /* ------------ TUNER_TEMIC_NTSC - TEMIC NTSC ------------ */ |
144 | 144 | ||
145 | static struct tuner_range tuner_temic_ntsc_ranges[] = { | 145 | static struct tuner_range tuner_temic_ntsc_ranges[] = { |
146 | { 16 * 157.25 /*MHz*/, 0x8e, 0x02, }, | 146 | { 16 * 157.25 /*MHz*/, 0x8e, 0x02, }, |
147 | { 16 * 463.25 /*MHz*/, 0x8e, 0x04, }, | 147 | { 16 * 463.25 /*MHz*/, 0x8e, 0x04, }, |
148 | { 16 * 999.99 , 0x8e, 0x01, }, | 148 | { 16 * 999.99 , 0x8e, 0x01, }, |
149 | }; | 149 | }; |
150 | 150 | ||
151 | static struct tuner_params tuner_temic_ntsc_params[] = { | 151 | static struct tuner_params tuner_temic_ntsc_params[] = { |
152 | { | 152 | { |
153 | .type = TUNER_PARAM_TYPE_NTSC, | 153 | .type = TUNER_PARAM_TYPE_NTSC, |
154 | .ranges = tuner_temic_ntsc_ranges, | 154 | .ranges = tuner_temic_ntsc_ranges, |
155 | .count = ARRAY_SIZE(tuner_temic_ntsc_ranges), | 155 | .count = ARRAY_SIZE(tuner_temic_ntsc_ranges), |
156 | }, | 156 | }, |
157 | }; | 157 | }; |
158 | 158 | ||
159 | /* ------------ TUNER_TEMIC_PAL_I - TEMIC PAL_I ------------ */ | 159 | /* ------------ TUNER_TEMIC_PAL_I - TEMIC PAL_I ------------ */ |
160 | 160 | ||
161 | static struct tuner_range tuner_temic_pal_i_ranges[] = { | 161 | static struct tuner_range tuner_temic_pal_i_ranges[] = { |
162 | { 16 * 170.00 /*MHz*/, 0x8e, 0x02, }, | 162 | { 16 * 170.00 /*MHz*/, 0x8e, 0x02, }, |
163 | { 16 * 450.00 /*MHz*/, 0x8e, 0x04, }, | 163 | { 16 * 450.00 /*MHz*/, 0x8e, 0x04, }, |
164 | { 16 * 999.99 , 0x8e, 0x01, }, | 164 | { 16 * 999.99 , 0x8e, 0x01, }, |
165 | }; | 165 | }; |
166 | 166 | ||
167 | static struct tuner_params tuner_temic_pal_i_params[] = { | 167 | static struct tuner_params tuner_temic_pal_i_params[] = { |
168 | { | 168 | { |
169 | .type = TUNER_PARAM_TYPE_PAL, | 169 | .type = TUNER_PARAM_TYPE_PAL, |
170 | .ranges = tuner_temic_pal_i_ranges, | 170 | .ranges = tuner_temic_pal_i_ranges, |
171 | .count = ARRAY_SIZE(tuner_temic_pal_i_ranges), | 171 | .count = ARRAY_SIZE(tuner_temic_pal_i_ranges), |
172 | }, | 172 | }, |
173 | }; | 173 | }; |
174 | 174 | ||
175 | /* ------------ TUNER_TEMIC_4036FY5_NTSC - TEMIC NTSC ------------ */ | 175 | /* ------------ TUNER_TEMIC_4036FY5_NTSC - TEMIC NTSC ------------ */ |
176 | 176 | ||
177 | static struct tuner_range tuner_temic_4036fy5_ntsc_ranges[] = { | 177 | static struct tuner_range tuner_temic_4036fy5_ntsc_ranges[] = { |
178 | { 16 * 157.25 /*MHz*/, 0x8e, 0xa0, }, | 178 | { 16 * 157.25 /*MHz*/, 0x8e, 0xa0, }, |
179 | { 16 * 463.25 /*MHz*/, 0x8e, 0x90, }, | 179 | { 16 * 463.25 /*MHz*/, 0x8e, 0x90, }, |
180 | { 16 * 999.99 , 0x8e, 0x30, }, | 180 | { 16 * 999.99 , 0x8e, 0x30, }, |
181 | }; | 181 | }; |
182 | 182 | ||
183 | static struct tuner_params tuner_temic_4036fy5_ntsc_params[] = { | 183 | static struct tuner_params tuner_temic_4036fy5_ntsc_params[] = { |
184 | { | 184 | { |
185 | .type = TUNER_PARAM_TYPE_NTSC, | 185 | .type = TUNER_PARAM_TYPE_NTSC, |
186 | .ranges = tuner_temic_4036fy5_ntsc_ranges, | 186 | .ranges = tuner_temic_4036fy5_ntsc_ranges, |
187 | .count = ARRAY_SIZE(tuner_temic_4036fy5_ntsc_ranges), | 187 | .count = ARRAY_SIZE(tuner_temic_4036fy5_ntsc_ranges), |
188 | }, | 188 | }, |
189 | }; | 189 | }; |
190 | 190 | ||
191 | /* ------------ TUNER_ALPS_TSBH1_NTSC - TEMIC NTSC ------------ */ | 191 | /* ------------ TUNER_ALPS_TSBH1_NTSC - TEMIC NTSC ------------ */ |
192 | 192 | ||
193 | static struct tuner_range tuner_alps_tsb_1_ranges[] = { | 193 | static struct tuner_range tuner_alps_tsb_1_ranges[] = { |
194 | { 16 * 137.25 /*MHz*/, 0x8e, 0x01, }, | 194 | { 16 * 137.25 /*MHz*/, 0x8e, 0x01, }, |
195 | { 16 * 385.25 /*MHz*/, 0x8e, 0x02, }, | 195 | { 16 * 385.25 /*MHz*/, 0x8e, 0x02, }, |
196 | { 16 * 999.99 , 0x8e, 0x08, }, | 196 | { 16 * 999.99 , 0x8e, 0x08, }, |
197 | }; | 197 | }; |
198 | 198 | ||
199 | static struct tuner_params tuner_alps_tsbh1_ntsc_params[] = { | 199 | static struct tuner_params tuner_alps_tsbh1_ntsc_params[] = { |
200 | { | 200 | { |
201 | .type = TUNER_PARAM_TYPE_NTSC, | 201 | .type = TUNER_PARAM_TYPE_NTSC, |
202 | .ranges = tuner_alps_tsb_1_ranges, | 202 | .ranges = tuner_alps_tsb_1_ranges, |
203 | .count = ARRAY_SIZE(tuner_alps_tsb_1_ranges), | 203 | .count = ARRAY_SIZE(tuner_alps_tsb_1_ranges), |
204 | }, | 204 | }, |
205 | }; | 205 | }; |
206 | 206 | ||
207 | /* 10-19 */ | 207 | /* 10-19 */ |
208 | /* ------------ TUNER_ALPS_TSBE1_PAL - TEMIC PAL ------------ */ | 208 | /* ------------ TUNER_ALPS_TSBE1_PAL - TEMIC PAL ------------ */ |
209 | 209 | ||
210 | static struct tuner_params tuner_alps_tsb_1_params[] = { | 210 | static struct tuner_params tuner_alps_tsb_1_params[] = { |
211 | { | 211 | { |
212 | .type = TUNER_PARAM_TYPE_PAL, | 212 | .type = TUNER_PARAM_TYPE_PAL, |
213 | .ranges = tuner_alps_tsb_1_ranges, | 213 | .ranges = tuner_alps_tsb_1_ranges, |
214 | .count = ARRAY_SIZE(tuner_alps_tsb_1_ranges), | 214 | .count = ARRAY_SIZE(tuner_alps_tsb_1_ranges), |
215 | }, | 215 | }, |
216 | }; | 216 | }; |
217 | 217 | ||
218 | /* ------------ TUNER_ALPS_TSBB5_PAL_I - Alps PAL_I ------------ */ | 218 | /* ------------ TUNER_ALPS_TSBB5_PAL_I - Alps PAL_I ------------ */ |
219 | 219 | ||
220 | static struct tuner_range tuner_alps_tsb_5_pal_ranges[] = { | 220 | static struct tuner_range tuner_alps_tsb_5_pal_ranges[] = { |
221 | { 16 * 133.25 /*MHz*/, 0x8e, 0x01, }, | 221 | { 16 * 133.25 /*MHz*/, 0x8e, 0x01, }, |
222 | { 16 * 351.25 /*MHz*/, 0x8e, 0x02, }, | 222 | { 16 * 351.25 /*MHz*/, 0x8e, 0x02, }, |
223 | { 16 * 999.99 , 0x8e, 0x08, }, | 223 | { 16 * 999.99 , 0x8e, 0x08, }, |
224 | }; | 224 | }; |
225 | 225 | ||
226 | static struct tuner_params tuner_alps_tsbb5_params[] = { | 226 | static struct tuner_params tuner_alps_tsbb5_params[] = { |
227 | { | 227 | { |
228 | .type = TUNER_PARAM_TYPE_PAL, | 228 | .type = TUNER_PARAM_TYPE_PAL, |
229 | .ranges = tuner_alps_tsb_5_pal_ranges, | 229 | .ranges = tuner_alps_tsb_5_pal_ranges, |
230 | .count = ARRAY_SIZE(tuner_alps_tsb_5_pal_ranges), | 230 | .count = ARRAY_SIZE(tuner_alps_tsb_5_pal_ranges), |
231 | }, | 231 | }, |
232 | }; | 232 | }; |
233 | 233 | ||
234 | /* ------------ TUNER_ALPS_TSBE5_PAL - Alps PAL ------------ */ | 234 | /* ------------ TUNER_ALPS_TSBE5_PAL - Alps PAL ------------ */ |
235 | 235 | ||
236 | static struct tuner_params tuner_alps_tsbe5_params[] = { | 236 | static struct tuner_params tuner_alps_tsbe5_params[] = { |
237 | { | 237 | { |
238 | .type = TUNER_PARAM_TYPE_PAL, | 238 | .type = TUNER_PARAM_TYPE_PAL, |
239 | .ranges = tuner_alps_tsb_5_pal_ranges, | 239 | .ranges = tuner_alps_tsb_5_pal_ranges, |
240 | .count = ARRAY_SIZE(tuner_alps_tsb_5_pal_ranges), | 240 | .count = ARRAY_SIZE(tuner_alps_tsb_5_pal_ranges), |
241 | }, | 241 | }, |
242 | }; | 242 | }; |
243 | 243 | ||
244 | /* ------------ TUNER_ALPS_TSBC5_PAL - Alps PAL ------------ */ | 244 | /* ------------ TUNER_ALPS_TSBC5_PAL - Alps PAL ------------ */ |
245 | 245 | ||
246 | static struct tuner_params tuner_alps_tsbc5_params[] = { | 246 | static struct tuner_params tuner_alps_tsbc5_params[] = { |
247 | { | 247 | { |
248 | .type = TUNER_PARAM_TYPE_PAL, | 248 | .type = TUNER_PARAM_TYPE_PAL, |
249 | .ranges = tuner_alps_tsb_5_pal_ranges, | 249 | .ranges = tuner_alps_tsb_5_pal_ranges, |
250 | .count = ARRAY_SIZE(tuner_alps_tsb_5_pal_ranges), | 250 | .count = ARRAY_SIZE(tuner_alps_tsb_5_pal_ranges), |
251 | }, | 251 | }, |
252 | }; | 252 | }; |
253 | 253 | ||
254 | /* ------------ TUNER_TEMIC_4006FH5_PAL - TEMIC PAL ------------ */ | 254 | /* ------------ TUNER_TEMIC_4006FH5_PAL - TEMIC PAL ------------ */ |
255 | 255 | ||
256 | static struct tuner_range tuner_lg_pal_ranges[] = { | 256 | static struct tuner_range tuner_lg_pal_ranges[] = { |
257 | { 16 * 170.00 /*MHz*/, 0x8e, 0xa0, }, | 257 | { 16 * 170.00 /*MHz*/, 0x8e, 0xa0, }, |
258 | { 16 * 450.00 /*MHz*/, 0x8e, 0x90, }, | 258 | { 16 * 450.00 /*MHz*/, 0x8e, 0x90, }, |
259 | { 16 * 999.99 , 0x8e, 0x30, }, | 259 | { 16 * 999.99 , 0x8e, 0x30, }, |
260 | }; | 260 | }; |
261 | 261 | ||
262 | static struct tuner_params tuner_temic_4006fh5_params[] = { | 262 | static struct tuner_params tuner_temic_4006fh5_params[] = { |
263 | { | 263 | { |
264 | .type = TUNER_PARAM_TYPE_PAL, | 264 | .type = TUNER_PARAM_TYPE_PAL, |
265 | .ranges = tuner_lg_pal_ranges, | 265 | .ranges = tuner_lg_pal_ranges, |
266 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), | 266 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), |
267 | }, | 267 | }, |
268 | }; | 268 | }; |
269 | 269 | ||
270 | /* ------------ TUNER_ALPS_TSHC6_NTSC - Alps NTSC ------------ */ | 270 | /* ------------ TUNER_ALPS_TSHC6_NTSC - Alps NTSC ------------ */ |
271 | 271 | ||
272 | static struct tuner_range tuner_alps_tshc6_ntsc_ranges[] = { | 272 | static struct tuner_range tuner_alps_tshc6_ntsc_ranges[] = { |
273 | { 16 * 137.25 /*MHz*/, 0x8e, 0x14, }, | 273 | { 16 * 137.25 /*MHz*/, 0x8e, 0x14, }, |
274 | { 16 * 385.25 /*MHz*/, 0x8e, 0x12, }, | 274 | { 16 * 385.25 /*MHz*/, 0x8e, 0x12, }, |
275 | { 16 * 999.99 , 0x8e, 0x11, }, | 275 | { 16 * 999.99 , 0x8e, 0x11, }, |
276 | }; | 276 | }; |
277 | 277 | ||
278 | static struct tuner_params tuner_alps_tshc6_params[] = { | 278 | static struct tuner_params tuner_alps_tshc6_params[] = { |
279 | { | 279 | { |
280 | .type = TUNER_PARAM_TYPE_NTSC, | 280 | .type = TUNER_PARAM_TYPE_NTSC, |
281 | .ranges = tuner_alps_tshc6_ntsc_ranges, | 281 | .ranges = tuner_alps_tshc6_ntsc_ranges, |
282 | .count = ARRAY_SIZE(tuner_alps_tshc6_ntsc_ranges), | 282 | .count = ARRAY_SIZE(tuner_alps_tshc6_ntsc_ranges), |
283 | }, | 283 | }, |
284 | }; | 284 | }; |
285 | 285 | ||
286 | /* ------------ TUNER_TEMIC_PAL_DK - TEMIC PAL ------------ */ | 286 | /* ------------ TUNER_TEMIC_PAL_DK - TEMIC PAL ------------ */ |
287 | 287 | ||
288 | static struct tuner_range tuner_temic_pal_dk_ranges[] = { | 288 | static struct tuner_range tuner_temic_pal_dk_ranges[] = { |
289 | { 16 * 168.25 /*MHz*/, 0x8e, 0xa0, }, | 289 | { 16 * 168.25 /*MHz*/, 0x8e, 0xa0, }, |
290 | { 16 * 456.25 /*MHz*/, 0x8e, 0x90, }, | 290 | { 16 * 456.25 /*MHz*/, 0x8e, 0x90, }, |
291 | { 16 * 999.99 , 0x8e, 0x30, }, | 291 | { 16 * 999.99 , 0x8e, 0x30, }, |
292 | }; | 292 | }; |
293 | 293 | ||
294 | static struct tuner_params tuner_temic_pal_dk_params[] = { | 294 | static struct tuner_params tuner_temic_pal_dk_params[] = { |
295 | { | 295 | { |
296 | .type = TUNER_PARAM_TYPE_PAL, | 296 | .type = TUNER_PARAM_TYPE_PAL, |
297 | .ranges = tuner_temic_pal_dk_ranges, | 297 | .ranges = tuner_temic_pal_dk_ranges, |
298 | .count = ARRAY_SIZE(tuner_temic_pal_dk_ranges), | 298 | .count = ARRAY_SIZE(tuner_temic_pal_dk_ranges), |
299 | }, | 299 | }, |
300 | }; | 300 | }; |
301 | 301 | ||
302 | /* ------------ TUNER_PHILIPS_NTSC_M - Philips NTSC ------------ */ | 302 | /* ------------ TUNER_PHILIPS_NTSC_M - Philips NTSC ------------ */ |
303 | 303 | ||
304 | static struct tuner_range tuner_philips_ntsc_m_ranges[] = { | 304 | static struct tuner_range tuner_philips_ntsc_m_ranges[] = { |
305 | { 16 * 160.00 /*MHz*/, 0x8e, 0xa0, }, | 305 | { 16 * 160.00 /*MHz*/, 0x8e, 0xa0, }, |
306 | { 16 * 454.00 /*MHz*/, 0x8e, 0x90, }, | 306 | { 16 * 454.00 /*MHz*/, 0x8e, 0x90, }, |
307 | { 16 * 999.99 , 0x8e, 0x30, }, | 307 | { 16 * 999.99 , 0x8e, 0x30, }, |
308 | }; | 308 | }; |
309 | 309 | ||
310 | static struct tuner_params tuner_philips_ntsc_m_params[] = { | 310 | static struct tuner_params tuner_philips_ntsc_m_params[] = { |
311 | { | 311 | { |
312 | .type = TUNER_PARAM_TYPE_NTSC, | 312 | .type = TUNER_PARAM_TYPE_NTSC, |
313 | .ranges = tuner_philips_ntsc_m_ranges, | 313 | .ranges = tuner_philips_ntsc_m_ranges, |
314 | .count = ARRAY_SIZE(tuner_philips_ntsc_m_ranges), | 314 | .count = ARRAY_SIZE(tuner_philips_ntsc_m_ranges), |
315 | }, | 315 | }, |
316 | }; | 316 | }; |
317 | 317 | ||
318 | /* ------------ TUNER_TEMIC_4066FY5_PAL_I - TEMIC PAL_I ------------ */ | 318 | /* ------------ TUNER_TEMIC_4066FY5_PAL_I - TEMIC PAL_I ------------ */ |
319 | 319 | ||
320 | static struct tuner_range tuner_temic_40x6f_5_pal_ranges[] = { | 320 | static struct tuner_range tuner_temic_40x6f_5_pal_ranges[] = { |
321 | { 16 * 169.00 /*MHz*/, 0x8e, 0xa0, }, | 321 | { 16 * 169.00 /*MHz*/, 0x8e, 0xa0, }, |
322 | { 16 * 454.00 /*MHz*/, 0x8e, 0x90, }, | 322 | { 16 * 454.00 /*MHz*/, 0x8e, 0x90, }, |
323 | { 16 * 999.99 , 0x8e, 0x30, }, | 323 | { 16 * 999.99 , 0x8e, 0x30, }, |
324 | }; | 324 | }; |
325 | 325 | ||
326 | static struct tuner_params tuner_temic_4066fy5_pal_i_params[] = { | 326 | static struct tuner_params tuner_temic_4066fy5_pal_i_params[] = { |
327 | { | 327 | { |
328 | .type = TUNER_PARAM_TYPE_PAL, | 328 | .type = TUNER_PARAM_TYPE_PAL, |
329 | .ranges = tuner_temic_40x6f_5_pal_ranges, | 329 | .ranges = tuner_temic_40x6f_5_pal_ranges, |
330 | .count = ARRAY_SIZE(tuner_temic_40x6f_5_pal_ranges), | 330 | .count = ARRAY_SIZE(tuner_temic_40x6f_5_pal_ranges), |
331 | }, | 331 | }, |
332 | }; | 332 | }; |
333 | 333 | ||
334 | /* ------------ TUNER_TEMIC_4006FN5_MULTI_PAL - TEMIC PAL ------------ */ | 334 | /* ------------ TUNER_TEMIC_4006FN5_MULTI_PAL - TEMIC PAL ------------ */ |
335 | 335 | ||
336 | static struct tuner_params tuner_temic_4006fn5_multi_params[] = { | 336 | static struct tuner_params tuner_temic_4006fn5_multi_params[] = { |
337 | { | 337 | { |
338 | .type = TUNER_PARAM_TYPE_PAL, | 338 | .type = TUNER_PARAM_TYPE_PAL, |
339 | .ranges = tuner_temic_40x6f_5_pal_ranges, | 339 | .ranges = tuner_temic_40x6f_5_pal_ranges, |
340 | .count = ARRAY_SIZE(tuner_temic_40x6f_5_pal_ranges), | 340 | .count = ARRAY_SIZE(tuner_temic_40x6f_5_pal_ranges), |
341 | }, | 341 | }, |
342 | }; | 342 | }; |
343 | 343 | ||
344 | /* 20-29 */ | 344 | /* 20-29 */ |
345 | /* ------------ TUNER_TEMIC_4009FR5_PAL - TEMIC PAL ------------ */ | 345 | /* ------------ TUNER_TEMIC_4009FR5_PAL - TEMIC PAL ------------ */ |
346 | 346 | ||
347 | static struct tuner_range tuner_temic_4009f_5_pal_ranges[] = { | 347 | static struct tuner_range tuner_temic_4009f_5_pal_ranges[] = { |
348 | { 16 * 141.00 /*MHz*/, 0x8e, 0xa0, }, | 348 | { 16 * 141.00 /*MHz*/, 0x8e, 0xa0, }, |
349 | { 16 * 464.00 /*MHz*/, 0x8e, 0x90, }, | 349 | { 16 * 464.00 /*MHz*/, 0x8e, 0x90, }, |
350 | { 16 * 999.99 , 0x8e, 0x30, }, | 350 | { 16 * 999.99 , 0x8e, 0x30, }, |
351 | }; | 351 | }; |
352 | 352 | ||
353 | static struct tuner_params tuner_temic_4009f_5_params[] = { | 353 | static struct tuner_params tuner_temic_4009f_5_params[] = { |
354 | { | 354 | { |
355 | .type = TUNER_PARAM_TYPE_PAL, | 355 | .type = TUNER_PARAM_TYPE_PAL, |
356 | .ranges = tuner_temic_4009f_5_pal_ranges, | 356 | .ranges = tuner_temic_4009f_5_pal_ranges, |
357 | .count = ARRAY_SIZE(tuner_temic_4009f_5_pal_ranges), | 357 | .count = ARRAY_SIZE(tuner_temic_4009f_5_pal_ranges), |
358 | }, | 358 | }, |
359 | }; | 359 | }; |
360 | 360 | ||
361 | /* ------------ TUNER_TEMIC_4039FR5_NTSC - TEMIC NTSC ------------ */ | 361 | /* ------------ TUNER_TEMIC_4039FR5_NTSC - TEMIC NTSC ------------ */ |
362 | 362 | ||
363 | static struct tuner_range tuner_temic_4x3x_f_5_ntsc_ranges[] = { | 363 | static struct tuner_range tuner_temic_4x3x_f_5_ntsc_ranges[] = { |
364 | { 16 * 158.00 /*MHz*/, 0x8e, 0xa0, }, | 364 | { 16 * 158.00 /*MHz*/, 0x8e, 0xa0, }, |
365 | { 16 * 453.00 /*MHz*/, 0x8e, 0x90, }, | 365 | { 16 * 453.00 /*MHz*/, 0x8e, 0x90, }, |
366 | { 16 * 999.99 , 0x8e, 0x30, }, | 366 | { 16 * 999.99 , 0x8e, 0x30, }, |
367 | }; | 367 | }; |
368 | 368 | ||
369 | static struct tuner_params tuner_temic_4039fr5_params[] = { | 369 | static struct tuner_params tuner_temic_4039fr5_params[] = { |
370 | { | 370 | { |
371 | .type = TUNER_PARAM_TYPE_NTSC, | 371 | .type = TUNER_PARAM_TYPE_NTSC, |
372 | .ranges = tuner_temic_4x3x_f_5_ntsc_ranges, | 372 | .ranges = tuner_temic_4x3x_f_5_ntsc_ranges, |
373 | .count = ARRAY_SIZE(tuner_temic_4x3x_f_5_ntsc_ranges), | 373 | .count = ARRAY_SIZE(tuner_temic_4x3x_f_5_ntsc_ranges), |
374 | }, | 374 | }, |
375 | }; | 375 | }; |
376 | 376 | ||
377 | /* ------------ TUNER_TEMIC_4046FM5 - TEMIC PAL ------------ */ | 377 | /* ------------ TUNER_TEMIC_4046FM5 - TEMIC PAL ------------ */ |
378 | 378 | ||
379 | static struct tuner_params tuner_temic_4046fm5_params[] = { | 379 | static struct tuner_params tuner_temic_4046fm5_params[] = { |
380 | { | 380 | { |
381 | .type = TUNER_PARAM_TYPE_PAL, | 381 | .type = TUNER_PARAM_TYPE_PAL, |
382 | .ranges = tuner_temic_40x6f_5_pal_ranges, | 382 | .ranges = tuner_temic_40x6f_5_pal_ranges, |
383 | .count = ARRAY_SIZE(tuner_temic_40x6f_5_pal_ranges), | 383 | .count = ARRAY_SIZE(tuner_temic_40x6f_5_pal_ranges), |
384 | }, | 384 | }, |
385 | }; | 385 | }; |
386 | 386 | ||
387 | /* ------------ TUNER_PHILIPS_PAL_DK - Philips PAL ------------ */ | 387 | /* ------------ TUNER_PHILIPS_PAL_DK - Philips PAL ------------ */ |
388 | 388 | ||
389 | static struct tuner_params tuner_philips_pal_dk_params[] = { | 389 | static struct tuner_params tuner_philips_pal_dk_params[] = { |
390 | { | 390 | { |
391 | .type = TUNER_PARAM_TYPE_PAL, | 391 | .type = TUNER_PARAM_TYPE_PAL, |
392 | .ranges = tuner_lg_pal_ranges, | 392 | .ranges = tuner_lg_pal_ranges, |
393 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), | 393 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), |
394 | }, | 394 | }, |
395 | }; | 395 | }; |
396 | 396 | ||
397 | /* ------------ TUNER_PHILIPS_FQ1216ME - Philips PAL ------------ */ | 397 | /* ------------ TUNER_PHILIPS_FQ1216ME - Philips PAL ------------ */ |
398 | 398 | ||
399 | static struct tuner_params tuner_philips_fq1216me_params[] = { | 399 | static struct tuner_params tuner_philips_fq1216me_params[] = { |
400 | { | 400 | { |
401 | .type = TUNER_PARAM_TYPE_PAL, | 401 | .type = TUNER_PARAM_TYPE_PAL, |
402 | .ranges = tuner_lg_pal_ranges, | 402 | .ranges = tuner_lg_pal_ranges, |
403 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), | 403 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), |
404 | .has_tda9887 = 1, | 404 | .has_tda9887 = 1, |
405 | .port1_active = 1, | 405 | .port1_active = 1, |
406 | .port2_active = 1, | 406 | .port2_active = 1, |
407 | .port2_invert_for_secam_lc = 1, | 407 | .port2_invert_for_secam_lc = 1, |
408 | }, | 408 | }, |
409 | }; | 409 | }; |
410 | 410 | ||
411 | /* ------------ TUNER_LG_PAL_I_FM - LGINNOTEK PAL_I ------------ */ | 411 | /* ------------ TUNER_LG_PAL_I_FM - LGINNOTEK PAL_I ------------ */ |
412 | 412 | ||
413 | static struct tuner_params tuner_lg_pal_i_fm_params[] = { | 413 | static struct tuner_params tuner_lg_pal_i_fm_params[] = { |
414 | { | 414 | { |
415 | .type = TUNER_PARAM_TYPE_PAL, | 415 | .type = TUNER_PARAM_TYPE_PAL, |
416 | .ranges = tuner_lg_pal_ranges, | 416 | .ranges = tuner_lg_pal_ranges, |
417 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), | 417 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), |
418 | }, | 418 | }, |
419 | }; | 419 | }; |
420 | 420 | ||
421 | /* ------------ TUNER_LG_PAL_I - LGINNOTEK PAL_I ------------ */ | 421 | /* ------------ TUNER_LG_PAL_I - LGINNOTEK PAL_I ------------ */ |
422 | 422 | ||
423 | static struct tuner_params tuner_lg_pal_i_params[] = { | 423 | static struct tuner_params tuner_lg_pal_i_params[] = { |
424 | { | 424 | { |
425 | .type = TUNER_PARAM_TYPE_PAL, | 425 | .type = TUNER_PARAM_TYPE_PAL, |
426 | .ranges = tuner_lg_pal_ranges, | 426 | .ranges = tuner_lg_pal_ranges, |
427 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), | 427 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), |
428 | }, | 428 | }, |
429 | }; | 429 | }; |
430 | 430 | ||
431 | /* ------------ TUNER_LG_NTSC_FM - LGINNOTEK NTSC ------------ */ | 431 | /* ------------ TUNER_LG_NTSC_FM - LGINNOTEK NTSC ------------ */ |
432 | 432 | ||
433 | static struct tuner_range tuner_lg_ntsc_fm_ranges[] = { | 433 | static struct tuner_range tuner_lg_ntsc_fm_ranges[] = { |
434 | { 16 * 210.00 /*MHz*/, 0x8e, 0xa0, }, | 434 | { 16 * 210.00 /*MHz*/, 0x8e, 0xa0, }, |
435 | { 16 * 497.00 /*MHz*/, 0x8e, 0x90, }, | 435 | { 16 * 497.00 /*MHz*/, 0x8e, 0x90, }, |
436 | { 16 * 999.99 , 0x8e, 0x30, }, | 436 | { 16 * 999.99 , 0x8e, 0x30, }, |
437 | }; | 437 | }; |
438 | 438 | ||
439 | static struct tuner_params tuner_lg_ntsc_fm_params[] = { | 439 | static struct tuner_params tuner_lg_ntsc_fm_params[] = { |
440 | { | 440 | { |
441 | .type = TUNER_PARAM_TYPE_NTSC, | 441 | .type = TUNER_PARAM_TYPE_NTSC, |
442 | .ranges = tuner_lg_ntsc_fm_ranges, | 442 | .ranges = tuner_lg_ntsc_fm_ranges, |
443 | .count = ARRAY_SIZE(tuner_lg_ntsc_fm_ranges), | 443 | .count = ARRAY_SIZE(tuner_lg_ntsc_fm_ranges), |
444 | }, | 444 | }, |
445 | }; | 445 | }; |
446 | 446 | ||
447 | /* ------------ TUNER_LG_PAL_FM - LGINNOTEK PAL ------------ */ | 447 | /* ------------ TUNER_LG_PAL_FM - LGINNOTEK PAL ------------ */ |
448 | 448 | ||
449 | static struct tuner_params tuner_lg_pal_fm_params[] = { | 449 | static struct tuner_params tuner_lg_pal_fm_params[] = { |
450 | { | 450 | { |
451 | .type = TUNER_PARAM_TYPE_PAL, | 451 | .type = TUNER_PARAM_TYPE_PAL, |
452 | .ranges = tuner_lg_pal_ranges, | 452 | .ranges = tuner_lg_pal_ranges, |
453 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), | 453 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), |
454 | }, | 454 | }, |
455 | }; | 455 | }; |
456 | 456 | ||
457 | /* ------------ TUNER_LG_PAL - LGINNOTEK PAL ------------ */ | 457 | /* ------------ TUNER_LG_PAL - LGINNOTEK PAL ------------ */ |
458 | 458 | ||
459 | static struct tuner_params tuner_lg_pal_params[] = { | 459 | static struct tuner_params tuner_lg_pal_params[] = { |
460 | { | 460 | { |
461 | .type = TUNER_PARAM_TYPE_PAL, | 461 | .type = TUNER_PARAM_TYPE_PAL, |
462 | .ranges = tuner_lg_pal_ranges, | 462 | .ranges = tuner_lg_pal_ranges, |
463 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), | 463 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), |
464 | }, | 464 | }, |
465 | }; | 465 | }; |
466 | 466 | ||
467 | /* 30-39 */ | 467 | /* 30-39 */ |
468 | /* ------------ TUNER_TEMIC_4009FN5_MULTI_PAL_FM - TEMIC PAL ------------ */ | 468 | /* ------------ TUNER_TEMIC_4009FN5_MULTI_PAL_FM - TEMIC PAL ------------ */ |
469 | 469 | ||
470 | static struct tuner_params tuner_temic_4009_fn5_multi_pal_fm_params[] = { | 470 | static struct tuner_params tuner_temic_4009_fn5_multi_pal_fm_params[] = { |
471 | { | 471 | { |
472 | .type = TUNER_PARAM_TYPE_PAL, | 472 | .type = TUNER_PARAM_TYPE_PAL, |
473 | .ranges = tuner_temic_4009f_5_pal_ranges, | 473 | .ranges = tuner_temic_4009f_5_pal_ranges, |
474 | .count = ARRAY_SIZE(tuner_temic_4009f_5_pal_ranges), | 474 | .count = ARRAY_SIZE(tuner_temic_4009f_5_pal_ranges), |
475 | }, | 475 | }, |
476 | }; | 476 | }; |
477 | 477 | ||
478 | /* ------------ TUNER_SHARP_2U5JF5540_NTSC - SHARP NTSC ------------ */ | 478 | /* ------------ TUNER_SHARP_2U5JF5540_NTSC - SHARP NTSC ------------ */ |
479 | 479 | ||
480 | static struct tuner_range tuner_sharp_2u5jf5540_ntsc_ranges[] = { | 480 | static struct tuner_range tuner_sharp_2u5jf5540_ntsc_ranges[] = { |
481 | { 16 * 137.25 /*MHz*/, 0x8e, 0x01, }, | 481 | { 16 * 137.25 /*MHz*/, 0x8e, 0x01, }, |
482 | { 16 * 317.25 /*MHz*/, 0x8e, 0x02, }, | 482 | { 16 * 317.25 /*MHz*/, 0x8e, 0x02, }, |
483 | { 16 * 999.99 , 0x8e, 0x08, }, | 483 | { 16 * 999.99 , 0x8e, 0x08, }, |
484 | }; | 484 | }; |
485 | 485 | ||
486 | static struct tuner_params tuner_sharp_2u5jf5540_params[] = { | 486 | static struct tuner_params tuner_sharp_2u5jf5540_params[] = { |
487 | { | 487 | { |
488 | .type = TUNER_PARAM_TYPE_NTSC, | 488 | .type = TUNER_PARAM_TYPE_NTSC, |
489 | .ranges = tuner_sharp_2u5jf5540_ntsc_ranges, | 489 | .ranges = tuner_sharp_2u5jf5540_ntsc_ranges, |
490 | .count = ARRAY_SIZE(tuner_sharp_2u5jf5540_ntsc_ranges), | 490 | .count = ARRAY_SIZE(tuner_sharp_2u5jf5540_ntsc_ranges), |
491 | }, | 491 | }, |
492 | }; | 492 | }; |
493 | 493 | ||
494 | /* ------------ TUNER_Samsung_PAL_TCPM9091PD27 - Samsung PAL ------------ */ | 494 | /* ------------ TUNER_Samsung_PAL_TCPM9091PD27 - Samsung PAL ------------ */ |
495 | 495 | ||
496 | static struct tuner_range tuner_samsung_pal_tcpm9091pd27_ranges[] = { | 496 | static struct tuner_range tuner_samsung_pal_tcpm9091pd27_ranges[] = { |
497 | { 16 * 169 /*MHz*/, 0x8e, 0xa0, }, | 497 | { 16 * 169 /*MHz*/, 0x8e, 0xa0, }, |
498 | { 16 * 464 /*MHz*/, 0x8e, 0x90, }, | 498 | { 16 * 464 /*MHz*/, 0x8e, 0x90, }, |
499 | { 16 * 999.99 , 0x8e, 0x30, }, | 499 | { 16 * 999.99 , 0x8e, 0x30, }, |
500 | }; | 500 | }; |
501 | 501 | ||
502 | static struct tuner_params tuner_samsung_pal_tcpm9091pd27_params[] = { | 502 | static struct tuner_params tuner_samsung_pal_tcpm9091pd27_params[] = { |
503 | { | 503 | { |
504 | .type = TUNER_PARAM_TYPE_PAL, | 504 | .type = TUNER_PARAM_TYPE_PAL, |
505 | .ranges = tuner_samsung_pal_tcpm9091pd27_ranges, | 505 | .ranges = tuner_samsung_pal_tcpm9091pd27_ranges, |
506 | .count = ARRAY_SIZE(tuner_samsung_pal_tcpm9091pd27_ranges), | 506 | .count = ARRAY_SIZE(tuner_samsung_pal_tcpm9091pd27_ranges), |
507 | }, | 507 | }, |
508 | }; | 508 | }; |
509 | 509 | ||
510 | /* ------------ TUNER_TEMIC_4106FH5 - TEMIC PAL ------------ */ | 510 | /* ------------ TUNER_TEMIC_4106FH5 - TEMIC PAL ------------ */ |
511 | 511 | ||
512 | static struct tuner_params tuner_temic_4106fh5_params[] = { | 512 | static struct tuner_params tuner_temic_4106fh5_params[] = { |
513 | { | 513 | { |
514 | .type = TUNER_PARAM_TYPE_PAL, | 514 | .type = TUNER_PARAM_TYPE_PAL, |
515 | .ranges = tuner_temic_4009f_5_pal_ranges, | 515 | .ranges = tuner_temic_4009f_5_pal_ranges, |
516 | .count = ARRAY_SIZE(tuner_temic_4009f_5_pal_ranges), | 516 | .count = ARRAY_SIZE(tuner_temic_4009f_5_pal_ranges), |
517 | }, | 517 | }, |
518 | }; | 518 | }; |
519 | 519 | ||
520 | /* ------------ TUNER_TEMIC_4012FY5 - TEMIC PAL ------------ */ | 520 | /* ------------ TUNER_TEMIC_4012FY5 - TEMIC PAL ------------ */ |
521 | 521 | ||
522 | static struct tuner_params tuner_temic_4012fy5_params[] = { | 522 | static struct tuner_params tuner_temic_4012fy5_params[] = { |
523 | { | 523 | { |
524 | .type = TUNER_PARAM_TYPE_PAL, | 524 | .type = TUNER_PARAM_TYPE_PAL, |
525 | .ranges = tuner_temic_pal_ranges, | 525 | .ranges = tuner_temic_pal_ranges, |
526 | .count = ARRAY_SIZE(tuner_temic_pal_ranges), | 526 | .count = ARRAY_SIZE(tuner_temic_pal_ranges), |
527 | }, | 527 | }, |
528 | }; | 528 | }; |
529 | 529 | ||
530 | /* ------------ TUNER_TEMIC_4136FY5 - TEMIC NTSC ------------ */ | 530 | /* ------------ TUNER_TEMIC_4136FY5 - TEMIC NTSC ------------ */ |
531 | 531 | ||
532 | static struct tuner_params tuner_temic_4136_fy5_params[] = { | 532 | static struct tuner_params tuner_temic_4136_fy5_params[] = { |
533 | { | 533 | { |
534 | .type = TUNER_PARAM_TYPE_NTSC, | 534 | .type = TUNER_PARAM_TYPE_NTSC, |
535 | .ranges = tuner_temic_4x3x_f_5_ntsc_ranges, | 535 | .ranges = tuner_temic_4x3x_f_5_ntsc_ranges, |
536 | .count = ARRAY_SIZE(tuner_temic_4x3x_f_5_ntsc_ranges), | 536 | .count = ARRAY_SIZE(tuner_temic_4x3x_f_5_ntsc_ranges), |
537 | }, | 537 | }, |
538 | }; | 538 | }; |
539 | 539 | ||
540 | /* ------------ TUNER_LG_PAL_NEW_TAPC - LGINNOTEK PAL ------------ */ | 540 | /* ------------ TUNER_LG_PAL_NEW_TAPC - LGINNOTEK PAL ------------ */ |
541 | 541 | ||
542 | static struct tuner_range tuner_lg_new_tapc_ranges[] = { | 542 | static struct tuner_range tuner_lg_new_tapc_ranges[] = { |
543 | { 16 * 170.00 /*MHz*/, 0x8e, 0x01, }, | 543 | { 16 * 170.00 /*MHz*/, 0x8e, 0x01, }, |
544 | { 16 * 450.00 /*MHz*/, 0x8e, 0x02, }, | 544 | { 16 * 450.00 /*MHz*/, 0x8e, 0x02, }, |
545 | { 16 * 999.99 , 0x8e, 0x08, }, | 545 | { 16 * 999.99 , 0x8e, 0x08, }, |
546 | }; | 546 | }; |
547 | 547 | ||
548 | static struct tuner_params tuner_lg_pal_new_tapc_params[] = { | 548 | static struct tuner_params tuner_lg_pal_new_tapc_params[] = { |
549 | { | 549 | { |
550 | .type = TUNER_PARAM_TYPE_PAL, | 550 | .type = TUNER_PARAM_TYPE_PAL, |
551 | .ranges = tuner_lg_new_tapc_ranges, | 551 | .ranges = tuner_lg_new_tapc_ranges, |
552 | .count = ARRAY_SIZE(tuner_lg_new_tapc_ranges), | 552 | .count = ARRAY_SIZE(tuner_lg_new_tapc_ranges), |
553 | }, | 553 | }, |
554 | }; | 554 | }; |
555 | 555 | ||
556 | /* ------------ TUNER_PHILIPS_FM1216ME_MK3 - Philips PAL ------------ */ | 556 | /* ------------ TUNER_PHILIPS_FM1216ME_MK3 - Philips PAL ------------ */ |
557 | 557 | ||
558 | static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = { | 558 | static struct tuner_range tuner_fm1216me_mk3_pal_ranges[] = { |
559 | { 16 * 158.00 /*MHz*/, 0x8e, 0x01, }, | 559 | { 16 * 158.00 /*MHz*/, 0x8e, 0x01, }, |
560 | { 16 * 442.00 /*MHz*/, 0x8e, 0x02, }, | 560 | { 16 * 442.00 /*MHz*/, 0x8e, 0x02, }, |
561 | { 16 * 999.99 , 0x8e, 0x04, }, | 561 | { 16 * 999.99 , 0x8e, 0x04, }, |
562 | }; | 562 | }; |
563 | 563 | ||
564 | static struct tuner_params tuner_fm1216me_mk3_params[] = { | 564 | static struct tuner_params tuner_fm1216me_mk3_params[] = { |
565 | { | 565 | { |
566 | .type = TUNER_PARAM_TYPE_PAL, | 566 | .type = TUNER_PARAM_TYPE_PAL, |
567 | .ranges = tuner_fm1216me_mk3_pal_ranges, | 567 | .ranges = tuner_fm1216me_mk3_pal_ranges, |
568 | .count = ARRAY_SIZE(tuner_fm1216me_mk3_pal_ranges), | 568 | .count = ARRAY_SIZE(tuner_fm1216me_mk3_pal_ranges), |
569 | .cb_first_if_lower_freq = 1, | 569 | .cb_first_if_lower_freq = 1, |
570 | .has_tda9887 = 1, | 570 | .has_tda9887 = 1, |
571 | .port1_active = 1, | 571 | .port1_active = 1, |
572 | .port2_active = 1, | 572 | .port2_active = 1, |
573 | .port2_invert_for_secam_lc = 1, | 573 | .port2_invert_for_secam_lc = 1, |
574 | .port1_fm_high_sensitivity = 1, | 574 | .port1_fm_high_sensitivity = 1, |
575 | .default_top_mid = -2, | 575 | .default_top_mid = -2, |
576 | .default_top_secam_mid = -2, | 576 | .default_top_secam_mid = -2, |
577 | .default_top_secam_high = -2, | 577 | .default_top_secam_high = -2, |
578 | }, | 578 | }, |
579 | }; | 579 | }; |
580 | 580 | ||
581 | /* ------------ TUNER_LG_NTSC_NEW_TAPC - LGINNOTEK NTSC ------------ */ | 581 | /* ------------ TUNER_LG_NTSC_NEW_TAPC - LGINNOTEK NTSC ------------ */ |
582 | 582 | ||
583 | static struct tuner_params tuner_lg_ntsc_new_tapc_params[] = { | 583 | static struct tuner_params tuner_lg_ntsc_new_tapc_params[] = { |
584 | { | 584 | { |
585 | .type = TUNER_PARAM_TYPE_NTSC, | 585 | .type = TUNER_PARAM_TYPE_NTSC, |
586 | .ranges = tuner_lg_new_tapc_ranges, | 586 | .ranges = tuner_lg_new_tapc_ranges, |
587 | .count = ARRAY_SIZE(tuner_lg_new_tapc_ranges), | 587 | .count = ARRAY_SIZE(tuner_lg_new_tapc_ranges), |
588 | }, | 588 | }, |
589 | }; | 589 | }; |
590 | 590 | ||
591 | /* 40-49 */ | 591 | /* 40-49 */ |
592 | /* ------------ TUNER_HITACHI_NTSC - HITACHI NTSC ------------ */ | 592 | /* ------------ TUNER_HITACHI_NTSC - HITACHI NTSC ------------ */ |
593 | 593 | ||
594 | static struct tuner_params tuner_hitachi_ntsc_params[] = { | 594 | static struct tuner_params tuner_hitachi_ntsc_params[] = { |
595 | { | 595 | { |
596 | .type = TUNER_PARAM_TYPE_NTSC, | 596 | .type = TUNER_PARAM_TYPE_NTSC, |
597 | .ranges = tuner_lg_new_tapc_ranges, | 597 | .ranges = tuner_lg_new_tapc_ranges, |
598 | .count = ARRAY_SIZE(tuner_lg_new_tapc_ranges), | 598 | .count = ARRAY_SIZE(tuner_lg_new_tapc_ranges), |
599 | }, | 599 | }, |
600 | }; | 600 | }; |
601 | 601 | ||
602 | /* ------------ TUNER_PHILIPS_PAL_MK - Philips PAL ------------ */ | 602 | /* ------------ TUNER_PHILIPS_PAL_MK - Philips PAL ------------ */ |
603 | 603 | ||
604 | static struct tuner_range tuner_philips_pal_mk_pal_ranges[] = { | 604 | static struct tuner_range tuner_philips_pal_mk_pal_ranges[] = { |
605 | { 16 * 140.25 /*MHz*/, 0x8e, 0x01, }, | 605 | { 16 * 140.25 /*MHz*/, 0x8e, 0x01, }, |
606 | { 16 * 463.25 /*MHz*/, 0x8e, 0xc2, }, | 606 | { 16 * 463.25 /*MHz*/, 0x8e, 0xc2, }, |
607 | { 16 * 999.99 , 0x8e, 0xcf, }, | 607 | { 16 * 999.99 , 0x8e, 0xcf, }, |
608 | }; | 608 | }; |
609 | 609 | ||
610 | static struct tuner_params tuner_philips_pal_mk_params[] = { | 610 | static struct tuner_params tuner_philips_pal_mk_params[] = { |
611 | { | 611 | { |
612 | .type = TUNER_PARAM_TYPE_PAL, | 612 | .type = TUNER_PARAM_TYPE_PAL, |
613 | .ranges = tuner_philips_pal_mk_pal_ranges, | 613 | .ranges = tuner_philips_pal_mk_pal_ranges, |
614 | .count = ARRAY_SIZE(tuner_philips_pal_mk_pal_ranges), | 614 | .count = ARRAY_SIZE(tuner_philips_pal_mk_pal_ranges), |
615 | }, | 615 | }, |
616 | }; | 616 | }; |
617 | 617 | ||
618 | /* ---- TUNER_PHILIPS_FCV1236D - Philips FCV1236D (ATSC/NTSC) ---- */ | 618 | /* ---- TUNER_PHILIPS_FCV1236D - Philips FCV1236D (ATSC/NTSC) ---- */ |
619 | 619 | ||
620 | static struct tuner_range tuner_philips_fcv1236d_ntsc_ranges[] = { | 620 | static struct tuner_range tuner_philips_fcv1236d_ntsc_ranges[] = { |
621 | { 16 * 157.25 /*MHz*/, 0x8e, 0xa2, }, | 621 | { 16 * 157.25 /*MHz*/, 0x8e, 0xa2, }, |
622 | { 16 * 451.25 /*MHz*/, 0x8e, 0x92, }, | 622 | { 16 * 451.25 /*MHz*/, 0x8e, 0x92, }, |
623 | { 16 * 999.99 , 0x8e, 0x32, }, | 623 | { 16 * 999.99 , 0x8e, 0x32, }, |
624 | }; | 624 | }; |
625 | 625 | ||
626 | static struct tuner_range tuner_philips_fcv1236d_atsc_ranges[] = { | 626 | static struct tuner_range tuner_philips_fcv1236d_atsc_ranges[] = { |
627 | { 16 * 159.00 /*MHz*/, 0x8e, 0xa0, }, | 627 | { 16 * 159.00 /*MHz*/, 0x8e, 0xa0, }, |
628 | { 16 * 453.00 /*MHz*/, 0x8e, 0x90, }, | 628 | { 16 * 453.00 /*MHz*/, 0x8e, 0x90, }, |
629 | { 16 * 999.99 , 0x8e, 0x30, }, | 629 | { 16 * 999.99 , 0x8e, 0x30, }, |
630 | }; | 630 | }; |
631 | 631 | ||
632 | static struct tuner_params tuner_philips_fcv1236d_params[] = { | 632 | static struct tuner_params tuner_philips_fcv1236d_params[] = { |
633 | { | 633 | { |
634 | .type = TUNER_PARAM_TYPE_NTSC, | 634 | .type = TUNER_PARAM_TYPE_NTSC, |
635 | .ranges = tuner_philips_fcv1236d_ntsc_ranges, | 635 | .ranges = tuner_philips_fcv1236d_ntsc_ranges, |
636 | .count = ARRAY_SIZE(tuner_philips_fcv1236d_ntsc_ranges), | 636 | .count = ARRAY_SIZE(tuner_philips_fcv1236d_ntsc_ranges), |
637 | }, | 637 | }, |
638 | { | 638 | { |
639 | .type = TUNER_PARAM_TYPE_DIGITAL, | 639 | .type = TUNER_PARAM_TYPE_DIGITAL, |
640 | .ranges = tuner_philips_fcv1236d_atsc_ranges, | 640 | .ranges = tuner_philips_fcv1236d_atsc_ranges, |
641 | .count = ARRAY_SIZE(tuner_philips_fcv1236d_atsc_ranges), | 641 | .count = ARRAY_SIZE(tuner_philips_fcv1236d_atsc_ranges), |
642 | .iffreq = 16 * 44.00, | 642 | .iffreq = 16 * 44.00, |
643 | }, | 643 | }, |
644 | }; | 644 | }; |
645 | 645 | ||
646 | /* ------------ TUNER_PHILIPS_FM1236_MK3 - Philips NTSC ------------ */ | 646 | /* ------------ TUNER_PHILIPS_FM1236_MK3 - Philips NTSC ------------ */ |
647 | 647 | ||
648 | static struct tuner_range tuner_fm1236_mk3_ntsc_ranges[] = { | 648 | static struct tuner_range tuner_fm1236_mk3_ntsc_ranges[] = { |
649 | { 16 * 160.00 /*MHz*/, 0x8e, 0x01, }, | 649 | { 16 * 160.00 /*MHz*/, 0x8e, 0x01, }, |
650 | { 16 * 442.00 /*MHz*/, 0x8e, 0x02, }, | 650 | { 16 * 442.00 /*MHz*/, 0x8e, 0x02, }, |
651 | { 16 * 999.99 , 0x8e, 0x04, }, | 651 | { 16 * 999.99 , 0x8e, 0x04, }, |
652 | }; | 652 | }; |
653 | 653 | ||
654 | static struct tuner_params tuner_fm1236_mk3_params[] = { | 654 | static struct tuner_params tuner_fm1236_mk3_params[] = { |
655 | { | 655 | { |
656 | .type = TUNER_PARAM_TYPE_NTSC, | 656 | .type = TUNER_PARAM_TYPE_NTSC, |
657 | .ranges = tuner_fm1236_mk3_ntsc_ranges, | 657 | .ranges = tuner_fm1236_mk3_ntsc_ranges, |
658 | .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges), | 658 | .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges), |
659 | .cb_first_if_lower_freq = 1, | 659 | .cb_first_if_lower_freq = 1, |
660 | .has_tda9887 = 1, | 660 | .has_tda9887 = 1, |
661 | .port1_active = 1, | 661 | .port1_active = 1, |
662 | .port2_active = 1, | 662 | .port2_active = 1, |
663 | .port1_fm_high_sensitivity = 1, | 663 | .port1_fm_high_sensitivity = 1, |
664 | }, | 664 | }, |
665 | }; | 665 | }; |
666 | 666 | ||
667 | /* ------------ TUNER_PHILIPS_4IN1 - Philips NTSC ------------ */ | 667 | /* ------------ TUNER_PHILIPS_4IN1 - Philips NTSC ------------ */ |
668 | 668 | ||
669 | static struct tuner_params tuner_philips_4in1_params[] = { | 669 | static struct tuner_params tuner_philips_4in1_params[] = { |
670 | { | 670 | { |
671 | .type = TUNER_PARAM_TYPE_NTSC, | 671 | .type = TUNER_PARAM_TYPE_NTSC, |
672 | .ranges = tuner_fm1236_mk3_ntsc_ranges, | 672 | .ranges = tuner_fm1236_mk3_ntsc_ranges, |
673 | .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges), | 673 | .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges), |
674 | }, | 674 | }, |
675 | }; | 675 | }; |
676 | 676 | ||
677 | /* ------------ TUNER_MICROTUNE_4049FM5 - Microtune PAL ------------ */ | 677 | /* ------------ TUNER_MICROTUNE_4049FM5 - Microtune PAL ------------ */ |
678 | 678 | ||
679 | static struct tuner_params tuner_microtune_4049_fm5_params[] = { | 679 | static struct tuner_params tuner_microtune_4049_fm5_params[] = { |
680 | { | 680 | { |
681 | .type = TUNER_PARAM_TYPE_PAL, | 681 | .type = TUNER_PARAM_TYPE_PAL, |
682 | .ranges = tuner_temic_4009f_5_pal_ranges, | 682 | .ranges = tuner_temic_4009f_5_pal_ranges, |
683 | .count = ARRAY_SIZE(tuner_temic_4009f_5_pal_ranges), | 683 | .count = ARRAY_SIZE(tuner_temic_4009f_5_pal_ranges), |
684 | .has_tda9887 = 1, | 684 | .has_tda9887 = 1, |
685 | .port1_invert_for_secam_lc = 1, | 685 | .port1_invert_for_secam_lc = 1, |
686 | .default_pll_gating_18 = 1, | 686 | .default_pll_gating_18 = 1, |
687 | .fm_gain_normal=1, | 687 | .fm_gain_normal=1, |
688 | .radio_if = 1, /* 33.3 MHz */ | 688 | .radio_if = 1, /* 33.3 MHz */ |
689 | }, | 689 | }, |
690 | }; | 690 | }; |
691 | 691 | ||
692 | /* ------------ TUNER_PANASONIC_VP27 - Panasonic NTSC ------------ */ | 692 | /* ------------ TUNER_PANASONIC_VP27 - Panasonic NTSC ------------ */ |
693 | 693 | ||
694 | static struct tuner_range tuner_panasonic_vp27_ntsc_ranges[] = { | 694 | static struct tuner_range tuner_panasonic_vp27_ntsc_ranges[] = { |
695 | { 16 * 160.00 /*MHz*/, 0xce, 0x01, }, | 695 | { 16 * 160.00 /*MHz*/, 0xce, 0x01, }, |
696 | { 16 * 454.00 /*MHz*/, 0xce, 0x02, }, | 696 | { 16 * 454.00 /*MHz*/, 0xce, 0x02, }, |
697 | { 16 * 999.99 , 0xce, 0x08, }, | 697 | { 16 * 999.99 , 0xce, 0x08, }, |
698 | }; | 698 | }; |
699 | 699 | ||
700 | static struct tuner_params tuner_panasonic_vp27_params[] = { | 700 | static struct tuner_params tuner_panasonic_vp27_params[] = { |
701 | { | 701 | { |
702 | .type = TUNER_PARAM_TYPE_NTSC, | 702 | .type = TUNER_PARAM_TYPE_NTSC, |
703 | .ranges = tuner_panasonic_vp27_ntsc_ranges, | 703 | .ranges = tuner_panasonic_vp27_ntsc_ranges, |
704 | .count = ARRAY_SIZE(tuner_panasonic_vp27_ntsc_ranges), | 704 | .count = ARRAY_SIZE(tuner_panasonic_vp27_ntsc_ranges), |
705 | .has_tda9887 = 1, | 705 | .has_tda9887 = 1, |
706 | .intercarrier_mode = 1, | 706 | .intercarrier_mode = 1, |
707 | .default_top_low = -3, | 707 | .default_top_low = -3, |
708 | .default_top_mid = -3, | 708 | .default_top_mid = -3, |
709 | .default_top_high = -3, | 709 | .default_top_high = -3, |
710 | }, | 710 | }, |
711 | }; | 711 | }; |
712 | 712 | ||
713 | /* ------------ TUNER_TNF_8831BGFF - Philips PAL ------------ */ | 713 | /* ------------ TUNER_TNF_8831BGFF - Philips PAL ------------ */ |
714 | 714 | ||
715 | static struct tuner_range tuner_tnf_8831bgff_pal_ranges[] = { | 715 | static struct tuner_range tuner_tnf_8831bgff_pal_ranges[] = { |
716 | { 16 * 161.25 /*MHz*/, 0x8e, 0xa0, }, | 716 | { 16 * 161.25 /*MHz*/, 0x8e, 0xa0, }, |
717 | { 16 * 463.25 /*MHz*/, 0x8e, 0x90, }, | 717 | { 16 * 463.25 /*MHz*/, 0x8e, 0x90, }, |
718 | { 16 * 999.99 , 0x8e, 0x30, }, | 718 | { 16 * 999.99 , 0x8e, 0x30, }, |
719 | }; | 719 | }; |
720 | 720 | ||
721 | static struct tuner_params tuner_tnf_8831bgff_params[] = { | 721 | static struct tuner_params tuner_tnf_8831bgff_params[] = { |
722 | { | 722 | { |
723 | .type = TUNER_PARAM_TYPE_PAL, | 723 | .type = TUNER_PARAM_TYPE_PAL, |
724 | .ranges = tuner_tnf_8831bgff_pal_ranges, | 724 | .ranges = tuner_tnf_8831bgff_pal_ranges, |
725 | .count = ARRAY_SIZE(tuner_tnf_8831bgff_pal_ranges), | 725 | .count = ARRAY_SIZE(tuner_tnf_8831bgff_pal_ranges), |
726 | }, | 726 | }, |
727 | }; | 727 | }; |
728 | 728 | ||
729 | /* ------------ TUNER_MICROTUNE_4042FI5 - Microtune NTSC ------------ */ | 729 | /* ------------ TUNER_MICROTUNE_4042FI5 - Microtune NTSC ------------ */ |
730 | 730 | ||
731 | static struct tuner_range tuner_microtune_4042fi5_ntsc_ranges[] = { | 731 | static struct tuner_range tuner_microtune_4042fi5_ntsc_ranges[] = { |
732 | { 16 * 162.00 /*MHz*/, 0x8e, 0xa2, }, | 732 | { 16 * 162.00 /*MHz*/, 0x8e, 0xa2, }, |
733 | { 16 * 457.00 /*MHz*/, 0x8e, 0x94, }, | 733 | { 16 * 457.00 /*MHz*/, 0x8e, 0x94, }, |
734 | { 16 * 999.99 , 0x8e, 0x31, }, | 734 | { 16 * 999.99 , 0x8e, 0x31, }, |
735 | }; | 735 | }; |
736 | 736 | ||
737 | static struct tuner_range tuner_microtune_4042fi5_atsc_ranges[] = { | 737 | static struct tuner_range tuner_microtune_4042fi5_atsc_ranges[] = { |
738 | { 16 * 162.00 /*MHz*/, 0x8e, 0xa1, }, | 738 | { 16 * 162.00 /*MHz*/, 0x8e, 0xa1, }, |
739 | { 16 * 457.00 /*MHz*/, 0x8e, 0x91, }, | 739 | { 16 * 457.00 /*MHz*/, 0x8e, 0x91, }, |
740 | { 16 * 999.99 , 0x8e, 0x31, }, | 740 | { 16 * 999.99 , 0x8e, 0x31, }, |
741 | }; | 741 | }; |
742 | 742 | ||
743 | static struct tuner_params tuner_microtune_4042fi5_params[] = { | 743 | static struct tuner_params tuner_microtune_4042fi5_params[] = { |
744 | { | 744 | { |
745 | .type = TUNER_PARAM_TYPE_NTSC, | 745 | .type = TUNER_PARAM_TYPE_NTSC, |
746 | .ranges = tuner_microtune_4042fi5_ntsc_ranges, | 746 | .ranges = tuner_microtune_4042fi5_ntsc_ranges, |
747 | .count = ARRAY_SIZE(tuner_microtune_4042fi5_ntsc_ranges), | 747 | .count = ARRAY_SIZE(tuner_microtune_4042fi5_ntsc_ranges), |
748 | }, | 748 | }, |
749 | { | 749 | { |
750 | .type = TUNER_PARAM_TYPE_DIGITAL, | 750 | .type = TUNER_PARAM_TYPE_DIGITAL, |
751 | .ranges = tuner_microtune_4042fi5_atsc_ranges, | 751 | .ranges = tuner_microtune_4042fi5_atsc_ranges, |
752 | .count = ARRAY_SIZE(tuner_microtune_4042fi5_atsc_ranges), | 752 | .count = ARRAY_SIZE(tuner_microtune_4042fi5_atsc_ranges), |
753 | .iffreq = 16 * 44.00 /*MHz*/, | 753 | .iffreq = 16 * 44.00 /*MHz*/, |
754 | }, | 754 | }, |
755 | }; | 755 | }; |
756 | 756 | ||
757 | /* 50-59 */ | 757 | /* 50-59 */ |
758 | /* ------------ TUNER_TCL_2002N - TCL NTSC ------------ */ | 758 | /* ------------ TUNER_TCL_2002N - TCL NTSC ------------ */ |
759 | 759 | ||
760 | static struct tuner_range tuner_tcl_2002n_ntsc_ranges[] = { | 760 | static struct tuner_range tuner_tcl_2002n_ntsc_ranges[] = { |
761 | { 16 * 172.00 /*MHz*/, 0x8e, 0x01, }, | 761 | { 16 * 172.00 /*MHz*/, 0x8e, 0x01, }, |
762 | { 16 * 448.00 /*MHz*/, 0x8e, 0x02, }, | 762 | { 16 * 448.00 /*MHz*/, 0x8e, 0x02, }, |
763 | { 16 * 999.99 , 0x8e, 0x08, }, | 763 | { 16 * 999.99 , 0x8e, 0x08, }, |
764 | }; | 764 | }; |
765 | 765 | ||
766 | static struct tuner_params tuner_tcl_2002n_params[] = { | 766 | static struct tuner_params tuner_tcl_2002n_params[] = { |
767 | { | 767 | { |
768 | .type = TUNER_PARAM_TYPE_NTSC, | 768 | .type = TUNER_PARAM_TYPE_NTSC, |
769 | .ranges = tuner_tcl_2002n_ntsc_ranges, | 769 | .ranges = tuner_tcl_2002n_ntsc_ranges, |
770 | .count = ARRAY_SIZE(tuner_tcl_2002n_ntsc_ranges), | 770 | .count = ARRAY_SIZE(tuner_tcl_2002n_ntsc_ranges), |
771 | .cb_first_if_lower_freq = 1, | 771 | .cb_first_if_lower_freq = 1, |
772 | }, | 772 | }, |
773 | }; | 773 | }; |
774 | 774 | ||
775 | /* ------------ TUNER_PHILIPS_FM1256_IH3 - Philips PAL ------------ */ | 775 | /* ------------ TUNER_PHILIPS_FM1256_IH3 - Philips PAL ------------ */ |
776 | 776 | ||
777 | static struct tuner_params tuner_philips_fm1256_ih3_params[] = { | 777 | static struct tuner_params tuner_philips_fm1256_ih3_params[] = { |
778 | { | 778 | { |
779 | .type = TUNER_PARAM_TYPE_PAL, | 779 | .type = TUNER_PARAM_TYPE_PAL, |
780 | .ranges = tuner_fm1236_mk3_ntsc_ranges, | 780 | .ranges = tuner_fm1236_mk3_ntsc_ranges, |
781 | .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges), | 781 | .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges), |
782 | .radio_if = 1, /* 33.3 MHz */ | 782 | .radio_if = 1, /* 33.3 MHz */ |
783 | }, | 783 | }, |
784 | }; | 784 | }; |
785 | 785 | ||
786 | /* ------------ TUNER_THOMSON_DTT7610 - THOMSON ATSC ------------ */ | 786 | /* ------------ TUNER_THOMSON_DTT7610 - THOMSON ATSC ------------ */ |
787 | 787 | ||
788 | /* single range used for both ntsc and atsc */ | 788 | /* single range used for both ntsc and atsc */ |
789 | static struct tuner_range tuner_thomson_dtt7610_ntsc_ranges[] = { | 789 | static struct tuner_range tuner_thomson_dtt7610_ntsc_ranges[] = { |
790 | { 16 * 157.25 /*MHz*/, 0x8e, 0x39, }, | 790 | { 16 * 157.25 /*MHz*/, 0x8e, 0x39, }, |
791 | { 16 * 454.00 /*MHz*/, 0x8e, 0x3a, }, | 791 | { 16 * 454.00 /*MHz*/, 0x8e, 0x3a, }, |
792 | { 16 * 999.99 , 0x8e, 0x3c, }, | 792 | { 16 * 999.99 , 0x8e, 0x3c, }, |
793 | }; | 793 | }; |
794 | 794 | ||
795 | static struct tuner_params tuner_thomson_dtt7610_params[] = { | 795 | static struct tuner_params tuner_thomson_dtt7610_params[] = { |
796 | { | 796 | { |
797 | .type = TUNER_PARAM_TYPE_NTSC, | 797 | .type = TUNER_PARAM_TYPE_NTSC, |
798 | .ranges = tuner_thomson_dtt7610_ntsc_ranges, | 798 | .ranges = tuner_thomson_dtt7610_ntsc_ranges, |
799 | .count = ARRAY_SIZE(tuner_thomson_dtt7610_ntsc_ranges), | 799 | .count = ARRAY_SIZE(tuner_thomson_dtt7610_ntsc_ranges), |
800 | }, | 800 | }, |
801 | { | 801 | { |
802 | .type = TUNER_PARAM_TYPE_DIGITAL, | 802 | .type = TUNER_PARAM_TYPE_DIGITAL, |
803 | .ranges = tuner_thomson_dtt7610_ntsc_ranges, | 803 | .ranges = tuner_thomson_dtt7610_ntsc_ranges, |
804 | .count = ARRAY_SIZE(tuner_thomson_dtt7610_ntsc_ranges), | 804 | .count = ARRAY_SIZE(tuner_thomson_dtt7610_ntsc_ranges), |
805 | .iffreq = 16 * 44.00 /*MHz*/, | 805 | .iffreq = 16 * 44.00 /*MHz*/, |
806 | }, | 806 | }, |
807 | }; | 807 | }; |
808 | 808 | ||
809 | /* ------------ TUNER_PHILIPS_FQ1286 - Philips NTSC ------------ */ | 809 | /* ------------ TUNER_PHILIPS_FQ1286 - Philips NTSC ------------ */ |
810 | 810 | ||
811 | static struct tuner_range tuner_philips_fq1286_ntsc_ranges[] = { | 811 | static struct tuner_range tuner_philips_fq1286_ntsc_ranges[] = { |
812 | { 16 * 160.00 /*MHz*/, 0x8e, 0x41, }, | 812 | { 16 * 160.00 /*MHz*/, 0x8e, 0x41, }, |
813 | { 16 * 454.00 /*MHz*/, 0x8e, 0x42, }, | 813 | { 16 * 454.00 /*MHz*/, 0x8e, 0x42, }, |
814 | { 16 * 999.99 , 0x8e, 0x04, }, | 814 | { 16 * 999.99 , 0x8e, 0x04, }, |
815 | }; | 815 | }; |
816 | 816 | ||
817 | static struct tuner_params tuner_philips_fq1286_params[] = { | 817 | static struct tuner_params tuner_philips_fq1286_params[] = { |
818 | { | 818 | { |
819 | .type = TUNER_PARAM_TYPE_NTSC, | 819 | .type = TUNER_PARAM_TYPE_NTSC, |
820 | .ranges = tuner_philips_fq1286_ntsc_ranges, | 820 | .ranges = tuner_philips_fq1286_ntsc_ranges, |
821 | .count = ARRAY_SIZE(tuner_philips_fq1286_ntsc_ranges), | 821 | .count = ARRAY_SIZE(tuner_philips_fq1286_ntsc_ranges), |
822 | }, | 822 | }, |
823 | }; | 823 | }; |
824 | 824 | ||
825 | /* ------------ TUNER_TCL_2002MB - TCL PAL ------------ */ | 825 | /* ------------ TUNER_TCL_2002MB - TCL PAL ------------ */ |
826 | 826 | ||
827 | static struct tuner_range tuner_tcl_2002mb_pal_ranges[] = { | 827 | static struct tuner_range tuner_tcl_2002mb_pal_ranges[] = { |
828 | { 16 * 170.00 /*MHz*/, 0xce, 0x01, }, | 828 | { 16 * 170.00 /*MHz*/, 0xce, 0x01, }, |
829 | { 16 * 450.00 /*MHz*/, 0xce, 0x02, }, | 829 | { 16 * 450.00 /*MHz*/, 0xce, 0x02, }, |
830 | { 16 * 999.99 , 0xce, 0x08, }, | 830 | { 16 * 999.99 , 0xce, 0x08, }, |
831 | }; | 831 | }; |
832 | 832 | ||
833 | static struct tuner_params tuner_tcl_2002mb_params[] = { | 833 | static struct tuner_params tuner_tcl_2002mb_params[] = { |
834 | { | 834 | { |
835 | .type = TUNER_PARAM_TYPE_PAL, | 835 | .type = TUNER_PARAM_TYPE_PAL, |
836 | .ranges = tuner_tcl_2002mb_pal_ranges, | 836 | .ranges = tuner_tcl_2002mb_pal_ranges, |
837 | .count = ARRAY_SIZE(tuner_tcl_2002mb_pal_ranges), | 837 | .count = ARRAY_SIZE(tuner_tcl_2002mb_pal_ranges), |
838 | }, | 838 | }, |
839 | }; | 839 | }; |
840 | 840 | ||
841 | /* ------------ TUNER_PHILIPS_FQ1216AME_MK4 - Philips PAL ------------ */ | 841 | /* ------------ TUNER_PHILIPS_FQ1216AME_MK4 - Philips PAL ------------ */ |
842 | 842 | ||
843 | static struct tuner_range tuner_philips_fq12_6a___mk4_pal_ranges[] = { | 843 | static struct tuner_range tuner_philips_fq12_6a___mk4_pal_ranges[] = { |
844 | { 16 * 160.00 /*MHz*/, 0xce, 0x01, }, | 844 | { 16 * 160.00 /*MHz*/, 0xce, 0x01, }, |
845 | { 16 * 442.00 /*MHz*/, 0xce, 0x02, }, | 845 | { 16 * 442.00 /*MHz*/, 0xce, 0x02, }, |
846 | { 16 * 999.99 , 0xce, 0x04, }, | 846 | { 16 * 999.99 , 0xce, 0x04, }, |
847 | }; | 847 | }; |
848 | 848 | ||
849 | static struct tuner_params tuner_philips_fq1216ame_mk4_params[] = { | 849 | static struct tuner_params tuner_philips_fq1216ame_mk4_params[] = { |
850 | { | 850 | { |
851 | .type = TUNER_PARAM_TYPE_PAL, | 851 | .type = TUNER_PARAM_TYPE_PAL, |
852 | .ranges = tuner_philips_fq12_6a___mk4_pal_ranges, | 852 | .ranges = tuner_philips_fq12_6a___mk4_pal_ranges, |
853 | .count = ARRAY_SIZE(tuner_philips_fq12_6a___mk4_pal_ranges), | 853 | .count = ARRAY_SIZE(tuner_philips_fq12_6a___mk4_pal_ranges), |
854 | .has_tda9887 = 1, | 854 | .has_tda9887 = 1, |
855 | .port1_active = 1, | 855 | .port1_active = 1, |
856 | .port2_invert_for_secam_lc = 1, | 856 | .port2_invert_for_secam_lc = 1, |
857 | .default_top_mid = -2, | 857 | .default_top_mid = -2, |
858 | .default_top_secam_low = -2, | 858 | .default_top_secam_low = -2, |
859 | .default_top_secam_mid = -2, | 859 | .default_top_secam_mid = -2, |
860 | .default_top_secam_high = -2, | 860 | .default_top_secam_high = -2, |
861 | }, | 861 | }, |
862 | }; | 862 | }; |
863 | 863 | ||
864 | /* ------------ TUNER_PHILIPS_FQ1236A_MK4 - Philips NTSC ------------ */ | 864 | /* ------------ TUNER_PHILIPS_FQ1236A_MK4 - Philips NTSC ------------ */ |
865 | 865 | ||
866 | static struct tuner_params tuner_philips_fq1236a_mk4_params[] = { | 866 | static struct tuner_params tuner_philips_fq1236a_mk4_params[] = { |
867 | { | 867 | { |
868 | .type = TUNER_PARAM_TYPE_NTSC, | 868 | .type = TUNER_PARAM_TYPE_NTSC, |
869 | .ranges = tuner_fm1236_mk3_ntsc_ranges, | 869 | .ranges = tuner_fm1236_mk3_ntsc_ranges, |
870 | .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges), | 870 | .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges), |
871 | }, | 871 | }, |
872 | }; | 872 | }; |
873 | 873 | ||
874 | /* ------------ TUNER_YMEC_TVF_8531MF - Philips NTSC ------------ */ | 874 | /* ------------ TUNER_YMEC_TVF_8531MF - Philips NTSC ------------ */ |
875 | 875 | ||
876 | static struct tuner_params tuner_ymec_tvf_8531mf_params[] = { | 876 | static struct tuner_params tuner_ymec_tvf_8531mf_params[] = { |
877 | { | 877 | { |
878 | .type = TUNER_PARAM_TYPE_NTSC, | 878 | .type = TUNER_PARAM_TYPE_NTSC, |
879 | .ranges = tuner_philips_ntsc_m_ranges, | 879 | .ranges = tuner_philips_ntsc_m_ranges, |
880 | .count = ARRAY_SIZE(tuner_philips_ntsc_m_ranges), | 880 | .count = ARRAY_SIZE(tuner_philips_ntsc_m_ranges), |
881 | }, | 881 | }, |
882 | }; | 882 | }; |
883 | 883 | ||
884 | /* ------------ TUNER_YMEC_TVF_5533MF - Philips NTSC ------------ */ | 884 | /* ------------ TUNER_YMEC_TVF_5533MF - Philips NTSC ------------ */ |
885 | 885 | ||
886 | static struct tuner_range tuner_ymec_tvf_5533mf_ntsc_ranges[] = { | 886 | static struct tuner_range tuner_ymec_tvf_5533mf_ntsc_ranges[] = { |
887 | { 16 * 160.00 /*MHz*/, 0x8e, 0x01, }, | 887 | { 16 * 160.00 /*MHz*/, 0x8e, 0x01, }, |
888 | { 16 * 454.00 /*MHz*/, 0x8e, 0x02, }, | 888 | { 16 * 454.00 /*MHz*/, 0x8e, 0x02, }, |
889 | { 16 * 999.99 , 0x8e, 0x04, }, | 889 | { 16 * 999.99 , 0x8e, 0x04, }, |
890 | }; | 890 | }; |
891 | 891 | ||
892 | static struct tuner_params tuner_ymec_tvf_5533mf_params[] = { | 892 | static struct tuner_params tuner_ymec_tvf_5533mf_params[] = { |
893 | { | 893 | { |
894 | .type = TUNER_PARAM_TYPE_NTSC, | 894 | .type = TUNER_PARAM_TYPE_NTSC, |
895 | .ranges = tuner_ymec_tvf_5533mf_ntsc_ranges, | 895 | .ranges = tuner_ymec_tvf_5533mf_ntsc_ranges, |
896 | .count = ARRAY_SIZE(tuner_ymec_tvf_5533mf_ntsc_ranges), | 896 | .count = ARRAY_SIZE(tuner_ymec_tvf_5533mf_ntsc_ranges), |
897 | }, | 897 | }, |
898 | }; | 898 | }; |
899 | 899 | ||
900 | /* 60-69 */ | 900 | /* 60-69 */ |
901 | /* ------------ TUNER_THOMSON_DTT761X - THOMSON ATSC ------------ */ | 901 | /* ------------ TUNER_THOMSON_DTT761X - THOMSON ATSC ------------ */ |
902 | /* DTT 7611 7611A 7612 7613 7613A 7614 7615 7615A */ | 902 | /* DTT 7611 7611A 7612 7613 7613A 7614 7615 7615A */ |
903 | 903 | ||
904 | static struct tuner_range tuner_thomson_dtt761x_ntsc_ranges[] = { | 904 | static struct tuner_range tuner_thomson_dtt761x_ntsc_ranges[] = { |
905 | { 16 * 145.25 /*MHz*/, 0x8e, 0x39, }, | 905 | { 16 * 145.25 /*MHz*/, 0x8e, 0x39, }, |
906 | { 16 * 415.25 /*MHz*/, 0x8e, 0x3a, }, | 906 | { 16 * 415.25 /*MHz*/, 0x8e, 0x3a, }, |
907 | { 16 * 999.99 , 0x8e, 0x3c, }, | 907 | { 16 * 999.99 , 0x8e, 0x3c, }, |
908 | }; | 908 | }; |
909 | 909 | ||
910 | static struct tuner_range tuner_thomson_dtt761x_atsc_ranges[] = { | 910 | static struct tuner_range tuner_thomson_dtt761x_atsc_ranges[] = { |
911 | { 16 * 147.00 /*MHz*/, 0x8e, 0x39, }, | 911 | { 16 * 147.00 /*MHz*/, 0x8e, 0x39, }, |
912 | { 16 * 417.00 /*MHz*/, 0x8e, 0x3a, }, | 912 | { 16 * 417.00 /*MHz*/, 0x8e, 0x3a, }, |
913 | { 16 * 999.99 , 0x8e, 0x3c, }, | 913 | { 16 * 999.99 , 0x8e, 0x3c, }, |
914 | }; | 914 | }; |
915 | 915 | ||
916 | static struct tuner_params tuner_thomson_dtt761x_params[] = { | 916 | static struct tuner_params tuner_thomson_dtt761x_params[] = { |
917 | { | 917 | { |
918 | .type = TUNER_PARAM_TYPE_NTSC, | 918 | .type = TUNER_PARAM_TYPE_NTSC, |
919 | .ranges = tuner_thomson_dtt761x_ntsc_ranges, | 919 | .ranges = tuner_thomson_dtt761x_ntsc_ranges, |
920 | .count = ARRAY_SIZE(tuner_thomson_dtt761x_ntsc_ranges), | 920 | .count = ARRAY_SIZE(tuner_thomson_dtt761x_ntsc_ranges), |
921 | .has_tda9887 = 1, | 921 | .has_tda9887 = 1, |
922 | .fm_gain_normal = 1, | 922 | .fm_gain_normal = 1, |
923 | .radio_if = 2, /* 41.3 MHz */ | 923 | .radio_if = 2, /* 41.3 MHz */ |
924 | }, | 924 | }, |
925 | { | 925 | { |
926 | .type = TUNER_PARAM_TYPE_DIGITAL, | 926 | .type = TUNER_PARAM_TYPE_DIGITAL, |
927 | .ranges = tuner_thomson_dtt761x_atsc_ranges, | 927 | .ranges = tuner_thomson_dtt761x_atsc_ranges, |
928 | .count = ARRAY_SIZE(tuner_thomson_dtt761x_atsc_ranges), | 928 | .count = ARRAY_SIZE(tuner_thomson_dtt761x_atsc_ranges), |
929 | .iffreq = 16 * 44.00, /*MHz*/ | 929 | .iffreq = 16 * 44.00, /*MHz*/ |
930 | }, | 930 | }, |
931 | }; | 931 | }; |
932 | 932 | ||
933 | /* ------------ TUNER_TENA_9533_DI - Philips PAL ------------ */ | 933 | /* ------------ TUNER_TENA_9533_DI - Philips PAL ------------ */ |
934 | 934 | ||
935 | static struct tuner_range tuner_tena_9533_di_pal_ranges[] = { | 935 | static struct tuner_range tuner_tena_9533_di_pal_ranges[] = { |
936 | { 16 * 160.25 /*MHz*/, 0x8e, 0x01, }, | 936 | { 16 * 160.25 /*MHz*/, 0x8e, 0x01, }, |
937 | { 16 * 464.25 /*MHz*/, 0x8e, 0x02, }, | 937 | { 16 * 464.25 /*MHz*/, 0x8e, 0x02, }, |
938 | { 16 * 999.99 , 0x8e, 0x04, }, | 938 | { 16 * 999.99 , 0x8e, 0x04, }, |
939 | }; | 939 | }; |
940 | 940 | ||
941 | static struct tuner_params tuner_tena_9533_di_params[] = { | 941 | static struct tuner_params tuner_tena_9533_di_params[] = { |
942 | { | 942 | { |
943 | .type = TUNER_PARAM_TYPE_PAL, | 943 | .type = TUNER_PARAM_TYPE_PAL, |
944 | .ranges = tuner_tena_9533_di_pal_ranges, | 944 | .ranges = tuner_tena_9533_di_pal_ranges, |
945 | .count = ARRAY_SIZE(tuner_tena_9533_di_pal_ranges), | 945 | .count = ARRAY_SIZE(tuner_tena_9533_di_pal_ranges), |
946 | }, | 946 | }, |
947 | }; | 947 | }; |
948 | 948 | ||
949 | /* ------------ TUNER_PHILIPS_FMD1216ME_MK3 - Philips PAL ------------ */ | 949 | /* ------------ TUNER_PHILIPS_FMD1216ME(X)_MK3 - Philips PAL ------------ */ |
950 | 950 | ||
951 | static struct tuner_range tuner_philips_fmd1216me_mk3_pal_ranges[] = { | 951 | static struct tuner_range tuner_philips_fmd1216me_mk3_pal_ranges[] = { |
952 | { 16 * 160.00 /*MHz*/, 0x86, 0x51, }, | 952 | { 16 * 160.00 /*MHz*/, 0x86, 0x51, }, |
953 | { 16 * 442.00 /*MHz*/, 0x86, 0x52, }, | 953 | { 16 * 442.00 /*MHz*/, 0x86, 0x52, }, |
954 | { 16 * 999.99 , 0x86, 0x54, }, | 954 | { 16 * 999.99 , 0x86, 0x54, }, |
955 | }; | 955 | }; |
956 | 956 | ||
957 | static struct tuner_range tuner_philips_fmd1216me_mk3_dvb_ranges[] = { | 957 | static struct tuner_range tuner_philips_fmd1216me_mk3_dvb_ranges[] = { |
958 | { 16 * 143.87 /*MHz*/, 0xbc, 0x41 }, | 958 | { 16 * 143.87 /*MHz*/, 0xbc, 0x41 }, |
959 | { 16 * 158.87 /*MHz*/, 0xf4, 0x41 }, | 959 | { 16 * 158.87 /*MHz*/, 0xf4, 0x41 }, |
960 | { 16 * 329.87 /*MHz*/, 0xbc, 0x42 }, | 960 | { 16 * 329.87 /*MHz*/, 0xbc, 0x42 }, |
961 | { 16 * 441.87 /*MHz*/, 0xf4, 0x42 }, | 961 | { 16 * 441.87 /*MHz*/, 0xf4, 0x42 }, |
962 | { 16 * 625.87 /*MHz*/, 0xbc, 0x44 }, | 962 | { 16 * 625.87 /*MHz*/, 0xbc, 0x44 }, |
963 | { 16 * 803.87 /*MHz*/, 0xf4, 0x44 }, | 963 | { 16 * 803.87 /*MHz*/, 0xf4, 0x44 }, |
964 | { 16 * 999.99 , 0xfc, 0x44 }, | 964 | { 16 * 999.99 , 0xfc, 0x44 }, |
965 | }; | 965 | }; |
966 | 966 | ||
967 | static struct tuner_params tuner_philips_fmd1216me_mk3_params[] = { | 967 | static struct tuner_params tuner_philips_fmd1216me_mk3_params[] = { |
968 | { | 968 | { |
969 | .type = TUNER_PARAM_TYPE_PAL, | 969 | .type = TUNER_PARAM_TYPE_PAL, |
970 | .ranges = tuner_philips_fmd1216me_mk3_pal_ranges, | 970 | .ranges = tuner_philips_fmd1216me_mk3_pal_ranges, |
971 | .count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_pal_ranges), | 971 | .count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_pal_ranges), |
972 | .has_tda9887 = 1, | 972 | .has_tda9887 = 1, |
973 | .port1_active = 1, | 973 | .port1_active = 1, |
974 | .port2_active = 1, | 974 | .port2_active = 1, |
975 | .port2_fm_high_sensitivity = 1, | 975 | .port2_fm_high_sensitivity = 1, |
976 | .port2_invert_for_secam_lc = 1, | 976 | .port2_invert_for_secam_lc = 1, |
977 | .port1_set_for_fm_mono = 1, | 977 | .port1_set_for_fm_mono = 1, |
978 | }, | 978 | }, |
979 | { | 979 | { |
980 | .type = TUNER_PARAM_TYPE_DIGITAL, | 980 | .type = TUNER_PARAM_TYPE_DIGITAL, |
981 | .ranges = tuner_philips_fmd1216me_mk3_dvb_ranges, | 981 | .ranges = tuner_philips_fmd1216me_mk3_dvb_ranges, |
982 | .count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_dvb_ranges), | 982 | .count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_dvb_ranges), |
983 | .iffreq = 16 * 36.125, /*MHz*/ | 983 | .iffreq = 16 * 36.125, /*MHz*/ |
984 | }, | 984 | }, |
985 | }; | 985 | }; |
986 | 986 | ||
987 | static struct tuner_params tuner_philips_fmd1216mex_mk3_params[] = { | ||
988 | { | ||
989 | .type = TUNER_PARAM_TYPE_PAL, | ||
990 | .ranges = tuner_philips_fmd1216me_mk3_pal_ranges, | ||
991 | .count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_pal_ranges), | ||
992 | .has_tda9887 = 1, | ||
993 | .port1_active = 1, | ||
994 | .port2_active = 1, | ||
995 | .port2_fm_high_sensitivity = 1, | ||
996 | .port2_invert_for_secam_lc = 1, | ||
997 | .port1_set_for_fm_mono = 1, | ||
998 | .radio_if = 1, | ||
999 | .fm_gain_normal = 1, | ||
1000 | }, | ||
1001 | { | ||
1002 | .type = TUNER_PARAM_TYPE_DIGITAL, | ||
1003 | .ranges = tuner_philips_fmd1216me_mk3_dvb_ranges, | ||
1004 | .count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_dvb_ranges), | ||
1005 | .iffreq = 16 * 36.125, /*MHz*/ | ||
1006 | }, | ||
1007 | }; | ||
987 | 1008 | ||
988 | /* ------ TUNER_LG_TDVS_H06XF - LG INNOTEK / INFINEON ATSC ----- */ | 1009 | /* ------ TUNER_LG_TDVS_H06XF - LG INNOTEK / INFINEON ATSC ----- */ |
989 | 1010 | ||
990 | static struct tuner_range tuner_tua6034_ntsc_ranges[] = { | 1011 | static struct tuner_range tuner_tua6034_ntsc_ranges[] = { |
991 | { 16 * 165.00 /*MHz*/, 0x8e, 0x01 }, | 1012 | { 16 * 165.00 /*MHz*/, 0x8e, 0x01 }, |
992 | { 16 * 450.00 /*MHz*/, 0x8e, 0x02 }, | 1013 | { 16 * 450.00 /*MHz*/, 0x8e, 0x02 }, |
993 | { 16 * 999.99 , 0x8e, 0x04 }, | 1014 | { 16 * 999.99 , 0x8e, 0x04 }, |
994 | }; | 1015 | }; |
995 | 1016 | ||
996 | static struct tuner_range tuner_tua6034_atsc_ranges[] = { | 1017 | static struct tuner_range tuner_tua6034_atsc_ranges[] = { |
997 | { 16 * 165.00 /*MHz*/, 0xce, 0x01 }, | 1018 | { 16 * 165.00 /*MHz*/, 0xce, 0x01 }, |
998 | { 16 * 450.00 /*MHz*/, 0xce, 0x02 }, | 1019 | { 16 * 450.00 /*MHz*/, 0xce, 0x02 }, |
999 | { 16 * 999.99 , 0xce, 0x04 }, | 1020 | { 16 * 999.99 , 0xce, 0x04 }, |
1000 | }; | 1021 | }; |
1001 | 1022 | ||
1002 | static struct tuner_params tuner_lg_tdvs_h06xf_params[] = { | 1023 | static struct tuner_params tuner_lg_tdvs_h06xf_params[] = { |
1003 | { | 1024 | { |
1004 | .type = TUNER_PARAM_TYPE_NTSC, | 1025 | .type = TUNER_PARAM_TYPE_NTSC, |
1005 | .ranges = tuner_tua6034_ntsc_ranges, | 1026 | .ranges = tuner_tua6034_ntsc_ranges, |
1006 | .count = ARRAY_SIZE(tuner_tua6034_ntsc_ranges), | 1027 | .count = ARRAY_SIZE(tuner_tua6034_ntsc_ranges), |
1007 | }, | 1028 | }, |
1008 | { | 1029 | { |
1009 | .type = TUNER_PARAM_TYPE_DIGITAL, | 1030 | .type = TUNER_PARAM_TYPE_DIGITAL, |
1010 | .ranges = tuner_tua6034_atsc_ranges, | 1031 | .ranges = tuner_tua6034_atsc_ranges, |
1011 | .count = ARRAY_SIZE(tuner_tua6034_atsc_ranges), | 1032 | .count = ARRAY_SIZE(tuner_tua6034_atsc_ranges), |
1012 | .iffreq = 16 * 44.00, | 1033 | .iffreq = 16 * 44.00, |
1013 | }, | 1034 | }, |
1014 | }; | 1035 | }; |
1015 | 1036 | ||
1016 | /* ------------ TUNER_YMEC_TVF66T5_B_DFF - Philips PAL ------------ */ | 1037 | /* ------------ TUNER_YMEC_TVF66T5_B_DFF - Philips PAL ------------ */ |
1017 | 1038 | ||
1018 | static struct tuner_range tuner_ymec_tvf66t5_b_dff_pal_ranges[] = { | 1039 | static struct tuner_range tuner_ymec_tvf66t5_b_dff_pal_ranges[] = { |
1019 | { 16 * 160.25 /*MHz*/, 0x8e, 0x01, }, | 1040 | { 16 * 160.25 /*MHz*/, 0x8e, 0x01, }, |
1020 | { 16 * 464.25 /*MHz*/, 0x8e, 0x02, }, | 1041 | { 16 * 464.25 /*MHz*/, 0x8e, 0x02, }, |
1021 | { 16 * 999.99 , 0x8e, 0x08, }, | 1042 | { 16 * 999.99 , 0x8e, 0x08, }, |
1022 | }; | 1043 | }; |
1023 | 1044 | ||
1024 | static struct tuner_params tuner_ymec_tvf66t5_b_dff_params[] = { | 1045 | static struct tuner_params tuner_ymec_tvf66t5_b_dff_params[] = { |
1025 | { | 1046 | { |
1026 | .type = TUNER_PARAM_TYPE_PAL, | 1047 | .type = TUNER_PARAM_TYPE_PAL, |
1027 | .ranges = tuner_ymec_tvf66t5_b_dff_pal_ranges, | 1048 | .ranges = tuner_ymec_tvf66t5_b_dff_pal_ranges, |
1028 | .count = ARRAY_SIZE(tuner_ymec_tvf66t5_b_dff_pal_ranges), | 1049 | .count = ARRAY_SIZE(tuner_ymec_tvf66t5_b_dff_pal_ranges), |
1029 | }, | 1050 | }, |
1030 | }; | 1051 | }; |
1031 | 1052 | ||
1032 | /* ------------ TUNER_LG_NTSC_TALN_MINI - LGINNOTEK NTSC ------------ */ | 1053 | /* ------------ TUNER_LG_NTSC_TALN_MINI - LGINNOTEK NTSC ------------ */ |
1033 | 1054 | ||
1034 | static struct tuner_range tuner_lg_taln_ntsc_ranges[] = { | 1055 | static struct tuner_range tuner_lg_taln_ntsc_ranges[] = { |
1035 | { 16 * 137.25 /*MHz*/, 0x8e, 0x01, }, | 1056 | { 16 * 137.25 /*MHz*/, 0x8e, 0x01, }, |
1036 | { 16 * 373.25 /*MHz*/, 0x8e, 0x02, }, | 1057 | { 16 * 373.25 /*MHz*/, 0x8e, 0x02, }, |
1037 | { 16 * 999.99 , 0x8e, 0x08, }, | 1058 | { 16 * 999.99 , 0x8e, 0x08, }, |
1038 | }; | 1059 | }; |
1039 | 1060 | ||
1040 | static struct tuner_range tuner_lg_taln_pal_secam_ranges[] = { | 1061 | static struct tuner_range tuner_lg_taln_pal_secam_ranges[] = { |
1041 | { 16 * 150.00 /*MHz*/, 0x8e, 0x01, }, | 1062 | { 16 * 150.00 /*MHz*/, 0x8e, 0x01, }, |
1042 | { 16 * 425.00 /*MHz*/, 0x8e, 0x02, }, | 1063 | { 16 * 425.00 /*MHz*/, 0x8e, 0x02, }, |
1043 | { 16 * 999.99 , 0x8e, 0x08, }, | 1064 | { 16 * 999.99 , 0x8e, 0x08, }, |
1044 | }; | 1065 | }; |
1045 | 1066 | ||
1046 | static struct tuner_params tuner_lg_taln_params[] = { | 1067 | static struct tuner_params tuner_lg_taln_params[] = { |
1047 | { | 1068 | { |
1048 | .type = TUNER_PARAM_TYPE_NTSC, | 1069 | .type = TUNER_PARAM_TYPE_NTSC, |
1049 | .ranges = tuner_lg_taln_ntsc_ranges, | 1070 | .ranges = tuner_lg_taln_ntsc_ranges, |
1050 | .count = ARRAY_SIZE(tuner_lg_taln_ntsc_ranges), | 1071 | .count = ARRAY_SIZE(tuner_lg_taln_ntsc_ranges), |
1051 | },{ | 1072 | },{ |
1052 | .type = TUNER_PARAM_TYPE_PAL, | 1073 | .type = TUNER_PARAM_TYPE_PAL, |
1053 | .ranges = tuner_lg_taln_pal_secam_ranges, | 1074 | .ranges = tuner_lg_taln_pal_secam_ranges, |
1054 | .count = ARRAY_SIZE(tuner_lg_taln_pal_secam_ranges), | 1075 | .count = ARRAY_SIZE(tuner_lg_taln_pal_secam_ranges), |
1055 | }, | 1076 | }, |
1056 | }; | 1077 | }; |
1057 | 1078 | ||
1058 | /* ------------ TUNER_PHILIPS_TD1316 - Philips PAL ------------ */ | 1079 | /* ------------ TUNER_PHILIPS_TD1316 - Philips PAL ------------ */ |
1059 | 1080 | ||
1060 | static struct tuner_range tuner_philips_td1316_pal_ranges[] = { | 1081 | static struct tuner_range tuner_philips_td1316_pal_ranges[] = { |
1061 | { 16 * 160.00 /*MHz*/, 0xc8, 0xa1, }, | 1082 | { 16 * 160.00 /*MHz*/, 0xc8, 0xa1, }, |
1062 | { 16 * 442.00 /*MHz*/, 0xc8, 0xa2, }, | 1083 | { 16 * 442.00 /*MHz*/, 0xc8, 0xa2, }, |
1063 | { 16 * 999.99 , 0xc8, 0xa4, }, | 1084 | { 16 * 999.99 , 0xc8, 0xa4, }, |
1064 | }; | 1085 | }; |
1065 | 1086 | ||
1066 | static struct tuner_range tuner_philips_td1316_dvb_ranges[] = { | 1087 | static struct tuner_range tuner_philips_td1316_dvb_ranges[] = { |
1067 | { 16 * 93.834 /*MHz*/, 0xca, 0x60, }, | 1088 | { 16 * 93.834 /*MHz*/, 0xca, 0x60, }, |
1068 | { 16 * 123.834 /*MHz*/, 0xca, 0xa0, }, | 1089 | { 16 * 123.834 /*MHz*/, 0xca, 0xa0, }, |
1069 | { 16 * 163.834 /*MHz*/, 0xca, 0xc0, }, | 1090 | { 16 * 163.834 /*MHz*/, 0xca, 0xc0, }, |
1070 | { 16 * 253.834 /*MHz*/, 0xca, 0x60, }, | 1091 | { 16 * 253.834 /*MHz*/, 0xca, 0x60, }, |
1071 | { 16 * 383.834 /*MHz*/, 0xca, 0xa0, }, | 1092 | { 16 * 383.834 /*MHz*/, 0xca, 0xa0, }, |
1072 | { 16 * 443.834 /*MHz*/, 0xca, 0xc0, }, | 1093 | { 16 * 443.834 /*MHz*/, 0xca, 0xc0, }, |
1073 | { 16 * 583.834 /*MHz*/, 0xca, 0x60, }, | 1094 | { 16 * 583.834 /*MHz*/, 0xca, 0x60, }, |
1074 | { 16 * 793.834 /*MHz*/, 0xca, 0xa0, }, | 1095 | { 16 * 793.834 /*MHz*/, 0xca, 0xa0, }, |
1075 | { 16 * 999.999 , 0xca, 0xe0, }, | 1096 | { 16 * 999.999 , 0xca, 0xe0, }, |
1076 | }; | 1097 | }; |
1077 | 1098 | ||
1078 | static struct tuner_params tuner_philips_td1316_params[] = { | 1099 | static struct tuner_params tuner_philips_td1316_params[] = { |
1079 | { | 1100 | { |
1080 | .type = TUNER_PARAM_TYPE_PAL, | 1101 | .type = TUNER_PARAM_TYPE_PAL, |
1081 | .ranges = tuner_philips_td1316_pal_ranges, | 1102 | .ranges = tuner_philips_td1316_pal_ranges, |
1082 | .count = ARRAY_SIZE(tuner_philips_td1316_pal_ranges), | 1103 | .count = ARRAY_SIZE(tuner_philips_td1316_pal_ranges), |
1083 | }, | 1104 | }, |
1084 | { | 1105 | { |
1085 | .type = TUNER_PARAM_TYPE_DIGITAL, | 1106 | .type = TUNER_PARAM_TYPE_DIGITAL, |
1086 | .ranges = tuner_philips_td1316_dvb_ranges, | 1107 | .ranges = tuner_philips_td1316_dvb_ranges, |
1087 | .count = ARRAY_SIZE(tuner_philips_td1316_dvb_ranges), | 1108 | .count = ARRAY_SIZE(tuner_philips_td1316_dvb_ranges), |
1088 | .iffreq = 16 * 36.166667 /*MHz*/, | 1109 | .iffreq = 16 * 36.166667 /*MHz*/, |
1089 | }, | 1110 | }, |
1090 | }; | 1111 | }; |
1091 | 1112 | ||
1092 | /* ------------ TUNER_PHILIPS_TUV1236D - Philips ATSC ------------ */ | 1113 | /* ------------ TUNER_PHILIPS_TUV1236D - Philips ATSC ------------ */ |
1093 | 1114 | ||
1094 | static struct tuner_range tuner_tuv1236d_ntsc_ranges[] = { | 1115 | static struct tuner_range tuner_tuv1236d_ntsc_ranges[] = { |
1095 | { 16 * 157.25 /*MHz*/, 0xce, 0x01, }, | 1116 | { 16 * 157.25 /*MHz*/, 0xce, 0x01, }, |
1096 | { 16 * 454.00 /*MHz*/, 0xce, 0x02, }, | 1117 | { 16 * 454.00 /*MHz*/, 0xce, 0x02, }, |
1097 | { 16 * 999.99 , 0xce, 0x04, }, | 1118 | { 16 * 999.99 , 0xce, 0x04, }, |
1098 | }; | 1119 | }; |
1099 | 1120 | ||
1100 | static struct tuner_range tuner_tuv1236d_atsc_ranges[] = { | 1121 | static struct tuner_range tuner_tuv1236d_atsc_ranges[] = { |
1101 | { 16 * 157.25 /*MHz*/, 0xc6, 0x41, }, | 1122 | { 16 * 157.25 /*MHz*/, 0xc6, 0x41, }, |
1102 | { 16 * 454.00 /*MHz*/, 0xc6, 0x42, }, | 1123 | { 16 * 454.00 /*MHz*/, 0xc6, 0x42, }, |
1103 | { 16 * 999.99 , 0xc6, 0x44, }, | 1124 | { 16 * 999.99 , 0xc6, 0x44, }, |
1104 | }; | 1125 | }; |
1105 | 1126 | ||
1106 | static struct tuner_params tuner_tuv1236d_params[] = { | 1127 | static struct tuner_params tuner_tuv1236d_params[] = { |
1107 | { | 1128 | { |
1108 | .type = TUNER_PARAM_TYPE_NTSC, | 1129 | .type = TUNER_PARAM_TYPE_NTSC, |
1109 | .ranges = tuner_tuv1236d_ntsc_ranges, | 1130 | .ranges = tuner_tuv1236d_ntsc_ranges, |
1110 | .count = ARRAY_SIZE(tuner_tuv1236d_ntsc_ranges), | 1131 | .count = ARRAY_SIZE(tuner_tuv1236d_ntsc_ranges), |
1111 | }, | 1132 | }, |
1112 | { | 1133 | { |
1113 | .type = TUNER_PARAM_TYPE_DIGITAL, | 1134 | .type = TUNER_PARAM_TYPE_DIGITAL, |
1114 | .ranges = tuner_tuv1236d_atsc_ranges, | 1135 | .ranges = tuner_tuv1236d_atsc_ranges, |
1115 | .count = ARRAY_SIZE(tuner_tuv1236d_atsc_ranges), | 1136 | .count = ARRAY_SIZE(tuner_tuv1236d_atsc_ranges), |
1116 | .iffreq = 16 * 44.00, | 1137 | .iffreq = 16 * 44.00, |
1117 | }, | 1138 | }, |
1118 | }; | 1139 | }; |
1119 | 1140 | ||
1120 | /* ------------ TUNER_TNF_xxx5 - Texas Instruments--------- */ | 1141 | /* ------------ TUNER_TNF_xxx5 - Texas Instruments--------- */ |
1121 | /* This is known to work with Tenna TVF58t5-MFF and TVF5835 MFF | 1142 | /* This is known to work with Tenna TVF58t5-MFF and TVF5835 MFF |
1122 | * but it is expected to work also with other Tenna/Ymec | 1143 | * but it is expected to work also with other Tenna/Ymec |
1123 | * models based on TI SN 761677 chip on both PAL and NTSC | 1144 | * models based on TI SN 761677 chip on both PAL and NTSC |
1124 | */ | 1145 | */ |
1125 | 1146 | ||
1126 | static struct tuner_range tuner_tnf_5335_d_if_pal_ranges[] = { | 1147 | static struct tuner_range tuner_tnf_5335_d_if_pal_ranges[] = { |
1127 | { 16 * 168.25 /*MHz*/, 0x8e, 0x01, }, | 1148 | { 16 * 168.25 /*MHz*/, 0x8e, 0x01, }, |
1128 | { 16 * 471.25 /*MHz*/, 0x8e, 0x02, }, | 1149 | { 16 * 471.25 /*MHz*/, 0x8e, 0x02, }, |
1129 | { 16 * 999.99 , 0x8e, 0x08, }, | 1150 | { 16 * 999.99 , 0x8e, 0x08, }, |
1130 | }; | 1151 | }; |
1131 | 1152 | ||
1132 | static struct tuner_range tuner_tnf_5335mf_ntsc_ranges[] = { | 1153 | static struct tuner_range tuner_tnf_5335mf_ntsc_ranges[] = { |
1133 | { 16 * 169.25 /*MHz*/, 0x8e, 0x01, }, | 1154 | { 16 * 169.25 /*MHz*/, 0x8e, 0x01, }, |
1134 | { 16 * 469.25 /*MHz*/, 0x8e, 0x02, }, | 1155 | { 16 * 469.25 /*MHz*/, 0x8e, 0x02, }, |
1135 | { 16 * 999.99 , 0x8e, 0x08, }, | 1156 | { 16 * 999.99 , 0x8e, 0x08, }, |
1136 | }; | 1157 | }; |
1137 | 1158 | ||
1138 | static struct tuner_params tuner_tnf_5335mf_params[] = { | 1159 | static struct tuner_params tuner_tnf_5335mf_params[] = { |
1139 | { | 1160 | { |
1140 | .type = TUNER_PARAM_TYPE_NTSC, | 1161 | .type = TUNER_PARAM_TYPE_NTSC, |
1141 | .ranges = tuner_tnf_5335mf_ntsc_ranges, | 1162 | .ranges = tuner_tnf_5335mf_ntsc_ranges, |
1142 | .count = ARRAY_SIZE(tuner_tnf_5335mf_ntsc_ranges), | 1163 | .count = ARRAY_SIZE(tuner_tnf_5335mf_ntsc_ranges), |
1143 | }, | 1164 | }, |
1144 | { | 1165 | { |
1145 | .type = TUNER_PARAM_TYPE_PAL, | 1166 | .type = TUNER_PARAM_TYPE_PAL, |
1146 | .ranges = tuner_tnf_5335_d_if_pal_ranges, | 1167 | .ranges = tuner_tnf_5335_d_if_pal_ranges, |
1147 | .count = ARRAY_SIZE(tuner_tnf_5335_d_if_pal_ranges), | 1168 | .count = ARRAY_SIZE(tuner_tnf_5335_d_if_pal_ranges), |
1148 | }, | 1169 | }, |
1149 | }; | 1170 | }; |
1150 | 1171 | ||
1151 | /* 70-79 */ | 1172 | /* 70-79 */ |
1152 | /* ------------ TUNER_SAMSUNG_TCPN_2121P30A - Samsung NTSC ------------ */ | 1173 | /* ------------ TUNER_SAMSUNG_TCPN_2121P30A - Samsung NTSC ------------ */ |
1153 | 1174 | ||
1154 | /* '+ 4' turns on the Low Noise Amplifier */ | 1175 | /* '+ 4' turns on the Low Noise Amplifier */ |
1155 | static struct tuner_range tuner_samsung_tcpn_2121p30a_ntsc_ranges[] = { | 1176 | static struct tuner_range tuner_samsung_tcpn_2121p30a_ntsc_ranges[] = { |
1156 | { 16 * 130.00 /*MHz*/, 0xce, 0x01 + 4, }, | 1177 | { 16 * 130.00 /*MHz*/, 0xce, 0x01 + 4, }, |
1157 | { 16 * 364.50 /*MHz*/, 0xce, 0x02 + 4, }, | 1178 | { 16 * 364.50 /*MHz*/, 0xce, 0x02 + 4, }, |
1158 | { 16 * 999.99 , 0xce, 0x08 + 4, }, | 1179 | { 16 * 999.99 , 0xce, 0x08 + 4, }, |
1159 | }; | 1180 | }; |
1160 | 1181 | ||
1161 | static struct tuner_params tuner_samsung_tcpn_2121p30a_params[] = { | 1182 | static struct tuner_params tuner_samsung_tcpn_2121p30a_params[] = { |
1162 | { | 1183 | { |
1163 | .type = TUNER_PARAM_TYPE_NTSC, | 1184 | .type = TUNER_PARAM_TYPE_NTSC, |
1164 | .ranges = tuner_samsung_tcpn_2121p30a_ntsc_ranges, | 1185 | .ranges = tuner_samsung_tcpn_2121p30a_ntsc_ranges, |
1165 | .count = ARRAY_SIZE(tuner_samsung_tcpn_2121p30a_ntsc_ranges), | 1186 | .count = ARRAY_SIZE(tuner_samsung_tcpn_2121p30a_ntsc_ranges), |
1166 | }, | 1187 | }, |
1167 | }; | 1188 | }; |
1168 | 1189 | ||
1169 | /* ------------ TUNER_THOMSON_FE6600 - DViCO Hybrid PAL ------------ */ | 1190 | /* ------------ TUNER_THOMSON_FE6600 - DViCO Hybrid PAL ------------ */ |
1170 | 1191 | ||
1171 | static struct tuner_range tuner_thomson_fe6600_pal_ranges[] = { | 1192 | static struct tuner_range tuner_thomson_fe6600_pal_ranges[] = { |
1172 | { 16 * 160.00 /*MHz*/, 0xfe, 0x11, }, | 1193 | { 16 * 160.00 /*MHz*/, 0xfe, 0x11, }, |
1173 | { 16 * 442.00 /*MHz*/, 0xf6, 0x12, }, | 1194 | { 16 * 442.00 /*MHz*/, 0xf6, 0x12, }, |
1174 | { 16 * 999.99 , 0xf6, 0x18, }, | 1195 | { 16 * 999.99 , 0xf6, 0x18, }, |
1175 | }; | 1196 | }; |
1176 | 1197 | ||
1177 | static struct tuner_range tuner_thomson_fe6600_dvb_ranges[] = { | 1198 | static struct tuner_range tuner_thomson_fe6600_dvb_ranges[] = { |
1178 | { 16 * 250.00 /*MHz*/, 0xb4, 0x12, }, | 1199 | { 16 * 250.00 /*MHz*/, 0xb4, 0x12, }, |
1179 | { 16 * 455.00 /*MHz*/, 0xfe, 0x11, }, | 1200 | { 16 * 455.00 /*MHz*/, 0xfe, 0x11, }, |
1180 | { 16 * 775.50 /*MHz*/, 0xbc, 0x18, }, | 1201 | { 16 * 775.50 /*MHz*/, 0xbc, 0x18, }, |
1181 | { 16 * 999.99 , 0xf4, 0x18, }, | 1202 | { 16 * 999.99 , 0xf4, 0x18, }, |
1182 | }; | 1203 | }; |
1183 | 1204 | ||
1184 | static struct tuner_params tuner_thomson_fe6600_params[] = { | 1205 | static struct tuner_params tuner_thomson_fe6600_params[] = { |
1185 | { | 1206 | { |
1186 | .type = TUNER_PARAM_TYPE_PAL, | 1207 | .type = TUNER_PARAM_TYPE_PAL, |
1187 | .ranges = tuner_thomson_fe6600_pal_ranges, | 1208 | .ranges = tuner_thomson_fe6600_pal_ranges, |
1188 | .count = ARRAY_SIZE(tuner_thomson_fe6600_pal_ranges), | 1209 | .count = ARRAY_SIZE(tuner_thomson_fe6600_pal_ranges), |
1189 | }, | 1210 | }, |
1190 | { | 1211 | { |
1191 | .type = TUNER_PARAM_TYPE_DIGITAL, | 1212 | .type = TUNER_PARAM_TYPE_DIGITAL, |
1192 | .ranges = tuner_thomson_fe6600_dvb_ranges, | 1213 | .ranges = tuner_thomson_fe6600_dvb_ranges, |
1193 | .count = ARRAY_SIZE(tuner_thomson_fe6600_dvb_ranges), | 1214 | .count = ARRAY_SIZE(tuner_thomson_fe6600_dvb_ranges), |
1194 | .iffreq = 16 * 36.125 /*MHz*/, | 1215 | .iffreq = 16 * 36.125 /*MHz*/, |
1195 | }, | 1216 | }, |
1196 | }; | 1217 | }; |
1197 | 1218 | ||
1198 | /* ------------ TUNER_SAMSUNG_TCPG_6121P30A - Samsung PAL ------------ */ | 1219 | /* ------------ TUNER_SAMSUNG_TCPG_6121P30A - Samsung PAL ------------ */ |
1199 | 1220 | ||
1200 | /* '+ 4' turns on the Low Noise Amplifier */ | 1221 | /* '+ 4' turns on the Low Noise Amplifier */ |
1201 | static struct tuner_range tuner_samsung_tcpg_6121p30a_pal_ranges[] = { | 1222 | static struct tuner_range tuner_samsung_tcpg_6121p30a_pal_ranges[] = { |
1202 | { 16 * 146.25 /*MHz*/, 0xce, 0x01 + 4, }, | 1223 | { 16 * 146.25 /*MHz*/, 0xce, 0x01 + 4, }, |
1203 | { 16 * 428.50 /*MHz*/, 0xce, 0x02 + 4, }, | 1224 | { 16 * 428.50 /*MHz*/, 0xce, 0x02 + 4, }, |
1204 | { 16 * 999.99 , 0xce, 0x08 + 4, }, | 1225 | { 16 * 999.99 , 0xce, 0x08 + 4, }, |
1205 | }; | 1226 | }; |
1206 | 1227 | ||
1207 | static struct tuner_params tuner_samsung_tcpg_6121p30a_params[] = { | 1228 | static struct tuner_params tuner_samsung_tcpg_6121p30a_params[] = { |
1208 | { | 1229 | { |
1209 | .type = TUNER_PARAM_TYPE_PAL, | 1230 | .type = TUNER_PARAM_TYPE_PAL, |
1210 | .ranges = tuner_samsung_tcpg_6121p30a_pal_ranges, | 1231 | .ranges = tuner_samsung_tcpg_6121p30a_pal_ranges, |
1211 | .count = ARRAY_SIZE(tuner_samsung_tcpg_6121p30a_pal_ranges), | 1232 | .count = ARRAY_SIZE(tuner_samsung_tcpg_6121p30a_pal_ranges), |
1212 | .has_tda9887 = 1, | 1233 | .has_tda9887 = 1, |
1213 | .port1_active = 1, | 1234 | .port1_active = 1, |
1214 | .port2_active = 1, | 1235 | .port2_active = 1, |
1215 | .port2_invert_for_secam_lc = 1, | 1236 | .port2_invert_for_secam_lc = 1, |
1216 | }, | 1237 | }, |
1217 | }; | 1238 | }; |
1218 | 1239 | ||
1219 | /* ------------ TUNER_TCL_MF02GIP-5N-E - TCL MF02GIP-5N ------------ */ | 1240 | /* ------------ TUNER_TCL_MF02GIP-5N-E - TCL MF02GIP-5N ------------ */ |
1220 | 1241 | ||
1221 | static struct tuner_range tuner_tcl_mf02gip_5n_ntsc_ranges[] = { | 1242 | static struct tuner_range tuner_tcl_mf02gip_5n_ntsc_ranges[] = { |
1222 | { 16 * 172.00 /*MHz*/, 0x8e, 0x01, }, | 1243 | { 16 * 172.00 /*MHz*/, 0x8e, 0x01, }, |
1223 | { 16 * 448.00 /*MHz*/, 0x8e, 0x02, }, | 1244 | { 16 * 448.00 /*MHz*/, 0x8e, 0x02, }, |
1224 | { 16 * 999.99 , 0x8e, 0x04, }, | 1245 | { 16 * 999.99 , 0x8e, 0x04, }, |
1225 | }; | 1246 | }; |
1226 | 1247 | ||
1227 | static struct tuner_params tuner_tcl_mf02gip_5n_params[] = { | 1248 | static struct tuner_params tuner_tcl_mf02gip_5n_params[] = { |
1228 | { | 1249 | { |
1229 | .type = TUNER_PARAM_TYPE_NTSC, | 1250 | .type = TUNER_PARAM_TYPE_NTSC, |
1230 | .ranges = tuner_tcl_mf02gip_5n_ntsc_ranges, | 1251 | .ranges = tuner_tcl_mf02gip_5n_ntsc_ranges, |
1231 | .count = ARRAY_SIZE(tuner_tcl_mf02gip_5n_ntsc_ranges), | 1252 | .count = ARRAY_SIZE(tuner_tcl_mf02gip_5n_ntsc_ranges), |
1232 | .cb_first_if_lower_freq = 1, | 1253 | .cb_first_if_lower_freq = 1, |
1233 | }, | 1254 | }, |
1234 | }; | 1255 | }; |
1235 | 1256 | ||
1236 | /* --------------------------------------------------------------------- */ | 1257 | /* --------------------------------------------------------------------- */ |
1237 | 1258 | ||
1238 | struct tunertype tuners[] = { | 1259 | struct tunertype tuners[] = { |
1239 | /* 0-9 */ | 1260 | /* 0-9 */ |
1240 | [TUNER_TEMIC_PAL] = { /* TEMIC PAL */ | 1261 | [TUNER_TEMIC_PAL] = { /* TEMIC PAL */ |
1241 | .name = "Temic PAL (4002 FH5)", | 1262 | .name = "Temic PAL (4002 FH5)", |
1242 | .params = tuner_temic_pal_params, | 1263 | .params = tuner_temic_pal_params, |
1243 | .count = ARRAY_SIZE(tuner_temic_pal_params), | 1264 | .count = ARRAY_SIZE(tuner_temic_pal_params), |
1244 | }, | 1265 | }, |
1245 | [TUNER_PHILIPS_PAL_I] = { /* Philips PAL_I */ | 1266 | [TUNER_PHILIPS_PAL_I] = { /* Philips PAL_I */ |
1246 | .name = "Philips PAL_I (FI1246 and compatibles)", | 1267 | .name = "Philips PAL_I (FI1246 and compatibles)", |
1247 | .params = tuner_philips_pal_i_params, | 1268 | .params = tuner_philips_pal_i_params, |
1248 | .count = ARRAY_SIZE(tuner_philips_pal_i_params), | 1269 | .count = ARRAY_SIZE(tuner_philips_pal_i_params), |
1249 | }, | 1270 | }, |
1250 | [TUNER_PHILIPS_NTSC] = { /* Philips NTSC */ | 1271 | [TUNER_PHILIPS_NTSC] = { /* Philips NTSC */ |
1251 | .name = "Philips NTSC (FI1236,FM1236 and compatibles)", | 1272 | .name = "Philips NTSC (FI1236,FM1236 and compatibles)", |
1252 | .params = tuner_philips_ntsc_params, | 1273 | .params = tuner_philips_ntsc_params, |
1253 | .count = ARRAY_SIZE(tuner_philips_ntsc_params), | 1274 | .count = ARRAY_SIZE(tuner_philips_ntsc_params), |
1254 | }, | 1275 | }, |
1255 | [TUNER_PHILIPS_SECAM] = { /* Philips SECAM */ | 1276 | [TUNER_PHILIPS_SECAM] = { /* Philips SECAM */ |
1256 | .name = "Philips (SECAM+PAL_BG) (FI1216MF, FM1216MF, FR1216MF)", | 1277 | .name = "Philips (SECAM+PAL_BG) (FI1216MF, FM1216MF, FR1216MF)", |
1257 | .params = tuner_philips_secam_params, | 1278 | .params = tuner_philips_secam_params, |
1258 | .count = ARRAY_SIZE(tuner_philips_secam_params), | 1279 | .count = ARRAY_SIZE(tuner_philips_secam_params), |
1259 | }, | 1280 | }, |
1260 | [TUNER_ABSENT] = { /* Tuner Absent */ | 1281 | [TUNER_ABSENT] = { /* Tuner Absent */ |
1261 | .name = "NoTuner", | 1282 | .name = "NoTuner", |
1262 | }, | 1283 | }, |
1263 | [TUNER_PHILIPS_PAL] = { /* Philips PAL */ | 1284 | [TUNER_PHILIPS_PAL] = { /* Philips PAL */ |
1264 | .name = "Philips PAL_BG (FI1216 and compatibles)", | 1285 | .name = "Philips PAL_BG (FI1216 and compatibles)", |
1265 | .params = tuner_philips_pal_params, | 1286 | .params = tuner_philips_pal_params, |
1266 | .count = ARRAY_SIZE(tuner_philips_pal_params), | 1287 | .count = ARRAY_SIZE(tuner_philips_pal_params), |
1267 | }, | 1288 | }, |
1268 | [TUNER_TEMIC_NTSC] = { /* TEMIC NTSC */ | 1289 | [TUNER_TEMIC_NTSC] = { /* TEMIC NTSC */ |
1269 | .name = "Temic NTSC (4032 FY5)", | 1290 | .name = "Temic NTSC (4032 FY5)", |
1270 | .params = tuner_temic_ntsc_params, | 1291 | .params = tuner_temic_ntsc_params, |
1271 | .count = ARRAY_SIZE(tuner_temic_ntsc_params), | 1292 | .count = ARRAY_SIZE(tuner_temic_ntsc_params), |
1272 | }, | 1293 | }, |
1273 | [TUNER_TEMIC_PAL_I] = { /* TEMIC PAL_I */ | 1294 | [TUNER_TEMIC_PAL_I] = { /* TEMIC PAL_I */ |
1274 | .name = "Temic PAL_I (4062 FY5)", | 1295 | .name = "Temic PAL_I (4062 FY5)", |
1275 | .params = tuner_temic_pal_i_params, | 1296 | .params = tuner_temic_pal_i_params, |
1276 | .count = ARRAY_SIZE(tuner_temic_pal_i_params), | 1297 | .count = ARRAY_SIZE(tuner_temic_pal_i_params), |
1277 | }, | 1298 | }, |
1278 | [TUNER_TEMIC_4036FY5_NTSC] = { /* TEMIC NTSC */ | 1299 | [TUNER_TEMIC_4036FY5_NTSC] = { /* TEMIC NTSC */ |
1279 | .name = "Temic NTSC (4036 FY5)", | 1300 | .name = "Temic NTSC (4036 FY5)", |
1280 | .params = tuner_temic_4036fy5_ntsc_params, | 1301 | .params = tuner_temic_4036fy5_ntsc_params, |
1281 | .count = ARRAY_SIZE(tuner_temic_4036fy5_ntsc_params), | 1302 | .count = ARRAY_SIZE(tuner_temic_4036fy5_ntsc_params), |
1282 | }, | 1303 | }, |
1283 | [TUNER_ALPS_TSBH1_NTSC] = { /* TEMIC NTSC */ | 1304 | [TUNER_ALPS_TSBH1_NTSC] = { /* TEMIC NTSC */ |
1284 | .name = "Alps HSBH1", | 1305 | .name = "Alps HSBH1", |
1285 | .params = tuner_alps_tsbh1_ntsc_params, | 1306 | .params = tuner_alps_tsbh1_ntsc_params, |
1286 | .count = ARRAY_SIZE(tuner_alps_tsbh1_ntsc_params), | 1307 | .count = ARRAY_SIZE(tuner_alps_tsbh1_ntsc_params), |
1287 | }, | 1308 | }, |
1288 | 1309 | ||
1289 | /* 10-19 */ | 1310 | /* 10-19 */ |
1290 | [TUNER_ALPS_TSBE1_PAL] = { /* TEMIC PAL */ | 1311 | [TUNER_ALPS_TSBE1_PAL] = { /* TEMIC PAL */ |
1291 | .name = "Alps TSBE1", | 1312 | .name = "Alps TSBE1", |
1292 | .params = tuner_alps_tsb_1_params, | 1313 | .params = tuner_alps_tsb_1_params, |
1293 | .count = ARRAY_SIZE(tuner_alps_tsb_1_params), | 1314 | .count = ARRAY_SIZE(tuner_alps_tsb_1_params), |
1294 | }, | 1315 | }, |
1295 | [TUNER_ALPS_TSBB5_PAL_I] = { /* Alps PAL_I */ | 1316 | [TUNER_ALPS_TSBB5_PAL_I] = { /* Alps PAL_I */ |
1296 | .name = "Alps TSBB5", | 1317 | .name = "Alps TSBB5", |
1297 | .params = tuner_alps_tsbb5_params, | 1318 | .params = tuner_alps_tsbb5_params, |
1298 | .count = ARRAY_SIZE(tuner_alps_tsbb5_params), | 1319 | .count = ARRAY_SIZE(tuner_alps_tsbb5_params), |
1299 | }, | 1320 | }, |
1300 | [TUNER_ALPS_TSBE5_PAL] = { /* Alps PAL */ | 1321 | [TUNER_ALPS_TSBE5_PAL] = { /* Alps PAL */ |
1301 | .name = "Alps TSBE5", | 1322 | .name = "Alps TSBE5", |
1302 | .params = tuner_alps_tsbe5_params, | 1323 | .params = tuner_alps_tsbe5_params, |
1303 | .count = ARRAY_SIZE(tuner_alps_tsbe5_params), | 1324 | .count = ARRAY_SIZE(tuner_alps_tsbe5_params), |
1304 | }, | 1325 | }, |
1305 | [TUNER_ALPS_TSBC5_PAL] = { /* Alps PAL */ | 1326 | [TUNER_ALPS_TSBC5_PAL] = { /* Alps PAL */ |
1306 | .name = "Alps TSBC5", | 1327 | .name = "Alps TSBC5", |
1307 | .params = tuner_alps_tsbc5_params, | 1328 | .params = tuner_alps_tsbc5_params, |
1308 | .count = ARRAY_SIZE(tuner_alps_tsbc5_params), | 1329 | .count = ARRAY_SIZE(tuner_alps_tsbc5_params), |
1309 | }, | 1330 | }, |
1310 | [TUNER_TEMIC_4006FH5_PAL] = { /* TEMIC PAL */ | 1331 | [TUNER_TEMIC_4006FH5_PAL] = { /* TEMIC PAL */ |
1311 | .name = "Temic PAL_BG (4006FH5)", | 1332 | .name = "Temic PAL_BG (4006FH5)", |
1312 | .params = tuner_temic_4006fh5_params, | 1333 | .params = tuner_temic_4006fh5_params, |
1313 | .count = ARRAY_SIZE(tuner_temic_4006fh5_params), | 1334 | .count = ARRAY_SIZE(tuner_temic_4006fh5_params), |
1314 | }, | 1335 | }, |
1315 | [TUNER_ALPS_TSHC6_NTSC] = { /* Alps NTSC */ | 1336 | [TUNER_ALPS_TSHC6_NTSC] = { /* Alps NTSC */ |
1316 | .name = "Alps TSCH6", | 1337 | .name = "Alps TSCH6", |
1317 | .params = tuner_alps_tshc6_params, | 1338 | .params = tuner_alps_tshc6_params, |
1318 | .count = ARRAY_SIZE(tuner_alps_tshc6_params), | 1339 | .count = ARRAY_SIZE(tuner_alps_tshc6_params), |
1319 | }, | 1340 | }, |
1320 | [TUNER_TEMIC_PAL_DK] = { /* TEMIC PAL */ | 1341 | [TUNER_TEMIC_PAL_DK] = { /* TEMIC PAL */ |
1321 | .name = "Temic PAL_DK (4016 FY5)", | 1342 | .name = "Temic PAL_DK (4016 FY5)", |
1322 | .params = tuner_temic_pal_dk_params, | 1343 | .params = tuner_temic_pal_dk_params, |
1323 | .count = ARRAY_SIZE(tuner_temic_pal_dk_params), | 1344 | .count = ARRAY_SIZE(tuner_temic_pal_dk_params), |
1324 | }, | 1345 | }, |
1325 | [TUNER_PHILIPS_NTSC_M] = { /* Philips NTSC */ | 1346 | [TUNER_PHILIPS_NTSC_M] = { /* Philips NTSC */ |
1326 | .name = "Philips NTSC_M (MK2)", | 1347 | .name = "Philips NTSC_M (MK2)", |
1327 | .params = tuner_philips_ntsc_m_params, | 1348 | .params = tuner_philips_ntsc_m_params, |
1328 | .count = ARRAY_SIZE(tuner_philips_ntsc_m_params), | 1349 | .count = ARRAY_SIZE(tuner_philips_ntsc_m_params), |
1329 | }, | 1350 | }, |
1330 | [TUNER_TEMIC_4066FY5_PAL_I] = { /* TEMIC PAL_I */ | 1351 | [TUNER_TEMIC_4066FY5_PAL_I] = { /* TEMIC PAL_I */ |
1331 | .name = "Temic PAL_I (4066 FY5)", | 1352 | .name = "Temic PAL_I (4066 FY5)", |
1332 | .params = tuner_temic_4066fy5_pal_i_params, | 1353 | .params = tuner_temic_4066fy5_pal_i_params, |
1333 | .count = ARRAY_SIZE(tuner_temic_4066fy5_pal_i_params), | 1354 | .count = ARRAY_SIZE(tuner_temic_4066fy5_pal_i_params), |
1334 | }, | 1355 | }, |
1335 | [TUNER_TEMIC_4006FN5_MULTI_PAL] = { /* TEMIC PAL */ | 1356 | [TUNER_TEMIC_4006FN5_MULTI_PAL] = { /* TEMIC PAL */ |
1336 | .name = "Temic PAL* auto (4006 FN5)", | 1357 | .name = "Temic PAL* auto (4006 FN5)", |
1337 | .params = tuner_temic_4006fn5_multi_params, | 1358 | .params = tuner_temic_4006fn5_multi_params, |
1338 | .count = ARRAY_SIZE(tuner_temic_4006fn5_multi_params), | 1359 | .count = ARRAY_SIZE(tuner_temic_4006fn5_multi_params), |
1339 | }, | 1360 | }, |
1340 | 1361 | ||
1341 | /* 20-29 */ | 1362 | /* 20-29 */ |
1342 | [TUNER_TEMIC_4009FR5_PAL] = { /* TEMIC PAL */ | 1363 | [TUNER_TEMIC_4009FR5_PAL] = { /* TEMIC PAL */ |
1343 | .name = "Temic PAL_BG (4009 FR5) or PAL_I (4069 FR5)", | 1364 | .name = "Temic PAL_BG (4009 FR5) or PAL_I (4069 FR5)", |
1344 | .params = tuner_temic_4009f_5_params, | 1365 | .params = tuner_temic_4009f_5_params, |
1345 | .count = ARRAY_SIZE(tuner_temic_4009f_5_params), | 1366 | .count = ARRAY_SIZE(tuner_temic_4009f_5_params), |
1346 | }, | 1367 | }, |
1347 | [TUNER_TEMIC_4039FR5_NTSC] = { /* TEMIC NTSC */ | 1368 | [TUNER_TEMIC_4039FR5_NTSC] = { /* TEMIC NTSC */ |
1348 | .name = "Temic NTSC (4039 FR5)", | 1369 | .name = "Temic NTSC (4039 FR5)", |
1349 | .params = tuner_temic_4039fr5_params, | 1370 | .params = tuner_temic_4039fr5_params, |
1350 | .count = ARRAY_SIZE(tuner_temic_4039fr5_params), | 1371 | .count = ARRAY_SIZE(tuner_temic_4039fr5_params), |
1351 | }, | 1372 | }, |
1352 | [TUNER_TEMIC_4046FM5] = { /* TEMIC PAL */ | 1373 | [TUNER_TEMIC_4046FM5] = { /* TEMIC PAL */ |
1353 | .name = "Temic PAL/SECAM multi (4046 FM5)", | 1374 | .name = "Temic PAL/SECAM multi (4046 FM5)", |
1354 | .params = tuner_temic_4046fm5_params, | 1375 | .params = tuner_temic_4046fm5_params, |
1355 | .count = ARRAY_SIZE(tuner_temic_4046fm5_params), | 1376 | .count = ARRAY_SIZE(tuner_temic_4046fm5_params), |
1356 | }, | 1377 | }, |
1357 | [TUNER_PHILIPS_PAL_DK] = { /* Philips PAL */ | 1378 | [TUNER_PHILIPS_PAL_DK] = { /* Philips PAL */ |
1358 | .name = "Philips PAL_DK (FI1256 and compatibles)", | 1379 | .name = "Philips PAL_DK (FI1256 and compatibles)", |
1359 | .params = tuner_philips_pal_dk_params, | 1380 | .params = tuner_philips_pal_dk_params, |
1360 | .count = ARRAY_SIZE(tuner_philips_pal_dk_params), | 1381 | .count = ARRAY_SIZE(tuner_philips_pal_dk_params), |
1361 | }, | 1382 | }, |
1362 | [TUNER_PHILIPS_FQ1216ME] = { /* Philips PAL */ | 1383 | [TUNER_PHILIPS_FQ1216ME] = { /* Philips PAL */ |
1363 | .name = "Philips PAL/SECAM multi (FQ1216ME)", | 1384 | .name = "Philips PAL/SECAM multi (FQ1216ME)", |
1364 | .params = tuner_philips_fq1216me_params, | 1385 | .params = tuner_philips_fq1216me_params, |
1365 | .count = ARRAY_SIZE(tuner_philips_fq1216me_params), | 1386 | .count = ARRAY_SIZE(tuner_philips_fq1216me_params), |
1366 | }, | 1387 | }, |
1367 | [TUNER_LG_PAL_I_FM] = { /* LGINNOTEK PAL_I */ | 1388 | [TUNER_LG_PAL_I_FM] = { /* LGINNOTEK PAL_I */ |
1368 | .name = "LG PAL_I+FM (TAPC-I001D)", | 1389 | .name = "LG PAL_I+FM (TAPC-I001D)", |
1369 | .params = tuner_lg_pal_i_fm_params, | 1390 | .params = tuner_lg_pal_i_fm_params, |
1370 | .count = ARRAY_SIZE(tuner_lg_pal_i_fm_params), | 1391 | .count = ARRAY_SIZE(tuner_lg_pal_i_fm_params), |
1371 | }, | 1392 | }, |
1372 | [TUNER_LG_PAL_I] = { /* LGINNOTEK PAL_I */ | 1393 | [TUNER_LG_PAL_I] = { /* LGINNOTEK PAL_I */ |
1373 | .name = "LG PAL_I (TAPC-I701D)", | 1394 | .name = "LG PAL_I (TAPC-I701D)", |
1374 | .params = tuner_lg_pal_i_params, | 1395 | .params = tuner_lg_pal_i_params, |
1375 | .count = ARRAY_SIZE(tuner_lg_pal_i_params), | 1396 | .count = ARRAY_SIZE(tuner_lg_pal_i_params), |
1376 | }, | 1397 | }, |
1377 | [TUNER_LG_NTSC_FM] = { /* LGINNOTEK NTSC */ | 1398 | [TUNER_LG_NTSC_FM] = { /* LGINNOTEK NTSC */ |
1378 | .name = "LG NTSC+FM (TPI8NSR01F)", | 1399 | .name = "LG NTSC+FM (TPI8NSR01F)", |
1379 | .params = tuner_lg_ntsc_fm_params, | 1400 | .params = tuner_lg_ntsc_fm_params, |
1380 | .count = ARRAY_SIZE(tuner_lg_ntsc_fm_params), | 1401 | .count = ARRAY_SIZE(tuner_lg_ntsc_fm_params), |
1381 | }, | 1402 | }, |
1382 | [TUNER_LG_PAL_FM] = { /* LGINNOTEK PAL */ | 1403 | [TUNER_LG_PAL_FM] = { /* LGINNOTEK PAL */ |
1383 | .name = "LG PAL_BG+FM (TPI8PSB01D)", | 1404 | .name = "LG PAL_BG+FM (TPI8PSB01D)", |
1384 | .params = tuner_lg_pal_fm_params, | 1405 | .params = tuner_lg_pal_fm_params, |
1385 | .count = ARRAY_SIZE(tuner_lg_pal_fm_params), | 1406 | .count = ARRAY_SIZE(tuner_lg_pal_fm_params), |
1386 | }, | 1407 | }, |
1387 | [TUNER_LG_PAL] = { /* LGINNOTEK PAL */ | 1408 | [TUNER_LG_PAL] = { /* LGINNOTEK PAL */ |
1388 | .name = "LG PAL_BG (TPI8PSB11D)", | 1409 | .name = "LG PAL_BG (TPI8PSB11D)", |
1389 | .params = tuner_lg_pal_params, | 1410 | .params = tuner_lg_pal_params, |
1390 | .count = ARRAY_SIZE(tuner_lg_pal_params), | 1411 | .count = ARRAY_SIZE(tuner_lg_pal_params), |
1391 | }, | 1412 | }, |
1392 | 1413 | ||
1393 | /* 30-39 */ | 1414 | /* 30-39 */ |
1394 | [TUNER_TEMIC_4009FN5_MULTI_PAL_FM] = { /* TEMIC PAL */ | 1415 | [TUNER_TEMIC_4009FN5_MULTI_PAL_FM] = { /* TEMIC PAL */ |
1395 | .name = "Temic PAL* auto + FM (4009 FN5)", | 1416 | .name = "Temic PAL* auto + FM (4009 FN5)", |
1396 | .params = tuner_temic_4009_fn5_multi_pal_fm_params, | 1417 | .params = tuner_temic_4009_fn5_multi_pal_fm_params, |
1397 | .count = ARRAY_SIZE(tuner_temic_4009_fn5_multi_pal_fm_params), | 1418 | .count = ARRAY_SIZE(tuner_temic_4009_fn5_multi_pal_fm_params), |
1398 | }, | 1419 | }, |
1399 | [TUNER_SHARP_2U5JF5540_NTSC] = { /* SHARP NTSC */ | 1420 | [TUNER_SHARP_2U5JF5540_NTSC] = { /* SHARP NTSC */ |
1400 | .name = "SHARP NTSC_JP (2U5JF5540)", | 1421 | .name = "SHARP NTSC_JP (2U5JF5540)", |
1401 | .params = tuner_sharp_2u5jf5540_params, | 1422 | .params = tuner_sharp_2u5jf5540_params, |
1402 | .count = ARRAY_SIZE(tuner_sharp_2u5jf5540_params), | 1423 | .count = ARRAY_SIZE(tuner_sharp_2u5jf5540_params), |
1403 | }, | 1424 | }, |
1404 | [TUNER_Samsung_PAL_TCPM9091PD27] = { /* Samsung PAL */ | 1425 | [TUNER_Samsung_PAL_TCPM9091PD27] = { /* Samsung PAL */ |
1405 | .name = "Samsung PAL TCPM9091PD27", | 1426 | .name = "Samsung PAL TCPM9091PD27", |
1406 | .params = tuner_samsung_pal_tcpm9091pd27_params, | 1427 | .params = tuner_samsung_pal_tcpm9091pd27_params, |
1407 | .count = ARRAY_SIZE(tuner_samsung_pal_tcpm9091pd27_params), | 1428 | .count = ARRAY_SIZE(tuner_samsung_pal_tcpm9091pd27_params), |
1408 | }, | 1429 | }, |
1409 | [TUNER_MT2032] = { /* Microtune PAL|NTSC */ | 1430 | [TUNER_MT2032] = { /* Microtune PAL|NTSC */ |
1410 | .name = "MT20xx universal", | 1431 | .name = "MT20xx universal", |
1411 | /* see mt20xx.c for details */ }, | 1432 | /* see mt20xx.c for details */ }, |
1412 | [TUNER_TEMIC_4106FH5] = { /* TEMIC PAL */ | 1433 | [TUNER_TEMIC_4106FH5] = { /* TEMIC PAL */ |
1413 | .name = "Temic PAL_BG (4106 FH5)", | 1434 | .name = "Temic PAL_BG (4106 FH5)", |
1414 | .params = tuner_temic_4106fh5_params, | 1435 | .params = tuner_temic_4106fh5_params, |
1415 | .count = ARRAY_SIZE(tuner_temic_4106fh5_params), | 1436 | .count = ARRAY_SIZE(tuner_temic_4106fh5_params), |
1416 | }, | 1437 | }, |
1417 | [TUNER_TEMIC_4012FY5] = { /* TEMIC PAL */ | 1438 | [TUNER_TEMIC_4012FY5] = { /* TEMIC PAL */ |
1418 | .name = "Temic PAL_DK/SECAM_L (4012 FY5)", | 1439 | .name = "Temic PAL_DK/SECAM_L (4012 FY5)", |
1419 | .params = tuner_temic_4012fy5_params, | 1440 | .params = tuner_temic_4012fy5_params, |
1420 | .count = ARRAY_SIZE(tuner_temic_4012fy5_params), | 1441 | .count = ARRAY_SIZE(tuner_temic_4012fy5_params), |
1421 | }, | 1442 | }, |
1422 | [TUNER_TEMIC_4136FY5] = { /* TEMIC NTSC */ | 1443 | [TUNER_TEMIC_4136FY5] = { /* TEMIC NTSC */ |
1423 | .name = "Temic NTSC (4136 FY5)", | 1444 | .name = "Temic NTSC (4136 FY5)", |
1424 | .params = tuner_temic_4136_fy5_params, | 1445 | .params = tuner_temic_4136_fy5_params, |
1425 | .count = ARRAY_SIZE(tuner_temic_4136_fy5_params), | 1446 | .count = ARRAY_SIZE(tuner_temic_4136_fy5_params), |
1426 | }, | 1447 | }, |
1427 | [TUNER_LG_PAL_NEW_TAPC] = { /* LGINNOTEK PAL */ | 1448 | [TUNER_LG_PAL_NEW_TAPC] = { /* LGINNOTEK PAL */ |
1428 | .name = "LG PAL (newer TAPC series)", | 1449 | .name = "LG PAL (newer TAPC series)", |
1429 | .params = tuner_lg_pal_new_tapc_params, | 1450 | .params = tuner_lg_pal_new_tapc_params, |
1430 | .count = ARRAY_SIZE(tuner_lg_pal_new_tapc_params), | 1451 | .count = ARRAY_SIZE(tuner_lg_pal_new_tapc_params), |
1431 | }, | 1452 | }, |
1432 | [TUNER_PHILIPS_FM1216ME_MK3] = { /* Philips PAL */ | 1453 | [TUNER_PHILIPS_FM1216ME_MK3] = { /* Philips PAL */ |
1433 | .name = "Philips PAL/SECAM multi (FM1216ME MK3)", | 1454 | .name = "Philips PAL/SECAM multi (FM1216ME MK3)", |
1434 | .params = tuner_fm1216me_mk3_params, | 1455 | .params = tuner_fm1216me_mk3_params, |
1435 | .count = ARRAY_SIZE(tuner_fm1216me_mk3_params), | 1456 | .count = ARRAY_SIZE(tuner_fm1216me_mk3_params), |
1436 | }, | 1457 | }, |
1437 | [TUNER_LG_NTSC_NEW_TAPC] = { /* LGINNOTEK NTSC */ | 1458 | [TUNER_LG_NTSC_NEW_TAPC] = { /* LGINNOTEK NTSC */ |
1438 | .name = "LG NTSC (newer TAPC series)", | 1459 | .name = "LG NTSC (newer TAPC series)", |
1439 | .params = tuner_lg_ntsc_new_tapc_params, | 1460 | .params = tuner_lg_ntsc_new_tapc_params, |
1440 | .count = ARRAY_SIZE(tuner_lg_ntsc_new_tapc_params), | 1461 | .count = ARRAY_SIZE(tuner_lg_ntsc_new_tapc_params), |
1441 | }, | 1462 | }, |
1442 | 1463 | ||
1443 | /* 40-49 */ | 1464 | /* 40-49 */ |
1444 | [TUNER_HITACHI_NTSC] = { /* HITACHI NTSC */ | 1465 | [TUNER_HITACHI_NTSC] = { /* HITACHI NTSC */ |
1445 | .name = "HITACHI V7-J180AT", | 1466 | .name = "HITACHI V7-J180AT", |
1446 | .params = tuner_hitachi_ntsc_params, | 1467 | .params = tuner_hitachi_ntsc_params, |
1447 | .count = ARRAY_SIZE(tuner_hitachi_ntsc_params), | 1468 | .count = ARRAY_SIZE(tuner_hitachi_ntsc_params), |
1448 | }, | 1469 | }, |
1449 | [TUNER_PHILIPS_PAL_MK] = { /* Philips PAL */ | 1470 | [TUNER_PHILIPS_PAL_MK] = { /* Philips PAL */ |
1450 | .name = "Philips PAL_MK (FI1216 MK)", | 1471 | .name = "Philips PAL_MK (FI1216 MK)", |
1451 | .params = tuner_philips_pal_mk_params, | 1472 | .params = tuner_philips_pal_mk_params, |
1452 | .count = ARRAY_SIZE(tuner_philips_pal_mk_params), | 1473 | .count = ARRAY_SIZE(tuner_philips_pal_mk_params), |
1453 | }, | 1474 | }, |
1454 | [TUNER_PHILIPS_FCV1236D] = { /* Philips ATSC */ | 1475 | [TUNER_PHILIPS_FCV1236D] = { /* Philips ATSC */ |
1455 | .name = "Philips FCV1236D ATSC/NTSC dual in", | 1476 | .name = "Philips FCV1236D ATSC/NTSC dual in", |
1456 | .params = tuner_philips_fcv1236d_params, | 1477 | .params = tuner_philips_fcv1236d_params, |
1457 | .count = ARRAY_SIZE(tuner_philips_fcv1236d_params), | 1478 | .count = ARRAY_SIZE(tuner_philips_fcv1236d_params), |
1458 | .min = 16 * 53.00, | 1479 | .min = 16 * 53.00, |
1459 | .max = 16 * 803.00, | 1480 | .max = 16 * 803.00, |
1460 | .stepsize = 62500, | 1481 | .stepsize = 62500, |
1461 | }, | 1482 | }, |
1462 | [TUNER_PHILIPS_FM1236_MK3] = { /* Philips NTSC */ | 1483 | [TUNER_PHILIPS_FM1236_MK3] = { /* Philips NTSC */ |
1463 | .name = "Philips NTSC MK3 (FM1236MK3 or FM1236/F)", | 1484 | .name = "Philips NTSC MK3 (FM1236MK3 or FM1236/F)", |
1464 | .params = tuner_fm1236_mk3_params, | 1485 | .params = tuner_fm1236_mk3_params, |
1465 | .count = ARRAY_SIZE(tuner_fm1236_mk3_params), | 1486 | .count = ARRAY_SIZE(tuner_fm1236_mk3_params), |
1466 | }, | 1487 | }, |
1467 | [TUNER_PHILIPS_4IN1] = { /* Philips NTSC */ | 1488 | [TUNER_PHILIPS_4IN1] = { /* Philips NTSC */ |
1468 | .name = "Philips 4 in 1 (ATI TV Wonder Pro/Conexant)", | 1489 | .name = "Philips 4 in 1 (ATI TV Wonder Pro/Conexant)", |
1469 | .params = tuner_philips_4in1_params, | 1490 | .params = tuner_philips_4in1_params, |
1470 | .count = ARRAY_SIZE(tuner_philips_4in1_params), | 1491 | .count = ARRAY_SIZE(tuner_philips_4in1_params), |
1471 | }, | 1492 | }, |
1472 | [TUNER_MICROTUNE_4049FM5] = { /* Microtune PAL */ | 1493 | [TUNER_MICROTUNE_4049FM5] = { /* Microtune PAL */ |
1473 | .name = "Microtune 4049 FM5", | 1494 | .name = "Microtune 4049 FM5", |
1474 | .params = tuner_microtune_4049_fm5_params, | 1495 | .params = tuner_microtune_4049_fm5_params, |
1475 | .count = ARRAY_SIZE(tuner_microtune_4049_fm5_params), | 1496 | .count = ARRAY_SIZE(tuner_microtune_4049_fm5_params), |
1476 | }, | 1497 | }, |
1477 | [TUNER_PANASONIC_VP27] = { /* Panasonic NTSC */ | 1498 | [TUNER_PANASONIC_VP27] = { /* Panasonic NTSC */ |
1478 | .name = "Panasonic VP27s/ENGE4324D", | 1499 | .name = "Panasonic VP27s/ENGE4324D", |
1479 | .params = tuner_panasonic_vp27_params, | 1500 | .params = tuner_panasonic_vp27_params, |
1480 | .count = ARRAY_SIZE(tuner_panasonic_vp27_params), | 1501 | .count = ARRAY_SIZE(tuner_panasonic_vp27_params), |
1481 | }, | 1502 | }, |
1482 | [TUNER_LG_NTSC_TAPE] = { /* LGINNOTEK NTSC */ | 1503 | [TUNER_LG_NTSC_TAPE] = { /* LGINNOTEK NTSC */ |
1483 | .name = "LG NTSC (TAPE series)", | 1504 | .name = "LG NTSC (TAPE series)", |
1484 | .params = tuner_fm1236_mk3_params, | 1505 | .params = tuner_fm1236_mk3_params, |
1485 | .count = ARRAY_SIZE(tuner_fm1236_mk3_params), | 1506 | .count = ARRAY_SIZE(tuner_fm1236_mk3_params), |
1486 | }, | 1507 | }, |
1487 | [TUNER_TNF_8831BGFF] = { /* Philips PAL */ | 1508 | [TUNER_TNF_8831BGFF] = { /* Philips PAL */ |
1488 | .name = "Tenna TNF 8831 BGFF)", | 1509 | .name = "Tenna TNF 8831 BGFF)", |
1489 | .params = tuner_tnf_8831bgff_params, | 1510 | .params = tuner_tnf_8831bgff_params, |
1490 | .count = ARRAY_SIZE(tuner_tnf_8831bgff_params), | 1511 | .count = ARRAY_SIZE(tuner_tnf_8831bgff_params), |
1491 | }, | 1512 | }, |
1492 | [TUNER_MICROTUNE_4042FI5] = { /* Microtune NTSC */ | 1513 | [TUNER_MICROTUNE_4042FI5] = { /* Microtune NTSC */ |
1493 | .name = "Microtune 4042 FI5 ATSC/NTSC dual in", | 1514 | .name = "Microtune 4042 FI5 ATSC/NTSC dual in", |
1494 | .params = tuner_microtune_4042fi5_params, | 1515 | .params = tuner_microtune_4042fi5_params, |
1495 | .count = ARRAY_SIZE(tuner_microtune_4042fi5_params), | 1516 | .count = ARRAY_SIZE(tuner_microtune_4042fi5_params), |
1496 | .min = 16 * 57.00, | 1517 | .min = 16 * 57.00, |
1497 | .max = 16 * 858.00, | 1518 | .max = 16 * 858.00, |
1498 | .stepsize = 62500, | 1519 | .stepsize = 62500, |
1499 | }, | 1520 | }, |
1500 | 1521 | ||
1501 | /* 50-59 */ | 1522 | /* 50-59 */ |
1502 | [TUNER_TCL_2002N] = { /* TCL NTSC */ | 1523 | [TUNER_TCL_2002N] = { /* TCL NTSC */ |
1503 | .name = "TCL 2002N", | 1524 | .name = "TCL 2002N", |
1504 | .params = tuner_tcl_2002n_params, | 1525 | .params = tuner_tcl_2002n_params, |
1505 | .count = ARRAY_SIZE(tuner_tcl_2002n_params), | 1526 | .count = ARRAY_SIZE(tuner_tcl_2002n_params), |
1506 | }, | 1527 | }, |
1507 | [TUNER_PHILIPS_FM1256_IH3] = { /* Philips PAL */ | 1528 | [TUNER_PHILIPS_FM1256_IH3] = { /* Philips PAL */ |
1508 | .name = "Philips PAL/SECAM_D (FM 1256 I-H3)", | 1529 | .name = "Philips PAL/SECAM_D (FM 1256 I-H3)", |
1509 | .params = tuner_philips_fm1256_ih3_params, | 1530 | .params = tuner_philips_fm1256_ih3_params, |
1510 | .count = ARRAY_SIZE(tuner_philips_fm1256_ih3_params), | 1531 | .count = ARRAY_SIZE(tuner_philips_fm1256_ih3_params), |
1511 | }, | 1532 | }, |
1512 | [TUNER_THOMSON_DTT7610] = { /* THOMSON ATSC */ | 1533 | [TUNER_THOMSON_DTT7610] = { /* THOMSON ATSC */ |
1513 | .name = "Thomson DTT 7610 (ATSC/NTSC)", | 1534 | .name = "Thomson DTT 7610 (ATSC/NTSC)", |
1514 | .params = tuner_thomson_dtt7610_params, | 1535 | .params = tuner_thomson_dtt7610_params, |
1515 | .count = ARRAY_SIZE(tuner_thomson_dtt7610_params), | 1536 | .count = ARRAY_SIZE(tuner_thomson_dtt7610_params), |
1516 | .min = 16 * 44.00, | 1537 | .min = 16 * 44.00, |
1517 | .max = 16 * 958.00, | 1538 | .max = 16 * 958.00, |
1518 | .stepsize = 62500, | 1539 | .stepsize = 62500, |
1519 | }, | 1540 | }, |
1520 | [TUNER_PHILIPS_FQ1286] = { /* Philips NTSC */ | 1541 | [TUNER_PHILIPS_FQ1286] = { /* Philips NTSC */ |
1521 | .name = "Philips FQ1286", | 1542 | .name = "Philips FQ1286", |
1522 | .params = tuner_philips_fq1286_params, | 1543 | .params = tuner_philips_fq1286_params, |
1523 | .count = ARRAY_SIZE(tuner_philips_fq1286_params), | 1544 | .count = ARRAY_SIZE(tuner_philips_fq1286_params), |
1524 | }, | 1545 | }, |
1525 | [TUNER_PHILIPS_TDA8290] = { /* Philips PAL|NTSC */ | 1546 | [TUNER_PHILIPS_TDA8290] = { /* Philips PAL|NTSC */ |
1526 | .name = "Philips/NXP TDA 8290/8295 + 8275/8275A/18271", | 1547 | .name = "Philips/NXP TDA 8290/8295 + 8275/8275A/18271", |
1527 | /* see tda8290.c for details */ }, | 1548 | /* see tda8290.c for details */ }, |
1528 | [TUNER_TCL_2002MB] = { /* TCL PAL */ | 1549 | [TUNER_TCL_2002MB] = { /* TCL PAL */ |
1529 | .name = "TCL 2002MB", | 1550 | .name = "TCL 2002MB", |
1530 | .params = tuner_tcl_2002mb_params, | 1551 | .params = tuner_tcl_2002mb_params, |
1531 | .count = ARRAY_SIZE(tuner_tcl_2002mb_params), | 1552 | .count = ARRAY_SIZE(tuner_tcl_2002mb_params), |
1532 | }, | 1553 | }, |
1533 | [TUNER_PHILIPS_FQ1216AME_MK4] = { /* Philips PAL */ | 1554 | [TUNER_PHILIPS_FQ1216AME_MK4] = { /* Philips PAL */ |
1534 | .name = "Philips PAL/SECAM multi (FQ1216AME MK4)", | 1555 | .name = "Philips PAL/SECAM multi (FQ1216AME MK4)", |
1535 | .params = tuner_philips_fq1216ame_mk4_params, | 1556 | .params = tuner_philips_fq1216ame_mk4_params, |
1536 | .count = ARRAY_SIZE(tuner_philips_fq1216ame_mk4_params), | 1557 | .count = ARRAY_SIZE(tuner_philips_fq1216ame_mk4_params), |
1537 | }, | 1558 | }, |
1538 | [TUNER_PHILIPS_FQ1236A_MK4] = { /* Philips NTSC */ | 1559 | [TUNER_PHILIPS_FQ1236A_MK4] = { /* Philips NTSC */ |
1539 | .name = "Philips FQ1236A MK4", | 1560 | .name = "Philips FQ1236A MK4", |
1540 | .params = tuner_philips_fq1236a_mk4_params, | 1561 | .params = tuner_philips_fq1236a_mk4_params, |
1541 | .count = ARRAY_SIZE(tuner_philips_fq1236a_mk4_params), | 1562 | .count = ARRAY_SIZE(tuner_philips_fq1236a_mk4_params), |
1542 | }, | 1563 | }, |
1543 | [TUNER_YMEC_TVF_8531MF] = { /* Philips NTSC */ | 1564 | [TUNER_YMEC_TVF_8531MF] = { /* Philips NTSC */ |
1544 | .name = "Ymec TVision TVF-8531MF/8831MF/8731MF", | 1565 | .name = "Ymec TVision TVF-8531MF/8831MF/8731MF", |
1545 | .params = tuner_ymec_tvf_8531mf_params, | 1566 | .params = tuner_ymec_tvf_8531mf_params, |
1546 | .count = ARRAY_SIZE(tuner_ymec_tvf_8531mf_params), | 1567 | .count = ARRAY_SIZE(tuner_ymec_tvf_8531mf_params), |
1547 | }, | 1568 | }, |
1548 | [TUNER_YMEC_TVF_5533MF] = { /* Philips NTSC */ | 1569 | [TUNER_YMEC_TVF_5533MF] = { /* Philips NTSC */ |
1549 | .name = "Ymec TVision TVF-5533MF", | 1570 | .name = "Ymec TVision TVF-5533MF", |
1550 | .params = tuner_ymec_tvf_5533mf_params, | 1571 | .params = tuner_ymec_tvf_5533mf_params, |
1551 | .count = ARRAY_SIZE(tuner_ymec_tvf_5533mf_params), | 1572 | .count = ARRAY_SIZE(tuner_ymec_tvf_5533mf_params), |
1552 | }, | 1573 | }, |
1553 | 1574 | ||
1554 | /* 60-69 */ | 1575 | /* 60-69 */ |
1555 | [TUNER_THOMSON_DTT761X] = { /* THOMSON ATSC */ | 1576 | [TUNER_THOMSON_DTT761X] = { /* THOMSON ATSC */ |
1556 | /* DTT 7611 7611A 7612 7613 7613A 7614 7615 7615A */ | 1577 | /* DTT 7611 7611A 7612 7613 7613A 7614 7615 7615A */ |
1557 | .name = "Thomson DTT 761X (ATSC/NTSC)", | 1578 | .name = "Thomson DTT 761X (ATSC/NTSC)", |
1558 | .params = tuner_thomson_dtt761x_params, | 1579 | .params = tuner_thomson_dtt761x_params, |
1559 | .count = ARRAY_SIZE(tuner_thomson_dtt761x_params), | 1580 | .count = ARRAY_SIZE(tuner_thomson_dtt761x_params), |
1560 | .min = 16 * 57.00, | 1581 | .min = 16 * 57.00, |
1561 | .max = 16 * 863.00, | 1582 | .max = 16 * 863.00, |
1562 | .stepsize = 62500, | 1583 | .stepsize = 62500, |
1563 | .initdata = tua603x_agc103, | 1584 | .initdata = tua603x_agc103, |
1564 | }, | 1585 | }, |
1565 | [TUNER_TENA_9533_DI] = { /* Philips PAL */ | 1586 | [TUNER_TENA_9533_DI] = { /* Philips PAL */ |
1566 | .name = "Tena TNF9533-D/IF/TNF9533-B/DF", | 1587 | .name = "Tena TNF9533-D/IF/TNF9533-B/DF", |
1567 | .params = tuner_tena_9533_di_params, | 1588 | .params = tuner_tena_9533_di_params, |
1568 | .count = ARRAY_SIZE(tuner_tena_9533_di_params), | 1589 | .count = ARRAY_SIZE(tuner_tena_9533_di_params), |
1569 | }, | 1590 | }, |
1570 | [TUNER_TEA5767] = { /* Philips RADIO */ | 1591 | [TUNER_TEA5767] = { /* Philips RADIO */ |
1571 | .name = "Philips TEA5767HN FM Radio", | 1592 | .name = "Philips TEA5767HN FM Radio", |
1572 | /* see tea5767.c for details */ | 1593 | /* see tea5767.c for details */ |
1573 | }, | 1594 | }, |
1574 | [TUNER_PHILIPS_FMD1216ME_MK3] = { /* Philips PAL */ | 1595 | [TUNER_PHILIPS_FMD1216ME_MK3] = { /* Philips PAL */ |
1575 | .name = "Philips FMD1216ME MK3 Hybrid Tuner", | 1596 | .name = "Philips FMD1216ME MK3 Hybrid Tuner", |
1576 | .params = tuner_philips_fmd1216me_mk3_params, | 1597 | .params = tuner_philips_fmd1216me_mk3_params, |
1577 | .count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_params), | 1598 | .count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_params), |
1578 | .min = 16 * 50.87, | 1599 | .min = 16 * 50.87, |
1579 | .max = 16 * 858.00, | 1600 | .max = 16 * 858.00, |
1580 | .stepsize = 166667, | 1601 | .stepsize = 166667, |
1581 | .initdata = tua603x_agc112, | 1602 | .initdata = tua603x_agc112, |
1582 | .sleepdata = (u8[]){ 4, 0x9c, 0x60, 0x85, 0x54 }, | 1603 | .sleepdata = (u8[]){ 4, 0x9c, 0x60, 0x85, 0x54 }, |
1583 | }, | 1604 | }, |
1584 | [TUNER_LG_TDVS_H06XF] = { /* LGINNOTEK ATSC */ | 1605 | [TUNER_LG_TDVS_H06XF] = { /* LGINNOTEK ATSC */ |
1585 | .name = "LG TDVS-H06xF", /* H061F, H062F & H064F */ | 1606 | .name = "LG TDVS-H06xF", /* H061F, H062F & H064F */ |
1586 | .params = tuner_lg_tdvs_h06xf_params, | 1607 | .params = tuner_lg_tdvs_h06xf_params, |
1587 | .count = ARRAY_SIZE(tuner_lg_tdvs_h06xf_params), | 1608 | .count = ARRAY_SIZE(tuner_lg_tdvs_h06xf_params), |
1588 | .min = 16 * 54.00, | 1609 | .min = 16 * 54.00, |
1589 | .max = 16 * 863.00, | 1610 | .max = 16 * 863.00, |
1590 | .stepsize = 62500, | 1611 | .stepsize = 62500, |
1591 | .initdata = tua603x_agc103, | 1612 | .initdata = tua603x_agc103, |
1592 | }, | 1613 | }, |
1593 | [TUNER_YMEC_TVF66T5_B_DFF] = { /* Philips PAL */ | 1614 | [TUNER_YMEC_TVF66T5_B_DFF] = { /* Philips PAL */ |
1594 | .name = "Ymec TVF66T5-B/DFF", | 1615 | .name = "Ymec TVF66T5-B/DFF", |
1595 | .params = tuner_ymec_tvf66t5_b_dff_params, | 1616 | .params = tuner_ymec_tvf66t5_b_dff_params, |
1596 | .count = ARRAY_SIZE(tuner_ymec_tvf66t5_b_dff_params), | 1617 | .count = ARRAY_SIZE(tuner_ymec_tvf66t5_b_dff_params), |
1597 | }, | 1618 | }, |
1598 | [TUNER_LG_TALN] = { /* LGINNOTEK NTSC / PAL / SECAM */ | 1619 | [TUNER_LG_TALN] = { /* LGINNOTEK NTSC / PAL / SECAM */ |
1599 | .name = "LG TALN series", | 1620 | .name = "LG TALN series", |
1600 | .params = tuner_lg_taln_params, | 1621 | .params = tuner_lg_taln_params, |
1601 | .count = ARRAY_SIZE(tuner_lg_taln_params), | 1622 | .count = ARRAY_SIZE(tuner_lg_taln_params), |
1602 | }, | 1623 | }, |
1603 | [TUNER_PHILIPS_TD1316] = { /* Philips PAL */ | 1624 | [TUNER_PHILIPS_TD1316] = { /* Philips PAL */ |
1604 | .name = "Philips TD1316 Hybrid Tuner", | 1625 | .name = "Philips TD1316 Hybrid Tuner", |
1605 | .params = tuner_philips_td1316_params, | 1626 | .params = tuner_philips_td1316_params, |
1606 | .count = ARRAY_SIZE(tuner_philips_td1316_params), | 1627 | .count = ARRAY_SIZE(tuner_philips_td1316_params), |
1607 | .min = 16 * 87.00, | 1628 | .min = 16 * 87.00, |
1608 | .max = 16 * 895.00, | 1629 | .max = 16 * 895.00, |
1609 | .stepsize = 166667, | 1630 | .stepsize = 166667, |
1610 | }, | 1631 | }, |
1611 | [TUNER_PHILIPS_TUV1236D] = { /* Philips ATSC */ | 1632 | [TUNER_PHILIPS_TUV1236D] = { /* Philips ATSC */ |
1612 | .name = "Philips TUV1236D ATSC/NTSC dual in", | 1633 | .name = "Philips TUV1236D ATSC/NTSC dual in", |
1613 | .params = tuner_tuv1236d_params, | 1634 | .params = tuner_tuv1236d_params, |
1614 | .count = ARRAY_SIZE(tuner_tuv1236d_params), | 1635 | .count = ARRAY_SIZE(tuner_tuv1236d_params), |
1615 | .min = 16 * 54.00, | 1636 | .min = 16 * 54.00, |
1616 | .max = 16 * 864.00, | 1637 | .max = 16 * 864.00, |
1617 | .stepsize = 62500, | 1638 | .stepsize = 62500, |
1618 | }, | 1639 | }, |
1619 | [TUNER_TNF_5335MF] = { /* Tenna PAL/NTSC */ | 1640 | [TUNER_TNF_5335MF] = { /* Tenna PAL/NTSC */ |
1620 | .name = "Tena TNF 5335 and similar models", | 1641 | .name = "Tena TNF 5335 and similar models", |
1621 | .params = tuner_tnf_5335mf_params, | 1642 | .params = tuner_tnf_5335mf_params, |
1622 | .count = ARRAY_SIZE(tuner_tnf_5335mf_params), | 1643 | .count = ARRAY_SIZE(tuner_tnf_5335mf_params), |
1623 | }, | 1644 | }, |
1624 | 1645 | ||
1625 | /* 70-79 */ | 1646 | /* 70-79 */ |
1626 | [TUNER_SAMSUNG_TCPN_2121P30A] = { /* Samsung NTSC */ | 1647 | [TUNER_SAMSUNG_TCPN_2121P30A] = { /* Samsung NTSC */ |
1627 | .name = "Samsung TCPN 2121P30A", | 1648 | .name = "Samsung TCPN 2121P30A", |
1628 | .params = tuner_samsung_tcpn_2121p30a_params, | 1649 | .params = tuner_samsung_tcpn_2121p30a_params, |
1629 | .count = ARRAY_SIZE(tuner_samsung_tcpn_2121p30a_params), | 1650 | .count = ARRAY_SIZE(tuner_samsung_tcpn_2121p30a_params), |
1630 | }, | 1651 | }, |
1631 | [TUNER_XC2028] = { /* Xceive 2028 */ | 1652 | [TUNER_XC2028] = { /* Xceive 2028 */ |
1632 | .name = "Xceive xc2028/xc3028 tuner", | 1653 | .name = "Xceive xc2028/xc3028 tuner", |
1633 | /* see tuner-xc2028.c for details */ | 1654 | /* see tuner-xc2028.c for details */ |
1634 | }, | 1655 | }, |
1635 | [TUNER_THOMSON_FE6600] = { /* Thomson PAL / DVB-T */ | 1656 | [TUNER_THOMSON_FE6600] = { /* Thomson PAL / DVB-T */ |
1636 | .name = "Thomson FE6600", | 1657 | .name = "Thomson FE6600", |
1637 | .params = tuner_thomson_fe6600_params, | 1658 | .params = tuner_thomson_fe6600_params, |
1638 | .count = ARRAY_SIZE(tuner_thomson_fe6600_params), | 1659 | .count = ARRAY_SIZE(tuner_thomson_fe6600_params), |
1639 | .min = 16 * 44.25, | 1660 | .min = 16 * 44.25, |
1640 | .max = 16 * 858.00, | 1661 | .max = 16 * 858.00, |
1641 | .stepsize = 166667, | 1662 | .stepsize = 166667, |
1642 | }, | 1663 | }, |
1643 | [TUNER_SAMSUNG_TCPG_6121P30A] = { /* Samsung PAL */ | 1664 | [TUNER_SAMSUNG_TCPG_6121P30A] = { /* Samsung PAL */ |
1644 | .name = "Samsung TCPG 6121P30A", | 1665 | .name = "Samsung TCPG 6121P30A", |
1645 | .params = tuner_samsung_tcpg_6121p30a_params, | 1666 | .params = tuner_samsung_tcpg_6121p30a_params, |
1646 | .count = ARRAY_SIZE(tuner_samsung_tcpg_6121p30a_params), | 1667 | .count = ARRAY_SIZE(tuner_samsung_tcpg_6121p30a_params), |
1647 | }, | 1668 | }, |
1648 | [TUNER_TDA9887] = { /* Philips TDA 9887 IF PLL Demodulator. | 1669 | [TUNER_TDA9887] = { /* Philips TDA 9887 IF PLL Demodulator. |
1649 | This chip is part of some modern tuners */ | 1670 | This chip is part of some modern tuners */ |
1650 | .name = "Philips TDA988[5,6,7] IF PLL Demodulator", | 1671 | .name = "Philips TDA988[5,6,7] IF PLL Demodulator", |
1651 | /* see tda9887.c for details */ | 1672 | /* see tda9887.c for details */ |
1652 | }, | 1673 | }, |
1653 | [TUNER_TEA5761] = { /* Philips RADIO */ | 1674 | [TUNER_TEA5761] = { /* Philips RADIO */ |
1654 | .name = "Philips TEA5761 FM Radio", | 1675 | .name = "Philips TEA5761 FM Radio", |
1655 | /* see tea5767.c for details */ | 1676 | /* see tea5767.c for details */ |
1656 | }, | 1677 | }, |
1657 | [TUNER_XC5000] = { /* Xceive 5000 */ | 1678 | [TUNER_XC5000] = { /* Xceive 5000 */ |
1658 | .name = "Xceive 5000 tuner", | 1679 | .name = "Xceive 5000 tuner", |
1659 | /* see xc5000.c for details */ | 1680 | /* see xc5000.c for details */ |
1660 | }, | 1681 | }, |
1661 | [TUNER_TCL_MF02GIP_5N] = { /* TCL tuner MF02GIP-5N-E */ | 1682 | [TUNER_TCL_MF02GIP_5N] = { /* TCL tuner MF02GIP-5N-E */ |
1662 | .name = "TCL tuner MF02GIP-5N-E", | 1683 | .name = "TCL tuner MF02GIP-5N-E", |
1663 | .params = tuner_tcl_mf02gip_5n_params, | 1684 | .params = tuner_tcl_mf02gip_5n_params, |
1664 | .count = ARRAY_SIZE(tuner_tcl_mf02gip_5n_params), | 1685 | .count = ARRAY_SIZE(tuner_tcl_mf02gip_5n_params), |
1686 | }, | ||
1687 | [TUNER_PHILIPS_FMD1216MEX_MK3] = { /* Philips PAL */ | ||
1688 | .name = "Philips FMD1216MEX MK3 Hybrid Tuner", | ||
1689 | .params = tuner_philips_fmd1216mex_mk3_params, | ||
1690 | .count = ARRAY_SIZE(tuner_philips_fmd1216mex_mk3_params), | ||
1691 | .min = 16 * 50.87, | ||
1692 | .max = 16 * 858.00, | ||
1693 | .stepsize = 166667, | ||
1694 | .initdata = tua603x_agc112, | ||
1695 | .sleepdata = (u8[]){ 4, 0x9c, 0x60, 0x85, 0x54 }, | ||
1665 | }, | 1696 | }, |
1666 | }; | 1697 | }; |
1667 | EXPORT_SYMBOL(tuners); | 1698 | EXPORT_SYMBOL(tuners); |
1668 | 1699 | ||
1669 | unsigned const int tuner_count = ARRAY_SIZE(tuners); | 1700 | unsigned const int tuner_count = ARRAY_SIZE(tuners); |
1670 | EXPORT_SYMBOL(tuner_count); | 1701 | EXPORT_SYMBOL(tuner_count); |
1671 | 1702 | ||
1672 | MODULE_DESCRIPTION("Simple tuner device type database"); | 1703 | MODULE_DESCRIPTION("Simple tuner device type database"); |
1673 | MODULE_AUTHOR("Ralph Metzler, Gerd Knorr, Gunther Mayer"); | 1704 | MODULE_AUTHOR("Ralph Metzler, Gerd Knorr, Gunther Mayer"); |
1674 | MODULE_LICENSE("GPL"); | 1705 | MODULE_LICENSE("GPL"); |
1675 | 1706 |
drivers/media/video/tveeprom.c
1 | /* | 1 | /* |
2 | * tveeprom - eeprom decoder for tvcard configuration eeproms | 2 | * tveeprom - eeprom decoder for tvcard configuration eeproms |
3 | * | 3 | * |
4 | * Data and decoding routines shamelessly borrowed from bttv-cards.c | 4 | * Data and decoding routines shamelessly borrowed from bttv-cards.c |
5 | * eeprom access routine shamelessly borrowed from bttv-if.c | 5 | * eeprom access routine shamelessly borrowed from bttv-if.c |
6 | * which are: | 6 | * which are: |
7 | 7 | ||
8 | Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de) | 8 | Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de) |
9 | & Marcus Metzler (mocm@thp.uni-koeln.de) | 9 | & Marcus Metzler (mocm@thp.uni-koeln.de) |
10 | (c) 1999-2001 Gerd Knorr <kraxel@goldbach.in-berlin.de> | 10 | (c) 1999-2001 Gerd Knorr <kraxel@goldbach.in-berlin.de> |
11 | 11 | ||
12 | * Adjustments to fit a more general model and all bugs: | 12 | * Adjustments to fit a more general model and all bugs: |
13 | 13 | ||
14 | Copyright (C) 2003 John Klar <linpvr at projectplasma.com> | 14 | Copyright (C) 2003 John Klar <linpvr at projectplasma.com> |
15 | 15 | ||
16 | * This program is free software; you can redistribute it and/or modify | 16 | * This program is free software; you can redistribute it and/or modify |
17 | * it under the terms of the GNU General Public License as published by | 17 | * it under the terms of the GNU General Public License as published by |
18 | * the Free Software Foundation; either version 2 of the License, or | 18 | * the Free Software Foundation; either version 2 of the License, or |
19 | * (at your option) any later version. | 19 | * (at your option) any later version. |
20 | * | 20 | * |
21 | * This program is distributed in the hope that it will be useful, | 21 | * This program is distributed in the hope that it will be useful, |
22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
24 | * GNU General Public License for more details. | 24 | * GNU General Public License for more details. |
25 | * | 25 | * |
26 | * You should have received a copy of the GNU General Public License | 26 | * You should have received a copy of the GNU General Public License |
27 | * along with this program; if not, write to the Free Software | 27 | * along with this program; if not, write to the Free Software |
28 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 28 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | 31 | ||
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
34 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
37 | #include <linux/videodev2.h> | 37 | #include <linux/videodev2.h> |
38 | #include <linux/i2c.h> | 38 | #include <linux/i2c.h> |
39 | 39 | ||
40 | #include <media/tuner.h> | 40 | #include <media/tuner.h> |
41 | #include <media/tveeprom.h> | 41 | #include <media/tveeprom.h> |
42 | #include <media/v4l2-common.h> | 42 | #include <media/v4l2-common.h> |
43 | #include <media/v4l2-chip-ident.h> | 43 | #include <media/v4l2-chip-ident.h> |
44 | 44 | ||
45 | MODULE_DESCRIPTION("i2c Hauppauge eeprom decoder driver"); | 45 | MODULE_DESCRIPTION("i2c Hauppauge eeprom decoder driver"); |
46 | MODULE_AUTHOR("John Klar"); | 46 | MODULE_AUTHOR("John Klar"); |
47 | MODULE_LICENSE("GPL"); | 47 | MODULE_LICENSE("GPL"); |
48 | 48 | ||
49 | static int debug; | 49 | static int debug; |
50 | module_param(debug, int, 0644); | 50 | module_param(debug, int, 0644); |
51 | MODULE_PARM_DESC(debug, "Debug level (0-1)"); | 51 | MODULE_PARM_DESC(debug, "Debug level (0-1)"); |
52 | 52 | ||
53 | #define STRM(array, i) \ | 53 | #define STRM(array, i) \ |
54 | (i < sizeof(array) / sizeof(char *) ? array[i] : "unknown") | 54 | (i < sizeof(array) / sizeof(char *) ? array[i] : "unknown") |
55 | 55 | ||
56 | #define tveeprom_info(fmt, arg...) \ | 56 | #define tveeprom_info(fmt, arg...) \ |
57 | v4l_printk(KERN_INFO, "tveeprom", c->adapter, c->addr, fmt , ## arg) | 57 | v4l_printk(KERN_INFO, "tveeprom", c->adapter, c->addr, fmt , ## arg) |
58 | #define tveeprom_warn(fmt, arg...) \ | 58 | #define tveeprom_warn(fmt, arg...) \ |
59 | v4l_printk(KERN_WARNING, "tveeprom", c->adapter, c->addr, fmt , ## arg) | 59 | v4l_printk(KERN_WARNING, "tveeprom", c->adapter, c->addr, fmt , ## arg) |
60 | #define tveeprom_dbg(fmt, arg...) do { \ | 60 | #define tveeprom_dbg(fmt, arg...) do { \ |
61 | if (debug) \ | 61 | if (debug) \ |
62 | v4l_printk(KERN_DEBUG, "tveeprom", \ | 62 | v4l_printk(KERN_DEBUG, "tveeprom", \ |
63 | c->adapter, c->addr, fmt , ## arg); \ | 63 | c->adapter, c->addr, fmt , ## arg); \ |
64 | } while (0) | 64 | } while (0) |
65 | 65 | ||
66 | /* | 66 | /* |
67 | * The Hauppauge eeprom uses an 8bit field to determine which | 67 | * The Hauppauge eeprom uses an 8bit field to determine which |
68 | * tuner formats the tuner supports. | 68 | * tuner formats the tuner supports. |
69 | */ | 69 | */ |
70 | static struct HAUPPAUGE_TUNER_FMT | 70 | static struct HAUPPAUGE_TUNER_FMT |
71 | { | 71 | { |
72 | int id; | 72 | int id; |
73 | char *name; | 73 | char *name; |
74 | } | 74 | } |
75 | hauppauge_tuner_fmt[] = | 75 | hauppauge_tuner_fmt[] = |
76 | { | 76 | { |
77 | { V4L2_STD_UNKNOWN, " UNKNOWN" }, | 77 | { V4L2_STD_UNKNOWN, " UNKNOWN" }, |
78 | { V4L2_STD_UNKNOWN, " FM" }, | 78 | { V4L2_STD_UNKNOWN, " FM" }, |
79 | { V4L2_STD_B|V4L2_STD_GH, " PAL(B/G)" }, | 79 | { V4L2_STD_B|V4L2_STD_GH, " PAL(B/G)" }, |
80 | { V4L2_STD_MN, " NTSC(M)" }, | 80 | { V4L2_STD_MN, " NTSC(M)" }, |
81 | { V4L2_STD_PAL_I, " PAL(I)" }, | 81 | { V4L2_STD_PAL_I, " PAL(I)" }, |
82 | { V4L2_STD_SECAM_L|V4L2_STD_SECAM_LC, " SECAM(L/L')" }, | 82 | { V4L2_STD_SECAM_L|V4L2_STD_SECAM_LC, " SECAM(L/L')" }, |
83 | { V4L2_STD_DK, " PAL(D/D1/K)" }, | 83 | { V4L2_STD_DK, " PAL(D/D1/K)" }, |
84 | { V4L2_STD_ATSC, " ATSC/DVB Digital" }, | 84 | { V4L2_STD_ATSC, " ATSC/DVB Digital" }, |
85 | }; | 85 | }; |
86 | 86 | ||
87 | /* This is the full list of possible tuners. Many thanks to Hauppauge for | 87 | /* This is the full list of possible tuners. Many thanks to Hauppauge for |
88 | supplying this information. Note that many tuners where only used for | 88 | supplying this information. Note that many tuners where only used for |
89 | testing and never made it to the outside world. So you will only see | 89 | testing and never made it to the outside world. So you will only see |
90 | a subset in actual produced cards. */ | 90 | a subset in actual produced cards. */ |
91 | static struct HAUPPAUGE_TUNER | 91 | static struct HAUPPAUGE_TUNER |
92 | { | 92 | { |
93 | int id; | 93 | int id; |
94 | char *name; | 94 | char *name; |
95 | } | 95 | } |
96 | hauppauge_tuner[] = | 96 | hauppauge_tuner[] = |
97 | { | 97 | { |
98 | /* 0-9 */ | 98 | /* 0-9 */ |
99 | { TUNER_ABSENT, "None" }, | 99 | { TUNER_ABSENT, "None" }, |
100 | { TUNER_ABSENT, "External" }, | 100 | { TUNER_ABSENT, "External" }, |
101 | { TUNER_ABSENT, "Unspecified" }, | 101 | { TUNER_ABSENT, "Unspecified" }, |
102 | { TUNER_PHILIPS_PAL, "Philips FI1216" }, | 102 | { TUNER_PHILIPS_PAL, "Philips FI1216" }, |
103 | { TUNER_PHILIPS_SECAM, "Philips FI1216MF" }, | 103 | { TUNER_PHILIPS_SECAM, "Philips FI1216MF" }, |
104 | { TUNER_PHILIPS_NTSC, "Philips FI1236" }, | 104 | { TUNER_PHILIPS_NTSC, "Philips FI1236" }, |
105 | { TUNER_PHILIPS_PAL_I, "Philips FI1246" }, | 105 | { TUNER_PHILIPS_PAL_I, "Philips FI1246" }, |
106 | { TUNER_PHILIPS_PAL_DK, "Philips FI1256" }, | 106 | { TUNER_PHILIPS_PAL_DK, "Philips FI1256" }, |
107 | { TUNER_PHILIPS_PAL, "Philips FI1216 MK2" }, | 107 | { TUNER_PHILIPS_PAL, "Philips FI1216 MK2" }, |
108 | { TUNER_PHILIPS_SECAM, "Philips FI1216MF MK2" }, | 108 | { TUNER_PHILIPS_SECAM, "Philips FI1216MF MK2" }, |
109 | /* 10-19 */ | 109 | /* 10-19 */ |
110 | { TUNER_PHILIPS_NTSC, "Philips FI1236 MK2" }, | 110 | { TUNER_PHILIPS_NTSC, "Philips FI1236 MK2" }, |
111 | { TUNER_PHILIPS_PAL_I, "Philips FI1246 MK2" }, | 111 | { TUNER_PHILIPS_PAL_I, "Philips FI1246 MK2" }, |
112 | { TUNER_PHILIPS_PAL_DK, "Philips FI1256 MK2" }, | 112 | { TUNER_PHILIPS_PAL_DK, "Philips FI1256 MK2" }, |
113 | { TUNER_TEMIC_NTSC, "Temic 4032FY5" }, | 113 | { TUNER_TEMIC_NTSC, "Temic 4032FY5" }, |
114 | { TUNER_TEMIC_PAL, "Temic 4002FH5" }, | 114 | { TUNER_TEMIC_PAL, "Temic 4002FH5" }, |
115 | { TUNER_TEMIC_PAL_I, "Temic 4062FY5" }, | 115 | { TUNER_TEMIC_PAL_I, "Temic 4062FY5" }, |
116 | { TUNER_PHILIPS_PAL, "Philips FR1216 MK2" }, | 116 | { TUNER_PHILIPS_PAL, "Philips FR1216 MK2" }, |
117 | { TUNER_PHILIPS_SECAM, "Philips FR1216MF MK2" }, | 117 | { TUNER_PHILIPS_SECAM, "Philips FR1216MF MK2" }, |
118 | { TUNER_PHILIPS_NTSC, "Philips FR1236 MK2" }, | 118 | { TUNER_PHILIPS_NTSC, "Philips FR1236 MK2" }, |
119 | { TUNER_PHILIPS_PAL_I, "Philips FR1246 MK2" }, | 119 | { TUNER_PHILIPS_PAL_I, "Philips FR1246 MK2" }, |
120 | /* 20-29 */ | 120 | /* 20-29 */ |
121 | { TUNER_PHILIPS_PAL_DK, "Philips FR1256 MK2" }, | 121 | { TUNER_PHILIPS_PAL_DK, "Philips FR1256 MK2" }, |
122 | { TUNER_PHILIPS_PAL, "Philips FM1216" }, | 122 | { TUNER_PHILIPS_PAL, "Philips FM1216" }, |
123 | { TUNER_PHILIPS_SECAM, "Philips FM1216MF" }, | 123 | { TUNER_PHILIPS_SECAM, "Philips FM1216MF" }, |
124 | { TUNER_PHILIPS_NTSC, "Philips FM1236" }, | 124 | { TUNER_PHILIPS_NTSC, "Philips FM1236" }, |
125 | { TUNER_PHILIPS_PAL_I, "Philips FM1246" }, | 125 | { TUNER_PHILIPS_PAL_I, "Philips FM1246" }, |
126 | { TUNER_PHILIPS_PAL_DK, "Philips FM1256" }, | 126 | { TUNER_PHILIPS_PAL_DK, "Philips FM1256" }, |
127 | { TUNER_TEMIC_4036FY5_NTSC, "Temic 4036FY5" }, | 127 | { TUNER_TEMIC_4036FY5_NTSC, "Temic 4036FY5" }, |
128 | { TUNER_ABSENT, "Samsung TCPN9082D" }, | 128 | { TUNER_ABSENT, "Samsung TCPN9082D" }, |
129 | { TUNER_ABSENT, "Samsung TCPM9092P" }, | 129 | { TUNER_ABSENT, "Samsung TCPM9092P" }, |
130 | { TUNER_TEMIC_4006FH5_PAL, "Temic 4006FH5" }, | 130 | { TUNER_TEMIC_4006FH5_PAL, "Temic 4006FH5" }, |
131 | /* 30-39 */ | 131 | /* 30-39 */ |
132 | { TUNER_ABSENT, "Samsung TCPN9085D" }, | 132 | { TUNER_ABSENT, "Samsung TCPN9085D" }, |
133 | { TUNER_ABSENT, "Samsung TCPB9085P" }, | 133 | { TUNER_ABSENT, "Samsung TCPB9085P" }, |
134 | { TUNER_ABSENT, "Samsung TCPL9091P" }, | 134 | { TUNER_ABSENT, "Samsung TCPL9091P" }, |
135 | { TUNER_TEMIC_4039FR5_NTSC, "Temic 4039FR5" }, | 135 | { TUNER_TEMIC_4039FR5_NTSC, "Temic 4039FR5" }, |
136 | { TUNER_PHILIPS_FQ1216ME, "Philips FQ1216 ME" }, | 136 | { TUNER_PHILIPS_FQ1216ME, "Philips FQ1216 ME" }, |
137 | { TUNER_TEMIC_4066FY5_PAL_I, "Temic 4066FY5" }, | 137 | { TUNER_TEMIC_4066FY5_PAL_I, "Temic 4066FY5" }, |
138 | { TUNER_PHILIPS_NTSC, "Philips TD1536" }, | 138 | { TUNER_PHILIPS_NTSC, "Philips TD1536" }, |
139 | { TUNER_PHILIPS_NTSC, "Philips TD1536D" }, | 139 | { TUNER_PHILIPS_NTSC, "Philips TD1536D" }, |
140 | { TUNER_PHILIPS_NTSC, "Philips FMR1236" }, /* mono radio */ | 140 | { TUNER_PHILIPS_NTSC, "Philips FMR1236" }, /* mono radio */ |
141 | { TUNER_ABSENT, "Philips FI1256MP" }, | 141 | { TUNER_ABSENT, "Philips FI1256MP" }, |
142 | /* 40-49 */ | 142 | /* 40-49 */ |
143 | { TUNER_ABSENT, "Samsung TCPQ9091P" }, | 143 | { TUNER_ABSENT, "Samsung TCPQ9091P" }, |
144 | { TUNER_TEMIC_4006FN5_MULTI_PAL, "Temic 4006FN5" }, | 144 | { TUNER_TEMIC_4006FN5_MULTI_PAL, "Temic 4006FN5" }, |
145 | { TUNER_TEMIC_4009FR5_PAL, "Temic 4009FR5" }, | 145 | { TUNER_TEMIC_4009FR5_PAL, "Temic 4009FR5" }, |
146 | { TUNER_TEMIC_4046FM5, "Temic 4046FM5" }, | 146 | { TUNER_TEMIC_4046FM5, "Temic 4046FM5" }, |
147 | { TUNER_TEMIC_4009FN5_MULTI_PAL_FM, "Temic 4009FN5" }, | 147 | { TUNER_TEMIC_4009FN5_MULTI_PAL_FM, "Temic 4009FN5" }, |
148 | { TUNER_ABSENT, "Philips TD1536D FH 44"}, | 148 | { TUNER_ABSENT, "Philips TD1536D FH 44"}, |
149 | { TUNER_LG_NTSC_FM, "LG TP18NSR01F"}, | 149 | { TUNER_LG_NTSC_FM, "LG TP18NSR01F"}, |
150 | { TUNER_LG_PAL_FM, "LG TP18PSB01D"}, | 150 | { TUNER_LG_PAL_FM, "LG TP18PSB01D"}, |
151 | { TUNER_LG_PAL, "LG TP18PSB11D"}, | 151 | { TUNER_LG_PAL, "LG TP18PSB11D"}, |
152 | { TUNER_LG_PAL_I_FM, "LG TAPC-I001D"}, | 152 | { TUNER_LG_PAL_I_FM, "LG TAPC-I001D"}, |
153 | /* 50-59 */ | 153 | /* 50-59 */ |
154 | { TUNER_LG_PAL_I, "LG TAPC-I701D"}, | 154 | { TUNER_LG_PAL_I, "LG TAPC-I701D"}, |
155 | { TUNER_ABSENT, "Temic 4042FI5"}, | 155 | { TUNER_ABSENT, "Temic 4042FI5"}, |
156 | { TUNER_MICROTUNE_4049FM5, "Microtune 4049 FM5"}, | 156 | { TUNER_MICROTUNE_4049FM5, "Microtune 4049 FM5"}, |
157 | { TUNER_ABSENT, "LG TPI8NSR11F"}, | 157 | { TUNER_ABSENT, "LG TPI8NSR11F"}, |
158 | { TUNER_ABSENT, "Microtune 4049 FM5 Alt I2C"}, | 158 | { TUNER_ABSENT, "Microtune 4049 FM5 Alt I2C"}, |
159 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FQ1216ME MK3"}, | 159 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FQ1216ME MK3"}, |
160 | { TUNER_ABSENT, "Philips FI1236 MK3"}, | 160 | { TUNER_ABSENT, "Philips FI1236 MK3"}, |
161 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FM1216 ME MK3"}, | 161 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FM1216 ME MK3"}, |
162 | { TUNER_PHILIPS_FM1236_MK3, "Philips FM1236 MK3"}, | 162 | { TUNER_PHILIPS_FM1236_MK3, "Philips FM1236 MK3"}, |
163 | { TUNER_ABSENT, "Philips FM1216MP MK3"}, | 163 | { TUNER_ABSENT, "Philips FM1216MP MK3"}, |
164 | /* 60-69 */ | 164 | /* 60-69 */ |
165 | { TUNER_PHILIPS_FM1216ME_MK3, "LG S001D MK3"}, | 165 | { TUNER_PHILIPS_FM1216ME_MK3, "LG S001D MK3"}, |
166 | { TUNER_ABSENT, "LG M001D MK3"}, | 166 | { TUNER_ABSENT, "LG M001D MK3"}, |
167 | { TUNER_PHILIPS_FM1216ME_MK3, "LG S701D MK3"}, | 167 | { TUNER_PHILIPS_FM1216ME_MK3, "LG S701D MK3"}, |
168 | { TUNER_ABSENT, "LG M701D MK3"}, | 168 | { TUNER_ABSENT, "LG M701D MK3"}, |
169 | { TUNER_ABSENT, "Temic 4146FM5"}, | 169 | { TUNER_ABSENT, "Temic 4146FM5"}, |
170 | { TUNER_ABSENT, "Temic 4136FY5"}, | 170 | { TUNER_ABSENT, "Temic 4136FY5"}, |
171 | { TUNER_ABSENT, "Temic 4106FH5"}, | 171 | { TUNER_ABSENT, "Temic 4106FH5"}, |
172 | { TUNER_ABSENT, "Philips FQ1216LMP MK3"}, | 172 | { TUNER_ABSENT, "Philips FQ1216LMP MK3"}, |
173 | { TUNER_LG_NTSC_TAPE, "LG TAPE H001F MK3"}, | 173 | { TUNER_LG_NTSC_TAPE, "LG TAPE H001F MK3"}, |
174 | { TUNER_LG_NTSC_TAPE, "LG TAPE H701F MK3"}, | 174 | { TUNER_LG_NTSC_TAPE, "LG TAPE H701F MK3"}, |
175 | /* 70-79 */ | 175 | /* 70-79 */ |
176 | { TUNER_ABSENT, "LG TALN H200T"}, | 176 | { TUNER_ABSENT, "LG TALN H200T"}, |
177 | { TUNER_ABSENT, "LG TALN H250T"}, | 177 | { TUNER_ABSENT, "LG TALN H250T"}, |
178 | { TUNER_ABSENT, "LG TALN M200T"}, | 178 | { TUNER_ABSENT, "LG TALN M200T"}, |
179 | { TUNER_ABSENT, "LG TALN Z200T"}, | 179 | { TUNER_ABSENT, "LG TALN Z200T"}, |
180 | { TUNER_ABSENT, "LG TALN S200T"}, | 180 | { TUNER_ABSENT, "LG TALN S200T"}, |
181 | { TUNER_ABSENT, "Thompson DTT7595"}, | 181 | { TUNER_ABSENT, "Thompson DTT7595"}, |
182 | { TUNER_ABSENT, "Thompson DTT7592"}, | 182 | { TUNER_ABSENT, "Thompson DTT7592"}, |
183 | { TUNER_ABSENT, "Silicon TDA8275C1 8290"}, | 183 | { TUNER_ABSENT, "Silicon TDA8275C1 8290"}, |
184 | { TUNER_ABSENT, "Silicon TDA8275C1 8290 FM"}, | 184 | { TUNER_ABSENT, "Silicon TDA8275C1 8290 FM"}, |
185 | { TUNER_ABSENT, "Thompson DTT757"}, | 185 | { TUNER_ABSENT, "Thompson DTT757"}, |
186 | /* 80-89 */ | 186 | /* 80-89 */ |
187 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FQ1216LME MK3"}, | 187 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FQ1216LME MK3"}, |
188 | { TUNER_LG_PAL_NEW_TAPC, "LG TAPC G701D"}, | 188 | { TUNER_LG_PAL_NEW_TAPC, "LG TAPC G701D"}, |
189 | { TUNER_LG_NTSC_NEW_TAPC, "LG TAPC H791F"}, | 189 | { TUNER_LG_NTSC_NEW_TAPC, "LG TAPC H791F"}, |
190 | { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MB 3"}, | 190 | { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MB 3"}, |
191 | { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MI 3"}, | 191 | { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MI 3"}, |
192 | { TUNER_TCL_2002N, "TCL 2002N 6A"}, | 192 | { TUNER_TCL_2002N, "TCL 2002N 6A"}, |
193 | { TUNER_PHILIPS_FM1236_MK3, "Philips FQ1236 MK3"}, | 193 | { TUNER_PHILIPS_FM1236_MK3, "Philips FQ1236 MK3"}, |
194 | { TUNER_SAMSUNG_TCPN_2121P30A, "Samsung TCPN 2121P30A"}, | 194 | { TUNER_SAMSUNG_TCPN_2121P30A, "Samsung TCPN 2121P30A"}, |
195 | { TUNER_ABSENT, "Samsung TCPE 4121P30A"}, | 195 | { TUNER_ABSENT, "Samsung TCPE 4121P30A"}, |
196 | { TUNER_PHILIPS_FM1216ME_MK3, "TCL MFPE05 2"}, | 196 | { TUNER_PHILIPS_FM1216ME_MK3, "TCL MFPE05 2"}, |
197 | /* 90-99 */ | 197 | /* 90-99 */ |
198 | { TUNER_ABSENT, "LG TALN H202T"}, | 198 | { TUNER_ABSENT, "LG TALN H202T"}, |
199 | { TUNER_PHILIPS_FQ1216AME_MK4, "Philips FQ1216AME MK4"}, | 199 | { TUNER_PHILIPS_FQ1216AME_MK4, "Philips FQ1216AME MK4"}, |
200 | { TUNER_PHILIPS_FQ1236A_MK4, "Philips FQ1236A MK4"}, | 200 | { TUNER_PHILIPS_FQ1236A_MK4, "Philips FQ1236A MK4"}, |
201 | { TUNER_ABSENT, "Philips FQ1286A MK4"}, | 201 | { TUNER_ABSENT, "Philips FQ1286A MK4"}, |
202 | { TUNER_ABSENT, "Philips FQ1216ME MK5"}, | 202 | { TUNER_ABSENT, "Philips FQ1216ME MK5"}, |
203 | { TUNER_ABSENT, "Philips FQ1236 MK5"}, | 203 | { TUNER_ABSENT, "Philips FQ1236 MK5"}, |
204 | { TUNER_SAMSUNG_TCPG_6121P30A, "Samsung TCPG 6121P30A"}, | 204 | { TUNER_SAMSUNG_TCPG_6121P30A, "Samsung TCPG 6121P30A"}, |
205 | { TUNER_TCL_2002MB, "TCL 2002MB_3H"}, | 205 | { TUNER_TCL_2002MB, "TCL 2002MB_3H"}, |
206 | { TUNER_ABSENT, "TCL 2002MI_3H"}, | 206 | { TUNER_ABSENT, "TCL 2002MI_3H"}, |
207 | { TUNER_TCL_2002N, "TCL 2002N 5H"}, | 207 | { TUNER_TCL_2002N, "TCL 2002N 5H"}, |
208 | /* 100-109 */ | 208 | /* 100-109 */ |
209 | { TUNER_PHILIPS_FMD1216ME_MK3, "Philips FMD1216ME"}, | 209 | { TUNER_PHILIPS_FMD1216ME_MK3, "Philips FMD1216ME"}, |
210 | { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, | 210 | { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, |
211 | { TUNER_ABSENT, "Panasonic ENV57H12D5"}, | 211 | { TUNER_ABSENT, "Panasonic ENV57H12D5"}, |
212 | { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"}, | 212 | { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"}, |
213 | { TUNER_ABSENT, "TCL MNM05-4"}, | 213 | { TUNER_ABSENT, "TCL MNM05-4"}, |
214 | { TUNER_PHILIPS_FM1216ME_MK3, "TCL MPE05-2"}, | 214 | { TUNER_PHILIPS_FM1216ME_MK3, "TCL MPE05-2"}, |
215 | { TUNER_ABSENT, "TCL MQNM05-4"}, | 215 | { TUNER_ABSENT, "TCL MQNM05-4"}, |
216 | { TUNER_ABSENT, "LG TAPC-W701D"}, | 216 | { TUNER_ABSENT, "LG TAPC-W701D"}, |
217 | { TUNER_ABSENT, "TCL 9886P-WM"}, | 217 | { TUNER_ABSENT, "TCL 9886P-WM"}, |
218 | { TUNER_ABSENT, "TCL 1676NM-WM"}, | 218 | { TUNER_ABSENT, "TCL 1676NM-WM"}, |
219 | /* 110-119 */ | 219 | /* 110-119 */ |
220 | { TUNER_ABSENT, "Thompson DTT75105"}, | 220 | { TUNER_ABSENT, "Thompson DTT75105"}, |
221 | { TUNER_ABSENT, "Conexant_CX24109"}, | 221 | { TUNER_ABSENT, "Conexant_CX24109"}, |
222 | { TUNER_TCL_2002N, "TCL M2523_5N_E"}, | 222 | { TUNER_TCL_2002N, "TCL M2523_5N_E"}, |
223 | { TUNER_TCL_2002MB, "TCL M2523_3DB_E"}, | 223 | { TUNER_TCL_2002MB, "TCL M2523_3DB_E"}, |
224 | { TUNER_ABSENT, "Philips 8275A"}, | 224 | { TUNER_ABSENT, "Philips 8275A"}, |
225 | { TUNER_ABSENT, "Microtune MT2060"}, | 225 | { TUNER_ABSENT, "Microtune MT2060"}, |
226 | { TUNER_PHILIPS_FM1236_MK3, "Philips FM1236 MK5"}, | 226 | { TUNER_PHILIPS_FM1236_MK3, "Philips FM1236 MK5"}, |
227 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FM1216ME MK5"}, | 227 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FM1216ME MK5"}, |
228 | { TUNER_ABSENT, "TCL M2523_3DI_E"}, | 228 | { TUNER_ABSENT, "TCL M2523_3DI_E"}, |
229 | { TUNER_ABSENT, "Samsung THPD5222FG30A"}, | 229 | { TUNER_ABSENT, "Samsung THPD5222FG30A"}, |
230 | /* 120-129 */ | 230 | /* 120-129 */ |
231 | { TUNER_XC2028, "Xceive XC3028"}, | 231 | { TUNER_XC2028, "Xceive XC3028"}, |
232 | { TUNER_ABSENT, "Philips FQ1216LME MK5"}, | 232 | { TUNER_ABSENT, "Philips FQ1216LME MK5"}, |
233 | { TUNER_ABSENT, "Philips FQD1216LME"}, | 233 | { TUNER_ABSENT, "Philips FQD1216LME"}, |
234 | { TUNER_ABSENT, "Conexant CX24118A"}, | 234 | { TUNER_ABSENT, "Conexant CX24118A"}, |
235 | { TUNER_ABSENT, "TCL DMF11WIP"}, | 235 | { TUNER_ABSENT, "TCL DMF11WIP"}, |
236 | { TUNER_ABSENT, "TCL MFNM05_4H_E"}, | 236 | { TUNER_ABSENT, "TCL MFNM05_4H_E"}, |
237 | { TUNER_ABSENT, "TCL MNM05_4H_E"}, | 237 | { TUNER_ABSENT, "TCL MNM05_4H_E"}, |
238 | { TUNER_ABSENT, "TCL MPE05_2H_E"}, | 238 | { TUNER_ABSENT, "TCL MPE05_2H_E"}, |
239 | { TUNER_ABSENT, "TCL MQNM05_4_U"}, | 239 | { TUNER_ABSENT, "TCL MQNM05_4_U"}, |
240 | { TUNER_ABSENT, "TCL M2523_5NH_E"}, | 240 | { TUNER_ABSENT, "TCL M2523_5NH_E"}, |
241 | /* 130-139 */ | 241 | /* 130-139 */ |
242 | { TUNER_ABSENT, "TCL M2523_3DBH_E"}, | 242 | { TUNER_ABSENT, "TCL M2523_3DBH_E"}, |
243 | { TUNER_ABSENT, "TCL M2523_3DIH_E"}, | 243 | { TUNER_ABSENT, "TCL M2523_3DIH_E"}, |
244 | { TUNER_ABSENT, "TCL MFPE05_2_U"}, | 244 | { TUNER_ABSENT, "TCL MFPE05_2_U"}, |
245 | { TUNER_PHILIPS_FMD1216ME_MK3, "Philips FMD1216MEX"}, | 245 | { TUNER_PHILIPS_FMD1216MEX_MK3, "Philips FMD1216MEX"}, |
246 | { TUNER_ABSENT, "Philips FRH2036B"}, | 246 | { TUNER_ABSENT, "Philips FRH2036B"}, |
247 | { TUNER_ABSENT, "Panasonic ENGF75_01GF"}, | 247 | { TUNER_ABSENT, "Panasonic ENGF75_01GF"}, |
248 | { TUNER_ABSENT, "MaxLinear MXL5005"}, | 248 | { TUNER_ABSENT, "MaxLinear MXL5005"}, |
249 | { TUNER_ABSENT, "MaxLinear MXL5003"}, | 249 | { TUNER_ABSENT, "MaxLinear MXL5003"}, |
250 | { TUNER_ABSENT, "Xceive XC2028"}, | 250 | { TUNER_ABSENT, "Xceive XC2028"}, |
251 | { TUNER_ABSENT, "Microtune MT2131"}, | 251 | { TUNER_ABSENT, "Microtune MT2131"}, |
252 | /* 140-149 */ | 252 | /* 140-149 */ |
253 | { TUNER_ABSENT, "Philips 8275A_8295"}, | 253 | { TUNER_ABSENT, "Philips 8275A_8295"}, |
254 | { TUNER_ABSENT, "TCL MF02GIP_5N_E"}, | 254 | { TUNER_ABSENT, "TCL MF02GIP_5N_E"}, |
255 | { TUNER_ABSENT, "TCL MF02GIP_3DB_E"}, | 255 | { TUNER_ABSENT, "TCL MF02GIP_3DB_E"}, |
256 | { TUNER_ABSENT, "TCL MF02GIP_3DI_E"}, | 256 | { TUNER_ABSENT, "TCL MF02GIP_3DI_E"}, |
257 | { TUNER_ABSENT, "Microtune MT2266"}, | 257 | { TUNER_ABSENT, "Microtune MT2266"}, |
258 | { TUNER_ABSENT, "TCL MF10WPP_4N_E"}, | 258 | { TUNER_ABSENT, "TCL MF10WPP_4N_E"}, |
259 | { TUNER_ABSENT, "LG TAPQ_H702F"}, | 259 | { TUNER_ABSENT, "LG TAPQ_H702F"}, |
260 | { TUNER_ABSENT, "TCL M09WPP_4N_E"}, | 260 | { TUNER_ABSENT, "TCL M09WPP_4N_E"}, |
261 | { TUNER_ABSENT, "MaxLinear MXL5005_v2"}, | 261 | { TUNER_ABSENT, "MaxLinear MXL5005_v2"}, |
262 | { TUNER_PHILIPS_TDA8290, "Philips 18271_8295"}, | 262 | { TUNER_PHILIPS_TDA8290, "Philips 18271_8295"}, |
263 | /* 150-159 */ | 263 | /* 150-159 */ |
264 | { TUNER_ABSENT, "Xceive XC5000"}, | 264 | { TUNER_ABSENT, "Xceive XC5000"}, |
265 | }; | 265 | }; |
266 | 266 | ||
267 | /* Use V4L2_IDENT_AMBIGUOUS for those audio 'chips' that are | 267 | /* Use V4L2_IDENT_AMBIGUOUS for those audio 'chips' that are |
268 | * internal to a video chip, i.e. not a separate audio chip. */ | 268 | * internal to a video chip, i.e. not a separate audio chip. */ |
269 | static struct HAUPPAUGE_AUDIOIC | 269 | static struct HAUPPAUGE_AUDIOIC |
270 | { | 270 | { |
271 | u32 id; | 271 | u32 id; |
272 | char *name; | 272 | char *name; |
273 | } | 273 | } |
274 | audioIC[] = | 274 | audioIC[] = |
275 | { | 275 | { |
276 | /* 0-4 */ | 276 | /* 0-4 */ |
277 | { V4L2_IDENT_NONE, "None" }, | 277 | { V4L2_IDENT_NONE, "None" }, |
278 | { V4L2_IDENT_UNKNOWN, "TEA6300" }, | 278 | { V4L2_IDENT_UNKNOWN, "TEA6300" }, |
279 | { V4L2_IDENT_UNKNOWN, "TEA6320" }, | 279 | { V4L2_IDENT_UNKNOWN, "TEA6320" }, |
280 | { V4L2_IDENT_UNKNOWN, "TDA9850" }, | 280 | { V4L2_IDENT_UNKNOWN, "TDA9850" }, |
281 | { V4L2_IDENT_MSPX4XX, "MSP3400C" }, | 281 | { V4L2_IDENT_MSPX4XX, "MSP3400C" }, |
282 | /* 5-9 */ | 282 | /* 5-9 */ |
283 | { V4L2_IDENT_MSPX4XX, "MSP3410D" }, | 283 | { V4L2_IDENT_MSPX4XX, "MSP3410D" }, |
284 | { V4L2_IDENT_MSPX4XX, "MSP3415" }, | 284 | { V4L2_IDENT_MSPX4XX, "MSP3415" }, |
285 | { V4L2_IDENT_MSPX4XX, "MSP3430" }, | 285 | { V4L2_IDENT_MSPX4XX, "MSP3430" }, |
286 | { V4L2_IDENT_MSPX4XX, "MSP3438" }, | 286 | { V4L2_IDENT_MSPX4XX, "MSP3438" }, |
287 | { V4L2_IDENT_UNKNOWN, "CS5331" }, | 287 | { V4L2_IDENT_UNKNOWN, "CS5331" }, |
288 | /* 10-14 */ | 288 | /* 10-14 */ |
289 | { V4L2_IDENT_MSPX4XX, "MSP3435" }, | 289 | { V4L2_IDENT_MSPX4XX, "MSP3435" }, |
290 | { V4L2_IDENT_MSPX4XX, "MSP3440" }, | 290 | { V4L2_IDENT_MSPX4XX, "MSP3440" }, |
291 | { V4L2_IDENT_MSPX4XX, "MSP3445" }, | 291 | { V4L2_IDENT_MSPX4XX, "MSP3445" }, |
292 | { V4L2_IDENT_MSPX4XX, "MSP3411" }, | 292 | { V4L2_IDENT_MSPX4XX, "MSP3411" }, |
293 | { V4L2_IDENT_MSPX4XX, "MSP3416" }, | 293 | { V4L2_IDENT_MSPX4XX, "MSP3416" }, |
294 | /* 15-19 */ | 294 | /* 15-19 */ |
295 | { V4L2_IDENT_MSPX4XX, "MSP3425" }, | 295 | { V4L2_IDENT_MSPX4XX, "MSP3425" }, |
296 | { V4L2_IDENT_MSPX4XX, "MSP3451" }, | 296 | { V4L2_IDENT_MSPX4XX, "MSP3451" }, |
297 | { V4L2_IDENT_MSPX4XX, "MSP3418" }, | 297 | { V4L2_IDENT_MSPX4XX, "MSP3418" }, |
298 | { V4L2_IDENT_UNKNOWN, "Type 0x12" }, | 298 | { V4L2_IDENT_UNKNOWN, "Type 0x12" }, |
299 | { V4L2_IDENT_UNKNOWN, "OKI7716" }, | 299 | { V4L2_IDENT_UNKNOWN, "OKI7716" }, |
300 | /* 20-24 */ | 300 | /* 20-24 */ |
301 | { V4L2_IDENT_MSPX4XX, "MSP4410" }, | 301 | { V4L2_IDENT_MSPX4XX, "MSP4410" }, |
302 | { V4L2_IDENT_MSPX4XX, "MSP4420" }, | 302 | { V4L2_IDENT_MSPX4XX, "MSP4420" }, |
303 | { V4L2_IDENT_MSPX4XX, "MSP4440" }, | 303 | { V4L2_IDENT_MSPX4XX, "MSP4440" }, |
304 | { V4L2_IDENT_MSPX4XX, "MSP4450" }, | 304 | { V4L2_IDENT_MSPX4XX, "MSP4450" }, |
305 | { V4L2_IDENT_MSPX4XX, "MSP4408" }, | 305 | { V4L2_IDENT_MSPX4XX, "MSP4408" }, |
306 | /* 25-29 */ | 306 | /* 25-29 */ |
307 | { V4L2_IDENT_MSPX4XX, "MSP4418" }, | 307 | { V4L2_IDENT_MSPX4XX, "MSP4418" }, |
308 | { V4L2_IDENT_MSPX4XX, "MSP4428" }, | 308 | { V4L2_IDENT_MSPX4XX, "MSP4428" }, |
309 | { V4L2_IDENT_MSPX4XX, "MSP4448" }, | 309 | { V4L2_IDENT_MSPX4XX, "MSP4448" }, |
310 | { V4L2_IDENT_MSPX4XX, "MSP4458" }, | 310 | { V4L2_IDENT_MSPX4XX, "MSP4458" }, |
311 | { V4L2_IDENT_MSPX4XX, "Type 0x1d" }, | 311 | { V4L2_IDENT_MSPX4XX, "Type 0x1d" }, |
312 | /* 30-34 */ | 312 | /* 30-34 */ |
313 | { V4L2_IDENT_AMBIGUOUS, "CX880" }, | 313 | { V4L2_IDENT_AMBIGUOUS, "CX880" }, |
314 | { V4L2_IDENT_AMBIGUOUS, "CX881" }, | 314 | { V4L2_IDENT_AMBIGUOUS, "CX881" }, |
315 | { V4L2_IDENT_AMBIGUOUS, "CX883" }, | 315 | { V4L2_IDENT_AMBIGUOUS, "CX883" }, |
316 | { V4L2_IDENT_AMBIGUOUS, "CX882" }, | 316 | { V4L2_IDENT_AMBIGUOUS, "CX882" }, |
317 | { V4L2_IDENT_AMBIGUOUS, "CX25840" }, | 317 | { V4L2_IDENT_AMBIGUOUS, "CX25840" }, |
318 | /* 35-39 */ | 318 | /* 35-39 */ |
319 | { V4L2_IDENT_AMBIGUOUS, "CX25841" }, | 319 | { V4L2_IDENT_AMBIGUOUS, "CX25841" }, |
320 | { V4L2_IDENT_AMBIGUOUS, "CX25842" }, | 320 | { V4L2_IDENT_AMBIGUOUS, "CX25842" }, |
321 | { V4L2_IDENT_AMBIGUOUS, "CX25843" }, | 321 | { V4L2_IDENT_AMBIGUOUS, "CX25843" }, |
322 | { V4L2_IDENT_AMBIGUOUS, "CX23418" }, | 322 | { V4L2_IDENT_AMBIGUOUS, "CX23418" }, |
323 | { V4L2_IDENT_AMBIGUOUS, "CX23885" }, | 323 | { V4L2_IDENT_AMBIGUOUS, "CX23885" }, |
324 | /* 40-44 */ | 324 | /* 40-44 */ |
325 | { V4L2_IDENT_AMBIGUOUS, "CX23888" }, | 325 | { V4L2_IDENT_AMBIGUOUS, "CX23888" }, |
326 | { V4L2_IDENT_AMBIGUOUS, "SAA7131" }, | 326 | { V4L2_IDENT_AMBIGUOUS, "SAA7131" }, |
327 | { V4L2_IDENT_AMBIGUOUS, "CX23887" }, | 327 | { V4L2_IDENT_AMBIGUOUS, "CX23887" }, |
328 | { V4L2_IDENT_AMBIGUOUS, "SAA7164" }, | 328 | { V4L2_IDENT_AMBIGUOUS, "SAA7164" }, |
329 | { V4L2_IDENT_AMBIGUOUS, "AU8522" }, | 329 | { V4L2_IDENT_AMBIGUOUS, "AU8522" }, |
330 | }; | 330 | }; |
331 | 331 | ||
332 | /* This list is supplied by Hauppauge. Thanks! */ | 332 | /* This list is supplied by Hauppauge. Thanks! */ |
333 | static const char *decoderIC[] = { | 333 | static const char *decoderIC[] = { |
334 | /* 0-4 */ | 334 | /* 0-4 */ |
335 | "None", "BT815", "BT817", "BT819", "BT815A", | 335 | "None", "BT815", "BT817", "BT819", "BT815A", |
336 | /* 5-9 */ | 336 | /* 5-9 */ |
337 | "BT817A", "BT819A", "BT827", "BT829", "BT848", | 337 | "BT817A", "BT819A", "BT827", "BT829", "BT848", |
338 | /* 10-14 */ | 338 | /* 10-14 */ |
339 | "BT848A", "BT849A", "BT829A", "BT827A", "BT878", | 339 | "BT848A", "BT849A", "BT829A", "BT827A", "BT878", |
340 | /* 15-19 */ | 340 | /* 15-19 */ |
341 | "BT879", "BT880", "VPX3226E", "SAA7114", "SAA7115", | 341 | "BT879", "BT880", "VPX3226E", "SAA7114", "SAA7115", |
342 | /* 20-24 */ | 342 | /* 20-24 */ |
343 | "CX880", "CX881", "CX883", "SAA7111", "SAA7113", | 343 | "CX880", "CX881", "CX883", "SAA7111", "SAA7113", |
344 | /* 25-29 */ | 344 | /* 25-29 */ |
345 | "CX882", "TVP5150A", "CX25840", "CX25841", "CX25842", | 345 | "CX882", "TVP5150A", "CX25840", "CX25841", "CX25842", |
346 | /* 30-34 */ | 346 | /* 30-34 */ |
347 | "CX25843", "CX23418", "NEC61153", "CX23885", "CX23888", | 347 | "CX25843", "CX23418", "NEC61153", "CX23885", "CX23888", |
348 | /* 35-39 */ | 348 | /* 35-39 */ |
349 | "SAA7131", "CX25837", "CX23887", "CX23885A", "CX23887A", | 349 | "SAA7131", "CX25837", "CX23887", "CX23885A", "CX23887A", |
350 | /* 40-42 */ | 350 | /* 40-42 */ |
351 | "SAA7164", "CX23885B", "AU8522" | 351 | "SAA7164", "CX23885B", "AU8522" |
352 | }; | 352 | }; |
353 | 353 | ||
354 | static int hasRadioTuner(int tunerType) | 354 | static int hasRadioTuner(int tunerType) |
355 | { | 355 | { |
356 | switch (tunerType) { | 356 | switch (tunerType) { |
357 | case 18: /* PNPEnv_TUNER_FR1236_MK2 */ | 357 | case 18: /* PNPEnv_TUNER_FR1236_MK2 */ |
358 | case 23: /* PNPEnv_TUNER_FM1236 */ | 358 | case 23: /* PNPEnv_TUNER_FM1236 */ |
359 | case 38: /* PNPEnv_TUNER_FMR1236 */ | 359 | case 38: /* PNPEnv_TUNER_FMR1236 */ |
360 | case 16: /* PNPEnv_TUNER_FR1216_MK2 */ | 360 | case 16: /* PNPEnv_TUNER_FR1216_MK2 */ |
361 | case 19: /* PNPEnv_TUNER_FR1246_MK2 */ | 361 | case 19: /* PNPEnv_TUNER_FR1246_MK2 */ |
362 | case 21: /* PNPEnv_TUNER_FM1216 */ | 362 | case 21: /* PNPEnv_TUNER_FM1216 */ |
363 | case 24: /* PNPEnv_TUNER_FM1246 */ | 363 | case 24: /* PNPEnv_TUNER_FM1246 */ |
364 | case 17: /* PNPEnv_TUNER_FR1216MF_MK2 */ | 364 | case 17: /* PNPEnv_TUNER_FR1216MF_MK2 */ |
365 | case 22: /* PNPEnv_TUNER_FM1216MF */ | 365 | case 22: /* PNPEnv_TUNER_FM1216MF */ |
366 | case 20: /* PNPEnv_TUNER_FR1256_MK2 */ | 366 | case 20: /* PNPEnv_TUNER_FR1256_MK2 */ |
367 | case 25: /* PNPEnv_TUNER_FM1256 */ | 367 | case 25: /* PNPEnv_TUNER_FM1256 */ |
368 | case 33: /* PNPEnv_TUNER_4039FR5 */ | 368 | case 33: /* PNPEnv_TUNER_4039FR5 */ |
369 | case 42: /* PNPEnv_TUNER_4009FR5 */ | 369 | case 42: /* PNPEnv_TUNER_4009FR5 */ |
370 | case 52: /* PNPEnv_TUNER_4049FM5 */ | 370 | case 52: /* PNPEnv_TUNER_4049FM5 */ |
371 | case 54: /* PNPEnv_TUNER_4049FM5_AltI2C */ | 371 | case 54: /* PNPEnv_TUNER_4049FM5_AltI2C */ |
372 | case 44: /* PNPEnv_TUNER_4009FN5 */ | 372 | case 44: /* PNPEnv_TUNER_4009FN5 */ |
373 | case 31: /* PNPEnv_TUNER_TCPB9085P */ | 373 | case 31: /* PNPEnv_TUNER_TCPB9085P */ |
374 | case 30: /* PNPEnv_TUNER_TCPN9085D */ | 374 | case 30: /* PNPEnv_TUNER_TCPN9085D */ |
375 | case 46: /* PNPEnv_TUNER_TP18NSR01F */ | 375 | case 46: /* PNPEnv_TUNER_TP18NSR01F */ |
376 | case 47: /* PNPEnv_TUNER_TP18PSB01D */ | 376 | case 47: /* PNPEnv_TUNER_TP18PSB01D */ |
377 | case 49: /* PNPEnv_TUNER_TAPC_I001D */ | 377 | case 49: /* PNPEnv_TUNER_TAPC_I001D */ |
378 | case 60: /* PNPEnv_TUNER_TAPE_S001D_MK3 */ | 378 | case 60: /* PNPEnv_TUNER_TAPE_S001D_MK3 */ |
379 | case 57: /* PNPEnv_TUNER_FM1216ME_MK3 */ | 379 | case 57: /* PNPEnv_TUNER_FM1216ME_MK3 */ |
380 | case 59: /* PNPEnv_TUNER_FM1216MP_MK3 */ | 380 | case 59: /* PNPEnv_TUNER_FM1216MP_MK3 */ |
381 | case 58: /* PNPEnv_TUNER_FM1236_MK3 */ | 381 | case 58: /* PNPEnv_TUNER_FM1236_MK3 */ |
382 | case 68: /* PNPEnv_TUNER_TAPE_H001F_MK3 */ | 382 | case 68: /* PNPEnv_TUNER_TAPE_H001F_MK3 */ |
383 | case 61: /* PNPEnv_TUNER_TAPE_M001D_MK3 */ | 383 | case 61: /* PNPEnv_TUNER_TAPE_M001D_MK3 */ |
384 | case 78: /* PNPEnv_TUNER_TDA8275C1_8290_FM */ | 384 | case 78: /* PNPEnv_TUNER_TDA8275C1_8290_FM */ |
385 | case 89: /* PNPEnv_TUNER_TCL_MFPE05_2 */ | 385 | case 89: /* PNPEnv_TUNER_TCL_MFPE05_2 */ |
386 | case 92: /* PNPEnv_TUNER_PHILIPS_FQ1236A_MK4 */ | 386 | case 92: /* PNPEnv_TUNER_PHILIPS_FQ1236A_MK4 */ |
387 | case 105: | 387 | case 105: |
388 | return 1; | 388 | return 1; |
389 | } | 389 | } |
390 | return 0; | 390 | return 0; |
391 | } | 391 | } |
392 | 392 | ||
393 | void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | 393 | void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, |
394 | unsigned char *eeprom_data) | 394 | unsigned char *eeprom_data) |
395 | { | 395 | { |
396 | /* ---------------------------------------------- | 396 | /* ---------------------------------------------- |
397 | ** The hauppauge eeprom format is tagged | 397 | ** The hauppauge eeprom format is tagged |
398 | ** | 398 | ** |
399 | ** if packet[0] == 0x84, then packet[0..1] == length | 399 | ** if packet[0] == 0x84, then packet[0..1] == length |
400 | ** else length = packet[0] & 3f; | 400 | ** else length = packet[0] & 3f; |
401 | ** if packet[0] & f8 == f8, then EOD and packet[1] == checksum | 401 | ** if packet[0] & f8 == f8, then EOD and packet[1] == checksum |
402 | ** | 402 | ** |
403 | ** In our (ivtv) case we're interested in the following: | 403 | ** In our (ivtv) case we're interested in the following: |
404 | ** tuner type: tag [00].05 or [0a].01 (index into hauppauge_tuner) | 404 | ** tuner type: tag [00].05 or [0a].01 (index into hauppauge_tuner) |
405 | ** tuner fmts: tag [00].04 or [0a].00 (bitmask index into | 405 | ** tuner fmts: tag [00].04 or [0a].00 (bitmask index into |
406 | ** hauppauge_tuner_fmt) | 406 | ** hauppauge_tuner_fmt) |
407 | ** radio: tag [00].{last} or [0e].00 (bitmask. bit2=FM) | 407 | ** radio: tag [00].{last} or [0e].00 (bitmask. bit2=FM) |
408 | ** audio proc: tag [02].01 or [05].00 (mask with 0x7f) | 408 | ** audio proc: tag [02].01 or [05].00 (mask with 0x7f) |
409 | ** decoder proc: tag [09].01) | 409 | ** decoder proc: tag [09].01) |
410 | 410 | ||
411 | ** Fun info: | 411 | ** Fun info: |
412 | ** model: tag [00].07-08 or [06].00-01 | 412 | ** model: tag [00].07-08 or [06].00-01 |
413 | ** revision: tag [00].09-0b or [06].04-06 | 413 | ** revision: tag [00].09-0b or [06].04-06 |
414 | ** serial#: tag [01].05-07 or [04].04-06 | 414 | ** serial#: tag [01].05-07 or [04].04-06 |
415 | 415 | ||
416 | ** # of inputs/outputs ??? | 416 | ** # of inputs/outputs ??? |
417 | */ | 417 | */ |
418 | 418 | ||
419 | int i, j, len, done, beenhere, tag, start; | 419 | int i, j, len, done, beenhere, tag, start; |
420 | 420 | ||
421 | int tuner1 = 0, t_format1 = 0, audioic = -1; | 421 | int tuner1 = 0, t_format1 = 0, audioic = -1; |
422 | char *t_name1 = NULL; | 422 | char *t_name1 = NULL; |
423 | const char *t_fmt_name1[8] = { " none", "", "", "", "", "", "", "" }; | 423 | const char *t_fmt_name1[8] = { " none", "", "", "", "", "", "", "" }; |
424 | 424 | ||
425 | int tuner2 = 0, t_format2 = 0; | 425 | int tuner2 = 0, t_format2 = 0; |
426 | char *t_name2 = NULL; | 426 | char *t_name2 = NULL; |
427 | const char *t_fmt_name2[8] = { " none", "", "", "", "", "", "", "" }; | 427 | const char *t_fmt_name2[8] = { " none", "", "", "", "", "", "", "" }; |
428 | 428 | ||
429 | memset(tvee, 0, sizeof(*tvee)); | 429 | memset(tvee, 0, sizeof(*tvee)); |
430 | done = len = beenhere = 0; | 430 | done = len = beenhere = 0; |
431 | 431 | ||
432 | /* Different eeprom start offsets for em28xx, cx2388x and cx23418 */ | 432 | /* Different eeprom start offsets for em28xx, cx2388x and cx23418 */ |
433 | if (eeprom_data[0] == 0x1a && | 433 | if (eeprom_data[0] == 0x1a && |
434 | eeprom_data[1] == 0xeb && | 434 | eeprom_data[1] == 0xeb && |
435 | eeprom_data[2] == 0x67 && | 435 | eeprom_data[2] == 0x67 && |
436 | eeprom_data[3] == 0x95) | 436 | eeprom_data[3] == 0x95) |
437 | start = 0xa0; /* Generic em28xx offset */ | 437 | start = 0xa0; /* Generic em28xx offset */ |
438 | else if ((eeprom_data[0] & 0xe1) == 0x01 && | 438 | else if ((eeprom_data[0] & 0xe1) == 0x01 && |
439 | eeprom_data[1] == 0x00 && | 439 | eeprom_data[1] == 0x00 && |
440 | eeprom_data[2] == 0x00 && | 440 | eeprom_data[2] == 0x00 && |
441 | eeprom_data[8] == 0x84) | 441 | eeprom_data[8] == 0x84) |
442 | start = 8; /* Generic cx2388x offset */ | 442 | start = 8; /* Generic cx2388x offset */ |
443 | else if (eeprom_data[1] == 0x70 && | 443 | else if (eeprom_data[1] == 0x70 && |
444 | eeprom_data[2] == 0x00 && | 444 | eeprom_data[2] == 0x00 && |
445 | eeprom_data[4] == 0x74 && | 445 | eeprom_data[4] == 0x74 && |
446 | eeprom_data[8] == 0x84) | 446 | eeprom_data[8] == 0x84) |
447 | start = 8; /* Generic cx23418 offset (models 74xxx) */ | 447 | start = 8; /* Generic cx23418 offset (models 74xxx) */ |
448 | else | 448 | else |
449 | start = 0; | 449 | start = 0; |
450 | 450 | ||
451 | for (i = start; !done && i < 256; i += len) { | 451 | for (i = start; !done && i < 256; i += len) { |
452 | if (eeprom_data[i] == 0x84) { | 452 | if (eeprom_data[i] == 0x84) { |
453 | len = eeprom_data[i + 1] + (eeprom_data[i + 2] << 8); | 453 | len = eeprom_data[i + 1] + (eeprom_data[i + 2] << 8); |
454 | i += 3; | 454 | i += 3; |
455 | } else if ((eeprom_data[i] & 0xf0) == 0x70) { | 455 | } else if ((eeprom_data[i] & 0xf0) == 0x70) { |
456 | if (eeprom_data[i] & 0x08) { | 456 | if (eeprom_data[i] & 0x08) { |
457 | /* verify checksum! */ | 457 | /* verify checksum! */ |
458 | done = 1; | 458 | done = 1; |
459 | break; | 459 | break; |
460 | } | 460 | } |
461 | len = eeprom_data[i] & 0x07; | 461 | len = eeprom_data[i] & 0x07; |
462 | ++i; | 462 | ++i; |
463 | } else { | 463 | } else { |
464 | tveeprom_warn("Encountered bad packet header [%02x]. " | 464 | tveeprom_warn("Encountered bad packet header [%02x]. " |
465 | "Corrupt or not a Hauppauge eeprom.\n", | 465 | "Corrupt or not a Hauppauge eeprom.\n", |
466 | eeprom_data[i]); | 466 | eeprom_data[i]); |
467 | return; | 467 | return; |
468 | } | 468 | } |
469 | 469 | ||
470 | if (debug) { | 470 | if (debug) { |
471 | tveeprom_info("Tag [%02x] + %d bytes:", | 471 | tveeprom_info("Tag [%02x] + %d bytes:", |
472 | eeprom_data[i], len - 1); | 472 | eeprom_data[i], len - 1); |
473 | for (j = 1; j < len; j++) | 473 | for (j = 1; j < len; j++) |
474 | printk(KERN_CONT " %02x", eeprom_data[i + j]); | 474 | printk(KERN_CONT " %02x", eeprom_data[i + j]); |
475 | printk(KERN_CONT "\n"); | 475 | printk(KERN_CONT "\n"); |
476 | } | 476 | } |
477 | 477 | ||
478 | /* process by tag */ | 478 | /* process by tag */ |
479 | tag = eeprom_data[i]; | 479 | tag = eeprom_data[i]; |
480 | switch (tag) { | 480 | switch (tag) { |
481 | case 0x00: | 481 | case 0x00: |
482 | /* tag: 'Comprehensive' */ | 482 | /* tag: 'Comprehensive' */ |
483 | tuner1 = eeprom_data[i+6]; | 483 | tuner1 = eeprom_data[i+6]; |
484 | t_format1 = eeprom_data[i+5]; | 484 | t_format1 = eeprom_data[i+5]; |
485 | tvee->has_radio = eeprom_data[i+len-1]; | 485 | tvee->has_radio = eeprom_data[i+len-1]; |
486 | /* old style tag, don't know how to detect | 486 | /* old style tag, don't know how to detect |
487 | IR presence, mark as unknown. */ | 487 | IR presence, mark as unknown. */ |
488 | tvee->has_ir = 0; | 488 | tvee->has_ir = 0; |
489 | tvee->model = | 489 | tvee->model = |
490 | eeprom_data[i+8] + | 490 | eeprom_data[i+8] + |
491 | (eeprom_data[i+9] << 8); | 491 | (eeprom_data[i+9] << 8); |
492 | tvee->revision = eeprom_data[i+10] + | 492 | tvee->revision = eeprom_data[i+10] + |
493 | (eeprom_data[i+11] << 8) + | 493 | (eeprom_data[i+11] << 8) + |
494 | (eeprom_data[i+12] << 16); | 494 | (eeprom_data[i+12] << 16); |
495 | break; | 495 | break; |
496 | 496 | ||
497 | case 0x01: | 497 | case 0x01: |
498 | /* tag: 'SerialID' */ | 498 | /* tag: 'SerialID' */ |
499 | tvee->serial_number = | 499 | tvee->serial_number = |
500 | eeprom_data[i+6] + | 500 | eeprom_data[i+6] + |
501 | (eeprom_data[i+7] << 8) + | 501 | (eeprom_data[i+7] << 8) + |
502 | (eeprom_data[i+8] << 16); | 502 | (eeprom_data[i+8] << 16); |
503 | break; | 503 | break; |
504 | 504 | ||
505 | case 0x02: | 505 | case 0x02: |
506 | /* tag 'AudioInfo' | 506 | /* tag 'AudioInfo' |
507 | Note mask with 0x7F, high bit used on some older models | 507 | Note mask with 0x7F, high bit used on some older models |
508 | to indicate 4052 mux was removed in favor of using MSP | 508 | to indicate 4052 mux was removed in favor of using MSP |
509 | inputs directly. */ | 509 | inputs directly. */ |
510 | audioic = eeprom_data[i+2] & 0x7f; | 510 | audioic = eeprom_data[i+2] & 0x7f; |
511 | if (audioic < ARRAY_SIZE(audioIC)) | 511 | if (audioic < ARRAY_SIZE(audioIC)) |
512 | tvee->audio_processor = audioIC[audioic].id; | 512 | tvee->audio_processor = audioIC[audioic].id; |
513 | else | 513 | else |
514 | tvee->audio_processor = V4L2_IDENT_UNKNOWN; | 514 | tvee->audio_processor = V4L2_IDENT_UNKNOWN; |
515 | break; | 515 | break; |
516 | 516 | ||
517 | /* case 0x03: tag 'EEInfo' */ | 517 | /* case 0x03: tag 'EEInfo' */ |
518 | 518 | ||
519 | case 0x04: | 519 | case 0x04: |
520 | /* tag 'SerialID2' */ | 520 | /* tag 'SerialID2' */ |
521 | tvee->serial_number = | 521 | tvee->serial_number = |
522 | eeprom_data[i+5] + | 522 | eeprom_data[i+5] + |
523 | (eeprom_data[i+6] << 8) + | 523 | (eeprom_data[i+6] << 8) + |
524 | (eeprom_data[i+7] << 16); | 524 | (eeprom_data[i+7] << 16); |
525 | 525 | ||
526 | if ((eeprom_data[i + 8] & 0xf0) && | 526 | if ((eeprom_data[i + 8] & 0xf0) && |
527 | (tvee->serial_number < 0xffffff)) { | 527 | (tvee->serial_number < 0xffffff)) { |
528 | tvee->MAC_address[0] = 0x00; | 528 | tvee->MAC_address[0] = 0x00; |
529 | tvee->MAC_address[1] = 0x0D; | 529 | tvee->MAC_address[1] = 0x0D; |
530 | tvee->MAC_address[2] = 0xFE; | 530 | tvee->MAC_address[2] = 0xFE; |
531 | tvee->MAC_address[3] = eeprom_data[i + 7]; | 531 | tvee->MAC_address[3] = eeprom_data[i + 7]; |
532 | tvee->MAC_address[4] = eeprom_data[i + 6]; | 532 | tvee->MAC_address[4] = eeprom_data[i + 6]; |
533 | tvee->MAC_address[5] = eeprom_data[i + 5]; | 533 | tvee->MAC_address[5] = eeprom_data[i + 5]; |
534 | tvee->has_MAC_address = 1; | 534 | tvee->has_MAC_address = 1; |
535 | } | 535 | } |
536 | break; | 536 | break; |
537 | 537 | ||
538 | case 0x05: | 538 | case 0x05: |
539 | /* tag 'Audio2' | 539 | /* tag 'Audio2' |
540 | Note mask with 0x7F, high bit used on some older models | 540 | Note mask with 0x7F, high bit used on some older models |
541 | to indicate 4052 mux was removed in favor of using MSP | 541 | to indicate 4052 mux was removed in favor of using MSP |
542 | inputs directly. */ | 542 | inputs directly. */ |
543 | audioic = eeprom_data[i+1] & 0x7f; | 543 | audioic = eeprom_data[i+1] & 0x7f; |
544 | if (audioic < ARRAY_SIZE(audioIC)) | 544 | if (audioic < ARRAY_SIZE(audioIC)) |
545 | tvee->audio_processor = audioIC[audioic].id; | 545 | tvee->audio_processor = audioIC[audioic].id; |
546 | else | 546 | else |
547 | tvee->audio_processor = V4L2_IDENT_UNKNOWN; | 547 | tvee->audio_processor = V4L2_IDENT_UNKNOWN; |
548 | 548 | ||
549 | break; | 549 | break; |
550 | 550 | ||
551 | case 0x06: | 551 | case 0x06: |
552 | /* tag 'ModelRev' */ | 552 | /* tag 'ModelRev' */ |
553 | tvee->model = | 553 | tvee->model = |
554 | eeprom_data[i + 1] + | 554 | eeprom_data[i + 1] + |
555 | (eeprom_data[i + 2] << 8) + | 555 | (eeprom_data[i + 2] << 8) + |
556 | (eeprom_data[i + 3] << 16) + | 556 | (eeprom_data[i + 3] << 16) + |
557 | (eeprom_data[i + 4] << 24); | 557 | (eeprom_data[i + 4] << 24); |
558 | tvee->revision = | 558 | tvee->revision = |
559 | eeprom_data[i + 5] + | 559 | eeprom_data[i + 5] + |
560 | (eeprom_data[i + 6] << 8) + | 560 | (eeprom_data[i + 6] << 8) + |
561 | (eeprom_data[i + 7] << 16); | 561 | (eeprom_data[i + 7] << 16); |
562 | break; | 562 | break; |
563 | 563 | ||
564 | case 0x07: | 564 | case 0x07: |
565 | /* tag 'Details': according to Hauppauge not interesting | 565 | /* tag 'Details': according to Hauppauge not interesting |
566 | on any PCI-era or later boards. */ | 566 | on any PCI-era or later boards. */ |
567 | break; | 567 | break; |
568 | 568 | ||
569 | /* there is no tag 0x08 defined */ | 569 | /* there is no tag 0x08 defined */ |
570 | 570 | ||
571 | case 0x09: | 571 | case 0x09: |
572 | /* tag 'Video' */ | 572 | /* tag 'Video' */ |
573 | tvee->decoder_processor = eeprom_data[i + 1]; | 573 | tvee->decoder_processor = eeprom_data[i + 1]; |
574 | break; | 574 | break; |
575 | 575 | ||
576 | case 0x0a: | 576 | case 0x0a: |
577 | /* tag 'Tuner' */ | 577 | /* tag 'Tuner' */ |
578 | if (beenhere == 0) { | 578 | if (beenhere == 0) { |
579 | tuner1 = eeprom_data[i + 2]; | 579 | tuner1 = eeprom_data[i + 2]; |
580 | t_format1 = eeprom_data[i + 1]; | 580 | t_format1 = eeprom_data[i + 1]; |
581 | beenhere = 1; | 581 | beenhere = 1; |
582 | } else { | 582 | } else { |
583 | /* a second (radio) tuner may be present */ | 583 | /* a second (radio) tuner may be present */ |
584 | tuner2 = eeprom_data[i + 2]; | 584 | tuner2 = eeprom_data[i + 2]; |
585 | t_format2 = eeprom_data[i + 1]; | 585 | t_format2 = eeprom_data[i + 1]; |
586 | /* not a TV tuner? */ | 586 | /* not a TV tuner? */ |
587 | if (t_format2 == 0) | 587 | if (t_format2 == 0) |
588 | tvee->has_radio = 1; /* must be radio */ | 588 | tvee->has_radio = 1; /* must be radio */ |
589 | } | 589 | } |
590 | break; | 590 | break; |
591 | 591 | ||
592 | case 0x0b: | 592 | case 0x0b: |
593 | /* tag 'Inputs': according to Hauppauge this is specific | 593 | /* tag 'Inputs': according to Hauppauge this is specific |
594 | to each driver family, so no good assumptions can be | 594 | to each driver family, so no good assumptions can be |
595 | made. */ | 595 | made. */ |
596 | break; | 596 | break; |
597 | 597 | ||
598 | /* case 0x0c: tag 'Balun' */ | 598 | /* case 0x0c: tag 'Balun' */ |
599 | /* case 0x0d: tag 'Teletext' */ | 599 | /* case 0x0d: tag 'Teletext' */ |
600 | 600 | ||
601 | case 0x0e: | 601 | case 0x0e: |
602 | /* tag: 'Radio' */ | 602 | /* tag: 'Radio' */ |
603 | tvee->has_radio = eeprom_data[i+1]; | 603 | tvee->has_radio = eeprom_data[i+1]; |
604 | break; | 604 | break; |
605 | 605 | ||
606 | case 0x0f: | 606 | case 0x0f: |
607 | /* tag 'IRInfo' */ | 607 | /* tag 'IRInfo' */ |
608 | tvee->has_ir = 1 | (eeprom_data[i+1] << 1); | 608 | tvee->has_ir = 1 | (eeprom_data[i+1] << 1); |
609 | break; | 609 | break; |
610 | 610 | ||
611 | /* case 0x10: tag 'VBIInfo' */ | 611 | /* case 0x10: tag 'VBIInfo' */ |
612 | /* case 0x11: tag 'QCInfo' */ | 612 | /* case 0x11: tag 'QCInfo' */ |
613 | /* case 0x12: tag 'InfoBits' */ | 613 | /* case 0x12: tag 'InfoBits' */ |
614 | 614 | ||
615 | default: | 615 | default: |
616 | tveeprom_dbg("Not sure what to do with tag [%02x]\n", | 616 | tveeprom_dbg("Not sure what to do with tag [%02x]\n", |
617 | tag); | 617 | tag); |
618 | /* dump the rest of the packet? */ | 618 | /* dump the rest of the packet? */ |
619 | } | 619 | } |
620 | } | 620 | } |
621 | 621 | ||
622 | if (!done) { | 622 | if (!done) { |
623 | tveeprom_warn("Ran out of data!\n"); | 623 | tveeprom_warn("Ran out of data!\n"); |
624 | return; | 624 | return; |
625 | } | 625 | } |
626 | 626 | ||
627 | if (tvee->revision != 0) { | 627 | if (tvee->revision != 0) { |
628 | tvee->rev_str[0] = 32 + ((tvee->revision >> 18) & 0x3f); | 628 | tvee->rev_str[0] = 32 + ((tvee->revision >> 18) & 0x3f); |
629 | tvee->rev_str[1] = 32 + ((tvee->revision >> 12) & 0x3f); | 629 | tvee->rev_str[1] = 32 + ((tvee->revision >> 12) & 0x3f); |
630 | tvee->rev_str[2] = 32 + ((tvee->revision >> 6) & 0x3f); | 630 | tvee->rev_str[2] = 32 + ((tvee->revision >> 6) & 0x3f); |
631 | tvee->rev_str[3] = 32 + (tvee->revision & 0x3f); | 631 | tvee->rev_str[3] = 32 + (tvee->revision & 0x3f); |
632 | tvee->rev_str[4] = 0; | 632 | tvee->rev_str[4] = 0; |
633 | } | 633 | } |
634 | 634 | ||
635 | if (hasRadioTuner(tuner1) && !tvee->has_radio) { | 635 | if (hasRadioTuner(tuner1) && !tvee->has_radio) { |
636 | tveeprom_info("The eeprom says no radio is present, but the tuner type\n"); | 636 | tveeprom_info("The eeprom says no radio is present, but the tuner type\n"); |
637 | tveeprom_info("indicates otherwise. I will assume that radio is present.\n"); | 637 | tveeprom_info("indicates otherwise. I will assume that radio is present.\n"); |
638 | tvee->has_radio = 1; | 638 | tvee->has_radio = 1; |
639 | } | 639 | } |
640 | 640 | ||
641 | if (tuner1 < sizeof(hauppauge_tuner)/sizeof(struct HAUPPAUGE_TUNER)) { | 641 | if (tuner1 < sizeof(hauppauge_tuner)/sizeof(struct HAUPPAUGE_TUNER)) { |
642 | tvee->tuner_type = hauppauge_tuner[tuner1].id; | 642 | tvee->tuner_type = hauppauge_tuner[tuner1].id; |
643 | t_name1 = hauppauge_tuner[tuner1].name; | 643 | t_name1 = hauppauge_tuner[tuner1].name; |
644 | } else { | 644 | } else { |
645 | t_name1 = "unknown"; | 645 | t_name1 = "unknown"; |
646 | } | 646 | } |
647 | 647 | ||
648 | if (tuner2 < sizeof(hauppauge_tuner)/sizeof(struct HAUPPAUGE_TUNER)) { | 648 | if (tuner2 < sizeof(hauppauge_tuner)/sizeof(struct HAUPPAUGE_TUNER)) { |
649 | tvee->tuner2_type = hauppauge_tuner[tuner2].id; | 649 | tvee->tuner2_type = hauppauge_tuner[tuner2].id; |
650 | t_name2 = hauppauge_tuner[tuner2].name; | 650 | t_name2 = hauppauge_tuner[tuner2].name; |
651 | } else { | 651 | } else { |
652 | t_name2 = "unknown"; | 652 | t_name2 = "unknown"; |
653 | } | 653 | } |
654 | 654 | ||
655 | tvee->tuner_hauppauge_model = tuner1; | 655 | tvee->tuner_hauppauge_model = tuner1; |
656 | tvee->tuner2_hauppauge_model = tuner2; | 656 | tvee->tuner2_hauppauge_model = tuner2; |
657 | tvee->tuner_formats = 0; | 657 | tvee->tuner_formats = 0; |
658 | tvee->tuner2_formats = 0; | 658 | tvee->tuner2_formats = 0; |
659 | for (i = j = 0; i < 8; i++) { | 659 | for (i = j = 0; i < 8; i++) { |
660 | if (t_format1 & (1 << i)) { | 660 | if (t_format1 & (1 << i)) { |
661 | tvee->tuner_formats |= hauppauge_tuner_fmt[i].id; | 661 | tvee->tuner_formats |= hauppauge_tuner_fmt[i].id; |
662 | t_fmt_name1[j++] = hauppauge_tuner_fmt[i].name; | 662 | t_fmt_name1[j++] = hauppauge_tuner_fmt[i].name; |
663 | } | 663 | } |
664 | } | 664 | } |
665 | for (i = j = 0; i < 8; i++) { | 665 | for (i = j = 0; i < 8; i++) { |
666 | if (t_format2 & (1 << i)) { | 666 | if (t_format2 & (1 << i)) { |
667 | tvee->tuner2_formats |= hauppauge_tuner_fmt[i].id; | 667 | tvee->tuner2_formats |= hauppauge_tuner_fmt[i].id; |
668 | t_fmt_name2[j++] = hauppauge_tuner_fmt[i].name; | 668 | t_fmt_name2[j++] = hauppauge_tuner_fmt[i].name; |
669 | } | 669 | } |
670 | } | 670 | } |
671 | 671 | ||
672 | tveeprom_info("Hauppauge model %d, rev %s, serial# %d\n", | 672 | tveeprom_info("Hauppauge model %d, rev %s, serial# %d\n", |
673 | tvee->model, tvee->rev_str, tvee->serial_number); | 673 | tvee->model, tvee->rev_str, tvee->serial_number); |
674 | if (tvee->has_MAC_address == 1) | 674 | if (tvee->has_MAC_address == 1) |
675 | tveeprom_info("MAC address is %02X-%02X-%02X-%02X-%02X-%02X\n", | 675 | tveeprom_info("MAC address is %02X-%02X-%02X-%02X-%02X-%02X\n", |
676 | tvee->MAC_address[0], tvee->MAC_address[1], | 676 | tvee->MAC_address[0], tvee->MAC_address[1], |
677 | tvee->MAC_address[2], tvee->MAC_address[3], | 677 | tvee->MAC_address[2], tvee->MAC_address[3], |
678 | tvee->MAC_address[4], tvee->MAC_address[5]); | 678 | tvee->MAC_address[4], tvee->MAC_address[5]); |
679 | tveeprom_info("tuner model is %s (idx %d, type %d)\n", | 679 | tveeprom_info("tuner model is %s (idx %d, type %d)\n", |
680 | t_name1, tuner1, tvee->tuner_type); | 680 | t_name1, tuner1, tvee->tuner_type); |
681 | tveeprom_info("TV standards%s%s%s%s%s%s%s%s (eeprom 0x%02x)\n", | 681 | tveeprom_info("TV standards%s%s%s%s%s%s%s%s (eeprom 0x%02x)\n", |
682 | t_fmt_name1[0], t_fmt_name1[1], t_fmt_name1[2], | 682 | t_fmt_name1[0], t_fmt_name1[1], t_fmt_name1[2], |
683 | t_fmt_name1[3], t_fmt_name1[4], t_fmt_name1[5], | 683 | t_fmt_name1[3], t_fmt_name1[4], t_fmt_name1[5], |
684 | t_fmt_name1[6], t_fmt_name1[7], t_format1); | 684 | t_fmt_name1[6], t_fmt_name1[7], t_format1); |
685 | if (tuner2) | 685 | if (tuner2) |
686 | tveeprom_info("second tuner model is %s (idx %d, type %d)\n", | 686 | tveeprom_info("second tuner model is %s (idx %d, type %d)\n", |
687 | t_name2, tuner2, tvee->tuner2_type); | 687 | t_name2, tuner2, tvee->tuner2_type); |
688 | if (t_format2) | 688 | if (t_format2) |
689 | tveeprom_info("TV standards%s%s%s%s%s%s%s%s (eeprom 0x%02x)\n", | 689 | tveeprom_info("TV standards%s%s%s%s%s%s%s%s (eeprom 0x%02x)\n", |
690 | t_fmt_name2[0], t_fmt_name2[1], t_fmt_name2[2], | 690 | t_fmt_name2[0], t_fmt_name2[1], t_fmt_name2[2], |
691 | t_fmt_name2[3], t_fmt_name2[4], t_fmt_name2[5], | 691 | t_fmt_name2[3], t_fmt_name2[4], t_fmt_name2[5], |
692 | t_fmt_name2[6], t_fmt_name2[7], t_format2); | 692 | t_fmt_name2[6], t_fmt_name2[7], t_format2); |
693 | if (audioic < 0) { | 693 | if (audioic < 0) { |
694 | tveeprom_info("audio processor is unknown (no idx)\n"); | 694 | tveeprom_info("audio processor is unknown (no idx)\n"); |
695 | tvee->audio_processor = V4L2_IDENT_UNKNOWN; | 695 | tvee->audio_processor = V4L2_IDENT_UNKNOWN; |
696 | } else { | 696 | } else { |
697 | if (audioic < ARRAY_SIZE(audioIC)) | 697 | if (audioic < ARRAY_SIZE(audioIC)) |
698 | tveeprom_info("audio processor is %s (idx %d)\n", | 698 | tveeprom_info("audio processor is %s (idx %d)\n", |
699 | audioIC[audioic].name, audioic); | 699 | audioIC[audioic].name, audioic); |
700 | else | 700 | else |
701 | tveeprom_info("audio processor is unknown (idx %d)\n", | 701 | tveeprom_info("audio processor is unknown (idx %d)\n", |
702 | audioic); | 702 | audioic); |
703 | } | 703 | } |
704 | if (tvee->decoder_processor) | 704 | if (tvee->decoder_processor) |
705 | tveeprom_info("decoder processor is %s (idx %d)\n", | 705 | tveeprom_info("decoder processor is %s (idx %d)\n", |
706 | STRM(decoderIC, tvee->decoder_processor), | 706 | STRM(decoderIC, tvee->decoder_processor), |
707 | tvee->decoder_processor); | 707 | tvee->decoder_processor); |
708 | if (tvee->has_ir) | 708 | if (tvee->has_ir) |
709 | tveeprom_info("has %sradio, has %sIR receiver, has %sIR transmitter\n", | 709 | tveeprom_info("has %sradio, has %sIR receiver, has %sIR transmitter\n", |
710 | tvee->has_radio ? "" : "no ", | 710 | tvee->has_radio ? "" : "no ", |
711 | (tvee->has_ir & 2) ? "" : "no ", | 711 | (tvee->has_ir & 2) ? "" : "no ", |
712 | (tvee->has_ir & 4) ? "" : "no "); | 712 | (tvee->has_ir & 4) ? "" : "no "); |
713 | else | 713 | else |
714 | tveeprom_info("has %sradio\n", | 714 | tveeprom_info("has %sradio\n", |
715 | tvee->has_radio ? "" : "no "); | 715 | tvee->has_radio ? "" : "no "); |
716 | } | 716 | } |
717 | EXPORT_SYMBOL(tveeprom_hauppauge_analog); | 717 | EXPORT_SYMBOL(tveeprom_hauppauge_analog); |
718 | 718 | ||
719 | /* ----------------------------------------------------------------------- */ | 719 | /* ----------------------------------------------------------------------- */ |
720 | /* generic helper functions */ | 720 | /* generic helper functions */ |
721 | 721 | ||
722 | int tveeprom_read(struct i2c_client *c, unsigned char *eedata, int len) | 722 | int tveeprom_read(struct i2c_client *c, unsigned char *eedata, int len) |
723 | { | 723 | { |
724 | unsigned char buf; | 724 | unsigned char buf; |
725 | int err; | 725 | int err; |
726 | 726 | ||
727 | buf = 0; | 727 | buf = 0; |
728 | err = i2c_master_send(c, &buf, 1); | 728 | err = i2c_master_send(c, &buf, 1); |
729 | if (err != 1) { | 729 | if (err != 1) { |
730 | tveeprom_info("Huh, no eeprom present (err=%d)?\n", err); | 730 | tveeprom_info("Huh, no eeprom present (err=%d)?\n", err); |
731 | return -1; | 731 | return -1; |
732 | } | 732 | } |
733 | err = i2c_master_recv(c, eedata, len); | 733 | err = i2c_master_recv(c, eedata, len); |
734 | if (err != len) { | 734 | if (err != len) { |
735 | tveeprom_warn("i2c eeprom read error (err=%d)\n", err); | 735 | tveeprom_warn("i2c eeprom read error (err=%d)\n", err); |
736 | return -1; | 736 | return -1; |
737 | } | 737 | } |
738 | if (debug) { | 738 | if (debug) { |
739 | int i; | 739 | int i; |
740 | 740 | ||
741 | tveeprom_info("full 256-byte eeprom dump:\n"); | 741 | tveeprom_info("full 256-byte eeprom dump:\n"); |
742 | for (i = 0; i < len; i++) { | 742 | for (i = 0; i < len; i++) { |
743 | if (0 == (i % 16)) | 743 | if (0 == (i % 16)) |
744 | tveeprom_info("%02x:", i); | 744 | tveeprom_info("%02x:", i); |
745 | printk(KERN_CONT " %02x", eedata[i]); | 745 | printk(KERN_CONT " %02x", eedata[i]); |
746 | if (15 == (i % 16)) | 746 | if (15 == (i % 16)) |
747 | printk(KERN_CONT "\n"); | 747 | printk(KERN_CONT "\n"); |
748 | } | 748 | } |
749 | } | 749 | } |
750 | return 0; | 750 | return 0; |
751 | } | 751 | } |
752 | EXPORT_SYMBOL(tveeprom_read); | 752 | EXPORT_SYMBOL(tveeprom_read); |
753 | 753 | ||
754 | /* | 754 | /* |
755 | * Local variables: | 755 | * Local variables: |
756 | * c-basic-offset: 8 | 756 | * c-basic-offset: 8 |
757 | * End: | 757 | * End: |
758 | */ | 758 | */ |
759 | 759 |
include/media/tuner.h
1 | /* | 1 | /* |
2 | tuner.h - definition for different tuners | 2 | tuner.h - definition for different tuners |
3 | 3 | ||
4 | Copyright (C) 1997 Markus Schroeder (schroedm@uni-duesseldorf.de) | 4 | Copyright (C) 1997 Markus Schroeder (schroedm@uni-duesseldorf.de) |
5 | minor modifications by Ralph Metzler (rjkm@thp.uni-koeln.de) | 5 | minor modifications by Ralph Metzler (rjkm@thp.uni-koeln.de) |
6 | 6 | ||
7 | This program is free software; you can redistribute it and/or modify | 7 | This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by | 8 | it under the terms of the GNU General Public License as published by |
9 | the Free Software Foundation; either version 2 of the License, or | 9 | the Free Software Foundation; either version 2 of the License, or |
10 | (at your option) any later version. | 10 | (at your option) any later version. |
11 | 11 | ||
12 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. |
16 | 16 | ||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License |
18 | along with this program; if not, write to the Free Software | 18 | along with this program; if not, write to the Free Software |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #ifndef _TUNER_H | 22 | #ifndef _TUNER_H |
23 | #define _TUNER_H | 23 | #define _TUNER_H |
24 | 24 | ||
25 | #include <linux/videodev2.h> | 25 | #include <linux/videodev2.h> |
26 | 26 | ||
27 | #define ADDR_UNSET (255) | 27 | #define ADDR_UNSET (255) |
28 | 28 | ||
29 | #define TUNER_TEMIC_PAL 0 /* 4002 FH5 (3X 7756, 9483) */ | 29 | #define TUNER_TEMIC_PAL 0 /* 4002 FH5 (3X 7756, 9483) */ |
30 | #define TUNER_PHILIPS_PAL_I 1 | 30 | #define TUNER_PHILIPS_PAL_I 1 |
31 | #define TUNER_PHILIPS_NTSC 2 | 31 | #define TUNER_PHILIPS_NTSC 2 |
32 | #define TUNER_PHILIPS_SECAM 3 /* you must actively select B/G, L, L` */ | 32 | #define TUNER_PHILIPS_SECAM 3 /* you must actively select B/G, L, L` */ |
33 | 33 | ||
34 | #define TUNER_ABSENT 4 | 34 | #define TUNER_ABSENT 4 |
35 | #define TUNER_PHILIPS_PAL 5 | 35 | #define TUNER_PHILIPS_PAL 5 |
36 | #define TUNER_TEMIC_NTSC 6 /* 4032 FY5 (3X 7004, 9498, 9789) */ | 36 | #define TUNER_TEMIC_NTSC 6 /* 4032 FY5 (3X 7004, 9498, 9789) */ |
37 | #define TUNER_TEMIC_PAL_I 7 /* 4062 FY5 (3X 8501, 9957) */ | 37 | #define TUNER_TEMIC_PAL_I 7 /* 4062 FY5 (3X 8501, 9957) */ |
38 | 38 | ||
39 | #define TUNER_TEMIC_4036FY5_NTSC 8 /* 4036 FY5 (3X 1223, 1981, 7686) */ | 39 | #define TUNER_TEMIC_4036FY5_NTSC 8 /* 4036 FY5 (3X 1223, 1981, 7686) */ |
40 | #define TUNER_ALPS_TSBH1_NTSC 9 | 40 | #define TUNER_ALPS_TSBH1_NTSC 9 |
41 | #define TUNER_ALPS_TSBE1_PAL 10 | 41 | #define TUNER_ALPS_TSBE1_PAL 10 |
42 | #define TUNER_ALPS_TSBB5_PAL_I 11 | 42 | #define TUNER_ALPS_TSBB5_PAL_I 11 |
43 | 43 | ||
44 | #define TUNER_ALPS_TSBE5_PAL 12 | 44 | #define TUNER_ALPS_TSBE5_PAL 12 |
45 | #define TUNER_ALPS_TSBC5_PAL 13 | 45 | #define TUNER_ALPS_TSBC5_PAL 13 |
46 | #define TUNER_TEMIC_4006FH5_PAL 14 /* 4006 FH5 (3X 9500, 9501, 7291) */ | 46 | #define TUNER_TEMIC_4006FH5_PAL 14 /* 4006 FH5 (3X 9500, 9501, 7291) */ |
47 | #define TUNER_ALPS_TSHC6_NTSC 15 | 47 | #define TUNER_ALPS_TSHC6_NTSC 15 |
48 | 48 | ||
49 | #define TUNER_TEMIC_PAL_DK 16 /* 4016 FY5 (3X 1392, 1393) */ | 49 | #define TUNER_TEMIC_PAL_DK 16 /* 4016 FY5 (3X 1392, 1393) */ |
50 | #define TUNER_PHILIPS_NTSC_M 17 | 50 | #define TUNER_PHILIPS_NTSC_M 17 |
51 | #define TUNER_TEMIC_4066FY5_PAL_I 18 /* 4066 FY5 (3X 7032, 7035) */ | 51 | #define TUNER_TEMIC_4066FY5_PAL_I 18 /* 4066 FY5 (3X 7032, 7035) */ |
52 | #define TUNER_TEMIC_4006FN5_MULTI_PAL 19 /* B/G, I and D/K autodetected (3X 7595, 7606, 7657) */ | 52 | #define TUNER_TEMIC_4006FN5_MULTI_PAL 19 /* B/G, I and D/K autodetected (3X 7595, 7606, 7657) */ |
53 | 53 | ||
54 | #define TUNER_TEMIC_4009FR5_PAL 20 /* incl. FM radio (3X 7607, 7488, 7711) */ | 54 | #define TUNER_TEMIC_4009FR5_PAL 20 /* incl. FM radio (3X 7607, 7488, 7711) */ |
55 | #define TUNER_TEMIC_4039FR5_NTSC 21 /* incl. FM radio (3X 7246, 7578, 7732) */ | 55 | #define TUNER_TEMIC_4039FR5_NTSC 21 /* incl. FM radio (3X 7246, 7578, 7732) */ |
56 | #define TUNER_TEMIC_4046FM5 22 /* you must actively select B/G, D/K, I, L, L` ! (3X 7804, 7806, 8103, 8104) */ | 56 | #define TUNER_TEMIC_4046FM5 22 /* you must actively select B/G, D/K, I, L, L` ! (3X 7804, 7806, 8103, 8104) */ |
57 | #define TUNER_PHILIPS_PAL_DK 23 | 57 | #define TUNER_PHILIPS_PAL_DK 23 |
58 | 58 | ||
59 | #define TUNER_PHILIPS_FQ1216ME 24 /* you must actively select B/G/D/K, I, L, L` */ | 59 | #define TUNER_PHILIPS_FQ1216ME 24 /* you must actively select B/G/D/K, I, L, L` */ |
60 | #define TUNER_LG_PAL_I_FM 25 | 60 | #define TUNER_LG_PAL_I_FM 25 |
61 | #define TUNER_LG_PAL_I 26 | 61 | #define TUNER_LG_PAL_I 26 |
62 | #define TUNER_LG_NTSC_FM 27 | 62 | #define TUNER_LG_NTSC_FM 27 |
63 | 63 | ||
64 | #define TUNER_LG_PAL_FM 28 | 64 | #define TUNER_LG_PAL_FM 28 |
65 | #define TUNER_LG_PAL 29 | 65 | #define TUNER_LG_PAL 29 |
66 | #define TUNER_TEMIC_4009FN5_MULTI_PAL_FM 30 /* B/G, I and D/K autodetected (3X 8155, 8160, 8163) */ | 66 | #define TUNER_TEMIC_4009FN5_MULTI_PAL_FM 30 /* B/G, I and D/K autodetected (3X 8155, 8160, 8163) */ |
67 | #define TUNER_SHARP_2U5JF5540_NTSC 31 | 67 | #define TUNER_SHARP_2U5JF5540_NTSC 31 |
68 | 68 | ||
69 | #define TUNER_Samsung_PAL_TCPM9091PD27 32 | 69 | #define TUNER_Samsung_PAL_TCPM9091PD27 32 |
70 | #define TUNER_MT2032 33 | 70 | #define TUNER_MT2032 33 |
71 | #define TUNER_TEMIC_4106FH5 34 /* 4106 FH5 (3X 7808, 7865) */ | 71 | #define TUNER_TEMIC_4106FH5 34 /* 4106 FH5 (3X 7808, 7865) */ |
72 | #define TUNER_TEMIC_4012FY5 35 /* 4012 FY5 (3X 0971, 1099) */ | 72 | #define TUNER_TEMIC_4012FY5 35 /* 4012 FY5 (3X 0971, 1099) */ |
73 | 73 | ||
74 | #define TUNER_TEMIC_4136FY5 36 /* 4136 FY5 (3X 7708, 7746) */ | 74 | #define TUNER_TEMIC_4136FY5 36 /* 4136 FY5 (3X 7708, 7746) */ |
75 | #define TUNER_LG_PAL_NEW_TAPC 37 | 75 | #define TUNER_LG_PAL_NEW_TAPC 37 |
76 | #define TUNER_PHILIPS_FM1216ME_MK3 38 | 76 | #define TUNER_PHILIPS_FM1216ME_MK3 38 |
77 | #define TUNER_LG_NTSC_NEW_TAPC 39 | 77 | #define TUNER_LG_NTSC_NEW_TAPC 39 |
78 | 78 | ||
79 | #define TUNER_HITACHI_NTSC 40 | 79 | #define TUNER_HITACHI_NTSC 40 |
80 | #define TUNER_PHILIPS_PAL_MK 41 | 80 | #define TUNER_PHILIPS_PAL_MK 41 |
81 | #define TUNER_PHILIPS_FCV1236D 42 | 81 | #define TUNER_PHILIPS_FCV1236D 42 |
82 | #define TUNER_PHILIPS_FM1236_MK3 43 | 82 | #define TUNER_PHILIPS_FM1236_MK3 43 |
83 | 83 | ||
84 | #define TUNER_PHILIPS_4IN1 44 /* ATI TV Wonder Pro - Conexant */ | 84 | #define TUNER_PHILIPS_4IN1 44 /* ATI TV Wonder Pro - Conexant */ |
85 | /* Microtune merged with Temic 12/31/1999 partially financed by Alps - these may be similar to Temic */ | 85 | /* Microtune merged with Temic 12/31/1999 partially financed by Alps - these may be similar to Temic */ |
86 | #define TUNER_MICROTUNE_4049FM5 45 | 86 | #define TUNER_MICROTUNE_4049FM5 45 |
87 | #define TUNER_PANASONIC_VP27 46 | 87 | #define TUNER_PANASONIC_VP27 46 |
88 | #define TUNER_LG_NTSC_TAPE 47 | 88 | #define TUNER_LG_NTSC_TAPE 47 |
89 | 89 | ||
90 | #define TUNER_TNF_8831BGFF 48 | 90 | #define TUNER_TNF_8831BGFF 48 |
91 | #define TUNER_MICROTUNE_4042FI5 49 /* DViCO FusionHDTV 3 Gold-Q - 4042 FI5 (3X 8147) */ | 91 | #define TUNER_MICROTUNE_4042FI5 49 /* DViCO FusionHDTV 3 Gold-Q - 4042 FI5 (3X 8147) */ |
92 | #define TUNER_TCL_2002N 50 | 92 | #define TUNER_TCL_2002N 50 |
93 | #define TUNER_PHILIPS_FM1256_IH3 51 | 93 | #define TUNER_PHILIPS_FM1256_IH3 51 |
94 | 94 | ||
95 | #define TUNER_THOMSON_DTT7610 52 | 95 | #define TUNER_THOMSON_DTT7610 52 |
96 | #define TUNER_PHILIPS_FQ1286 53 | 96 | #define TUNER_PHILIPS_FQ1286 53 |
97 | #define TUNER_PHILIPS_TDA8290 54 | 97 | #define TUNER_PHILIPS_TDA8290 54 |
98 | #define TUNER_TCL_2002MB 55 /* Hauppauge PVR-150 PAL */ | 98 | #define TUNER_TCL_2002MB 55 /* Hauppauge PVR-150 PAL */ |
99 | 99 | ||
100 | #define TUNER_PHILIPS_FQ1216AME_MK4 56 /* Hauppauge PVR-150 PAL */ | 100 | #define TUNER_PHILIPS_FQ1216AME_MK4 56 /* Hauppauge PVR-150 PAL */ |
101 | #define TUNER_PHILIPS_FQ1236A_MK4 57 /* Hauppauge PVR-500MCE NTSC */ | 101 | #define TUNER_PHILIPS_FQ1236A_MK4 57 /* Hauppauge PVR-500MCE NTSC */ |
102 | #define TUNER_YMEC_TVF_8531MF 58 | 102 | #define TUNER_YMEC_TVF_8531MF 58 |
103 | #define TUNER_YMEC_TVF_5533MF 59 /* Pixelview Pro Ultra NTSC */ | 103 | #define TUNER_YMEC_TVF_5533MF 59 /* Pixelview Pro Ultra NTSC */ |
104 | 104 | ||
105 | #define TUNER_THOMSON_DTT761X 60 /* DTT 7611 7611A 7612 7613 7613A 7614 7615 7615A */ | 105 | #define TUNER_THOMSON_DTT761X 60 /* DTT 7611 7611A 7612 7613 7613A 7614 7615 7615A */ |
106 | #define TUNER_TENA_9533_DI 61 | 106 | #define TUNER_TENA_9533_DI 61 |
107 | #define TUNER_TEA5767 62 /* Only FM Radio Tuner */ | 107 | #define TUNER_TEA5767 62 /* Only FM Radio Tuner */ |
108 | #define TUNER_PHILIPS_FMD1216ME_MK3 63 | 108 | #define TUNER_PHILIPS_FMD1216ME_MK3 63 |
109 | 109 | ||
110 | #define TUNER_LG_TDVS_H06XF 64 /* TDVS H061F, H062F, H064F */ | 110 | #define TUNER_LG_TDVS_H06XF 64 /* TDVS H061F, H062F, H064F */ |
111 | #define TUNER_YMEC_TVF66T5_B_DFF 65 /* Acorp Y878F */ | 111 | #define TUNER_YMEC_TVF66T5_B_DFF 65 /* Acorp Y878F */ |
112 | #define TUNER_LG_TALN 66 | 112 | #define TUNER_LG_TALN 66 |
113 | #define TUNER_PHILIPS_TD1316 67 | 113 | #define TUNER_PHILIPS_TD1316 67 |
114 | 114 | ||
115 | #define TUNER_PHILIPS_TUV1236D 68 /* ATI HDTV Wonder */ | 115 | #define TUNER_PHILIPS_TUV1236D 68 /* ATI HDTV Wonder */ |
116 | #define TUNER_TNF_5335MF 69 /* Sabrent Bt848 */ | 116 | #define TUNER_TNF_5335MF 69 /* Sabrent Bt848 */ |
117 | #define TUNER_SAMSUNG_TCPN_2121P30A 70 /* Hauppauge PVR-500MCE NTSC */ | 117 | #define TUNER_SAMSUNG_TCPN_2121P30A 70 /* Hauppauge PVR-500MCE NTSC */ |
118 | #define TUNER_XC2028 71 | 118 | #define TUNER_XC2028 71 |
119 | 119 | ||
120 | #define TUNER_THOMSON_FE6600 72 /* DViCO FusionHDTV DVB-T Hybrid */ | 120 | #define TUNER_THOMSON_FE6600 72 /* DViCO FusionHDTV DVB-T Hybrid */ |
121 | #define TUNER_SAMSUNG_TCPG_6121P30A 73 /* Hauppauge PVR-500 PAL */ | 121 | #define TUNER_SAMSUNG_TCPG_6121P30A 73 /* Hauppauge PVR-500 PAL */ |
122 | #define TUNER_TDA9887 74 /* This tuner should be used only internally */ | 122 | #define TUNER_TDA9887 74 /* This tuner should be used only internally */ |
123 | #define TUNER_TEA5761 75 /* Only FM Radio Tuner */ | 123 | #define TUNER_TEA5761 75 /* Only FM Radio Tuner */ |
124 | #define TUNER_XC5000 76 /* Xceive Silicon Tuner */ | 124 | #define TUNER_XC5000 76 /* Xceive Silicon Tuner */ |
125 | #define TUNER_TCL_MF02GIP_5N 77 /* TCL MF02GIP_5N */ | 125 | #define TUNER_TCL_MF02GIP_5N 77 /* TCL MF02GIP_5N */ |
126 | #define TUNER_PHILIPS_FMD1216MEX_MK3 78 | ||
126 | 127 | ||
127 | /* tv card specific */ | 128 | /* tv card specific */ |
128 | #define TDA9887_PRESENT (1<<0) | 129 | #define TDA9887_PRESENT (1<<0) |
129 | #define TDA9887_PORT1_INACTIVE (1<<1) | 130 | #define TDA9887_PORT1_INACTIVE (1<<1) |
130 | #define TDA9887_PORT2_INACTIVE (1<<2) | 131 | #define TDA9887_PORT2_INACTIVE (1<<2) |
131 | #define TDA9887_QSS (1<<3) | 132 | #define TDA9887_QSS (1<<3) |
132 | #define TDA9887_INTERCARRIER (1<<4) | 133 | #define TDA9887_INTERCARRIER (1<<4) |
133 | #define TDA9887_PORT1_ACTIVE (1<<5) | 134 | #define TDA9887_PORT1_ACTIVE (1<<5) |
134 | #define TDA9887_PORT2_ACTIVE (1<<6) | 135 | #define TDA9887_PORT2_ACTIVE (1<<6) |
135 | #define TDA9887_INTERCARRIER_NTSC (1<<7) | 136 | #define TDA9887_INTERCARRIER_NTSC (1<<7) |
136 | /* Tuner takeover point adjustment, in dB, -16 <= top <= 15 */ | 137 | /* Tuner takeover point adjustment, in dB, -16 <= top <= 15 */ |
137 | #define TDA9887_TOP_MASK (0x3f << 8) | 138 | #define TDA9887_TOP_MASK (0x3f << 8) |
138 | #define TDA9887_TOP_SET (1 << 13) | 139 | #define TDA9887_TOP_SET (1 << 13) |
139 | #define TDA9887_TOP(top) (TDA9887_TOP_SET | (((16 + (top)) & 0x1f) << 8)) | 140 | #define TDA9887_TOP(top) (TDA9887_TOP_SET | (((16 + (top)) & 0x1f) << 8)) |
140 | 141 | ||
141 | /* config options */ | 142 | /* config options */ |
142 | #define TDA9887_DEEMPHASIS_MASK (3<<16) | 143 | #define TDA9887_DEEMPHASIS_MASK (3<<16) |
143 | #define TDA9887_DEEMPHASIS_NONE (1<<16) | 144 | #define TDA9887_DEEMPHASIS_NONE (1<<16) |
144 | #define TDA9887_DEEMPHASIS_50 (2<<16) | 145 | #define TDA9887_DEEMPHASIS_50 (2<<16) |
145 | #define TDA9887_DEEMPHASIS_75 (3<<16) | 146 | #define TDA9887_DEEMPHASIS_75 (3<<16) |
146 | #define TDA9887_AUTOMUTE (1<<18) | 147 | #define TDA9887_AUTOMUTE (1<<18) |
147 | #define TDA9887_GATING_18 (1<<19) | 148 | #define TDA9887_GATING_18 (1<<19) |
148 | #define TDA9887_GAIN_NORMAL (1<<20) | 149 | #define TDA9887_GAIN_NORMAL (1<<20) |
149 | #define TDA9887_RIF_41_3 (1<<21) /* radio IF1 41.3 vs 33.3 */ | 150 | #define TDA9887_RIF_41_3 (1<<21) /* radio IF1 41.3 vs 33.3 */ |
150 | 151 | ||
151 | #ifdef __KERNEL__ | 152 | #ifdef __KERNEL__ |
152 | 153 | ||
153 | enum tuner_mode { | 154 | enum tuner_mode { |
154 | T_UNINITIALIZED = 0, | 155 | T_UNINITIALIZED = 0, |
155 | T_RADIO = 1 << V4L2_TUNER_RADIO, | 156 | T_RADIO = 1 << V4L2_TUNER_RADIO, |
156 | T_ANALOG_TV = 1 << V4L2_TUNER_ANALOG_TV, | 157 | T_ANALOG_TV = 1 << V4L2_TUNER_ANALOG_TV, |
157 | T_DIGITAL_TV = 1 << V4L2_TUNER_DIGITAL_TV, | 158 | T_DIGITAL_TV = 1 << V4L2_TUNER_DIGITAL_TV, |
158 | T_STANDBY = 1 << 31 | 159 | T_STANDBY = 1 << 31 |
159 | }; | 160 | }; |
160 | 161 | ||
161 | /* Older boards only had a single tuner device. Nowadays multiple tuner | 162 | /* Older boards only had a single tuner device. Nowadays multiple tuner |
162 | devices may be present on a single board. Using TUNER_SET_TYPE_ADDR | 163 | devices may be present on a single board. Using TUNER_SET_TYPE_ADDR |
163 | to pass the tuner_setup structure it is possible to setup each tuner | 164 | to pass the tuner_setup structure it is possible to setup each tuner |
164 | device in turn. | 165 | device in turn. |
165 | 166 | ||
166 | Since multiple devices may be present it is no longer sufficient to | 167 | Since multiple devices may be present it is no longer sufficient to |
167 | send a command to a single i2c device. Instead you should broadcast | 168 | send a command to a single i2c device. Instead you should broadcast |
168 | the command to all i2c devices. | 169 | the command to all i2c devices. |
169 | 170 | ||
170 | By setting the mode_mask correctly you can select which commands are | 171 | By setting the mode_mask correctly you can select which commands are |
171 | accepted by a specific tuner device. For example, set mode_mask to | 172 | accepted by a specific tuner device. For example, set mode_mask to |
172 | T_RADIO if the device is a radio-only tuner. That specific tuner will | 173 | T_RADIO if the device is a radio-only tuner. That specific tuner will |
173 | only accept commands when the tuner is in radio mode and ignore them | 174 | only accept commands when the tuner is in radio mode and ignore them |
174 | when the tuner is set to TV mode. | 175 | when the tuner is set to TV mode. |
175 | */ | 176 | */ |
176 | 177 | ||
177 | struct tuner_setup { | 178 | struct tuner_setup { |
178 | unsigned short addr; /* I2C address */ | 179 | unsigned short addr; /* I2C address */ |
179 | unsigned int type; /* Tuner type */ | 180 | unsigned int type; /* Tuner type */ |
180 | unsigned int mode_mask; /* Allowed tuner modes */ | 181 | unsigned int mode_mask; /* Allowed tuner modes */ |
181 | unsigned int config; /* configuraion for more complex tuners */ | 182 | unsigned int config; /* configuraion for more complex tuners */ |
182 | int (*tuner_callback) (void *dev, int component, int cmd, int arg); | 183 | int (*tuner_callback) (void *dev, int component, int cmd, int arg); |
183 | }; | 184 | }; |
184 | 185 | ||
185 | #endif /* __KERNEL__ */ | 186 | #endif /* __KERNEL__ */ |
186 | 187 | ||
187 | #endif /* _TUNER_H */ | 188 | #endif /* _TUNER_H */ |
188 | 189 | ||
189 | /* | 190 | /* |
190 | * Overrides for Emacs so that we follow Linus's tabbing style. | 191 | * Overrides for Emacs so that we follow Linus's tabbing style. |
191 | * --------------------------------------------------------------------------- | 192 | * --------------------------------------------------------------------------- |
192 | * Local variables: | 193 | * Local variables: |
193 | * c-basic-offset: 8 | 194 | * c-basic-offset: 8 |
194 | * End: | 195 | * End: |
195 | */ | 196 | */ |
196 | 197 |