diff options
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-cards.c')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-cards.c | 236 |
1 files changed, 156 insertions, 80 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index c36d3f632104..dac5ccc9ba72 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <media/cx25840.h> | 26 | #include <media/cx25840.h> |
27 | 27 | ||
28 | #include "cx23885.h" | 28 | #include "cx23885.h" |
29 | #include "tuner-xc2028.h" | ||
29 | 30 | ||
30 | /* ------------------------------------------------------------------ */ | 31 | /* ------------------------------------------------------------------ */ |
31 | /* board config info */ | 32 | /* board config info */ |
@@ -38,16 +39,16 @@ struct cx23885_board cx23885_boards[] = { | |||
38 | .input = {{ | 39 | .input = {{ |
39 | .type = CX23885_VMUX_COMPOSITE1, | 40 | .type = CX23885_VMUX_COMPOSITE1, |
40 | .vmux = 0, | 41 | .vmux = 0, |
41 | },{ | 42 | }, { |
42 | .type = CX23885_VMUX_COMPOSITE2, | 43 | .type = CX23885_VMUX_COMPOSITE2, |
43 | .vmux = 1, | 44 | .vmux = 1, |
44 | },{ | 45 | }, { |
45 | .type = CX23885_VMUX_COMPOSITE3, | 46 | .type = CX23885_VMUX_COMPOSITE3, |
46 | .vmux = 2, | 47 | .vmux = 2, |
47 | },{ | 48 | }, { |
48 | .type = CX23885_VMUX_COMPOSITE4, | 49 | .type = CX23885_VMUX_COMPOSITE4, |
49 | .vmux = 3, | 50 | .vmux = 3, |
50 | }}, | 51 | } }, |
51 | }, | 52 | }, |
52 | [CX23885_BOARD_HAUPPAUGE_HVR1800lp] = { | 53 | [CX23885_BOARD_HAUPPAUGE_HVR1800lp] = { |
53 | .name = "Hauppauge WinTV-HVR1800lp", | 54 | .name = "Hauppauge WinTV-HVR1800lp", |
@@ -56,19 +57,19 @@ struct cx23885_board cx23885_boards[] = { | |||
56 | .type = CX23885_VMUX_TELEVISION, | 57 | .type = CX23885_VMUX_TELEVISION, |
57 | .vmux = 0, | 58 | .vmux = 0, |
58 | .gpio0 = 0xff00, | 59 | .gpio0 = 0xff00, |
59 | },{ | 60 | }, { |
60 | .type = CX23885_VMUX_DEBUG, | 61 | .type = CX23885_VMUX_DEBUG, |
61 | .vmux = 0, | 62 | .vmux = 0, |
62 | .gpio0 = 0xff01, | 63 | .gpio0 = 0xff01, |
63 | },{ | 64 | }, { |
64 | .type = CX23885_VMUX_COMPOSITE1, | 65 | .type = CX23885_VMUX_COMPOSITE1, |
65 | .vmux = 1, | 66 | .vmux = 1, |
66 | .gpio0 = 0xff02, | 67 | .gpio0 = 0xff02, |
67 | },{ | 68 | }, { |
68 | .type = CX23885_VMUX_SVIDEO, | 69 | .type = CX23885_VMUX_SVIDEO, |
69 | .vmux = 2, | 70 | .vmux = 2, |
70 | .gpio0 = 0xff02, | 71 | .gpio0 = 0xff02, |
71 | }}, | 72 | } }, |
72 | }, | 73 | }, |
73 | [CX23885_BOARD_HAUPPAUGE_HVR1800] = { | 74 | [CX23885_BOARD_HAUPPAUGE_HVR1800] = { |
74 | .name = "Hauppauge WinTV-HVR1800", | 75 | .name = "Hauppauge WinTV-HVR1800", |
@@ -83,20 +84,20 @@ struct cx23885_board cx23885_boards[] = { | |||
83 | CX25840_VIN5_CH2 | | 84 | CX25840_VIN5_CH2 | |
84 | CX25840_VIN2_CH1, | 85 | CX25840_VIN2_CH1, |
85 | .gpio0 = 0, | 86 | .gpio0 = 0, |
86 | },{ | 87 | }, { |
87 | .type = CX23885_VMUX_COMPOSITE1, | 88 | .type = CX23885_VMUX_COMPOSITE1, |
88 | .vmux = CX25840_VIN7_CH3 | | 89 | .vmux = CX25840_VIN7_CH3 | |
89 | CX25840_VIN4_CH2 | | 90 | CX25840_VIN4_CH2 | |
90 | CX25840_VIN6_CH1, | 91 | CX25840_VIN6_CH1, |
91 | .gpio0 = 0, | 92 | .gpio0 = 0, |
92 | },{ | 93 | }, { |
93 | .type = CX23885_VMUX_SVIDEO, | 94 | .type = CX23885_VMUX_SVIDEO, |
94 | .vmux = CX25840_VIN7_CH3 | | 95 | .vmux = CX25840_VIN7_CH3 | |
95 | CX25840_VIN4_CH2 | | 96 | CX25840_VIN4_CH2 | |
96 | CX25840_VIN8_CH1 | | 97 | CX25840_VIN8_CH1 | |
97 | CX25840_SVIDEO_ON, | 98 | CX25840_SVIDEO_ON, |
98 | .gpio0 = 0, | 99 | .gpio0 = 0, |
99 | }}, | 100 | } }, |
100 | }, | 101 | }, |
101 | [CX23885_BOARD_HAUPPAUGE_HVR1250] = { | 102 | [CX23885_BOARD_HAUPPAUGE_HVR1250] = { |
102 | .name = "Hauppauge WinTV-HVR1250", | 103 | .name = "Hauppauge WinTV-HVR1250", |
@@ -105,19 +106,19 @@ struct cx23885_board cx23885_boards[] = { | |||
105 | .type = CX23885_VMUX_TELEVISION, | 106 | .type = CX23885_VMUX_TELEVISION, |
106 | .vmux = 0, | 107 | .vmux = 0, |
107 | .gpio0 = 0xff00, | 108 | .gpio0 = 0xff00, |
108 | },{ | 109 | }, { |
109 | .type = CX23885_VMUX_DEBUG, | 110 | .type = CX23885_VMUX_DEBUG, |
110 | .vmux = 0, | 111 | .vmux = 0, |
111 | .gpio0 = 0xff01, | 112 | .gpio0 = 0xff01, |
112 | },{ | 113 | }, { |
113 | .type = CX23885_VMUX_COMPOSITE1, | 114 | .type = CX23885_VMUX_COMPOSITE1, |
114 | .vmux = 1, | 115 | .vmux = 1, |
115 | .gpio0 = 0xff02, | 116 | .gpio0 = 0xff02, |
116 | },{ | 117 | }, { |
117 | .type = CX23885_VMUX_SVIDEO, | 118 | .type = CX23885_VMUX_SVIDEO, |
118 | .vmux = 2, | 119 | .vmux = 2, |
119 | .gpio0 = 0xff02, | 120 | .gpio0 = 0xff02, |
120 | }}, | 121 | } }, |
121 | }, | 122 | }, |
122 | [CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP] = { | 123 | [CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP] = { |
123 | .name = "DViCO FusionHDTV5 Express", | 124 | .name = "DViCO FusionHDTV5 Express", |
@@ -148,6 +149,15 @@ struct cx23885_board cx23885_boards[] = { | |||
148 | .portb = CX23885_MPEG_DVB, | 149 | .portb = CX23885_MPEG_DVB, |
149 | .portc = CX23885_MPEG_DVB, | 150 | .portc = CX23885_MPEG_DVB, |
150 | }, | 151 | }, |
152 | [CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP] = { | ||
153 | .name = "DViCO FusionHDTV DVB-T Dual Express", | ||
154 | .portb = CX23885_MPEG_DVB, | ||
155 | .portc = CX23885_MPEG_DVB, | ||
156 | }, | ||
157 | [CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H] = { | ||
158 | .name = "Leadtek Winfast PxDVR3200 H", | ||
159 | .portc = CX23885_MPEG_DVB, | ||
160 | }, | ||
151 | }; | 161 | }; |
152 | const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); | 162 | const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); |
153 | 163 | ||
@@ -159,43 +169,43 @@ struct cx23885_subid cx23885_subids[] = { | |||
159 | .subvendor = 0x0070, | 169 | .subvendor = 0x0070, |
160 | .subdevice = 0x3400, | 170 | .subdevice = 0x3400, |
161 | .card = CX23885_BOARD_UNKNOWN, | 171 | .card = CX23885_BOARD_UNKNOWN, |
162 | },{ | 172 | }, { |
163 | .subvendor = 0x0070, | 173 | .subvendor = 0x0070, |
164 | .subdevice = 0x7600, | 174 | .subdevice = 0x7600, |
165 | .card = CX23885_BOARD_HAUPPAUGE_HVR1800lp, | 175 | .card = CX23885_BOARD_HAUPPAUGE_HVR1800lp, |
166 | },{ | 176 | }, { |
167 | .subvendor = 0x0070, | 177 | .subvendor = 0x0070, |
168 | .subdevice = 0x7800, | 178 | .subdevice = 0x7800, |
169 | .card = CX23885_BOARD_HAUPPAUGE_HVR1800, | 179 | .card = CX23885_BOARD_HAUPPAUGE_HVR1800, |
170 | },{ | 180 | }, { |
171 | .subvendor = 0x0070, | 181 | .subvendor = 0x0070, |
172 | .subdevice = 0x7801, | 182 | .subdevice = 0x7801, |
173 | .card = CX23885_BOARD_HAUPPAUGE_HVR1800, | 183 | .card = CX23885_BOARD_HAUPPAUGE_HVR1800, |
174 | },{ | 184 | }, { |
175 | .subvendor = 0x0070, | 185 | .subvendor = 0x0070, |
176 | .subdevice = 0x7809, | 186 | .subdevice = 0x7809, |
177 | .card = CX23885_BOARD_HAUPPAUGE_HVR1800, | 187 | .card = CX23885_BOARD_HAUPPAUGE_HVR1800, |
178 | },{ | 188 | }, { |
179 | .subvendor = 0x0070, | 189 | .subvendor = 0x0070, |
180 | .subdevice = 0x7911, | 190 | .subdevice = 0x7911, |
181 | .card = CX23885_BOARD_HAUPPAUGE_HVR1250, | 191 | .card = CX23885_BOARD_HAUPPAUGE_HVR1250, |
182 | },{ | 192 | }, { |
183 | .subvendor = 0x18ac, | 193 | .subvendor = 0x18ac, |
184 | .subdevice = 0xd500, | 194 | .subdevice = 0xd500, |
185 | .card = CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP, | 195 | .card = CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP, |
186 | },{ | 196 | }, { |
187 | .subvendor = 0x0070, | 197 | .subvendor = 0x0070, |
188 | .subdevice = 0x7790, | 198 | .subdevice = 0x7790, |
189 | .card = CX23885_BOARD_HAUPPAUGE_HVR1500Q, | 199 | .card = CX23885_BOARD_HAUPPAUGE_HVR1500Q, |
190 | },{ | 200 | }, { |
191 | .subvendor = 0x0070, | 201 | .subvendor = 0x0070, |
192 | .subdevice = 0x7797, | 202 | .subdevice = 0x7797, |
193 | .card = CX23885_BOARD_HAUPPAUGE_HVR1500Q, | 203 | .card = CX23885_BOARD_HAUPPAUGE_HVR1500Q, |
194 | },{ | 204 | }, { |
195 | .subvendor = 0x0070, | 205 | .subvendor = 0x0070, |
196 | .subdevice = 0x7710, | 206 | .subdevice = 0x7710, |
197 | .card = CX23885_BOARD_HAUPPAUGE_HVR1500, | 207 | .card = CX23885_BOARD_HAUPPAUGE_HVR1500, |
198 | },{ | 208 | }, { |
199 | .subvendor = 0x0070, | 209 | .subvendor = 0x0070, |
200 | .subdevice = 0x7717, | 210 | .subdevice = 0x7717, |
201 | .card = CX23885_BOARD_HAUPPAUGE_HVR1500, | 211 | .card = CX23885_BOARD_HAUPPAUGE_HVR1500, |
@@ -215,10 +225,18 @@ struct cx23885_subid cx23885_subids[] = { | |||
215 | .subvendor = 0x0070, | 225 | .subvendor = 0x0070, |
216 | .subdevice = 0x8010, | 226 | .subdevice = 0x8010, |
217 | .card = CX23885_BOARD_HAUPPAUGE_HVR1400, | 227 | .card = CX23885_BOARD_HAUPPAUGE_HVR1400, |
218 | },{ | 228 | }, { |
219 | .subvendor = 0x18ac, | 229 | .subvendor = 0x18ac, |
220 | .subdevice = 0xd618, | 230 | .subdevice = 0xd618, |
221 | .card = CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP, | 231 | .card = CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP, |
232 | }, { | ||
233 | .subvendor = 0x18ac, | ||
234 | .subdevice = 0xdb78, | ||
235 | .card = CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP, | ||
236 | }, { | ||
237 | .subvendor = 0x107d, | ||
238 | .subdevice = 0x6681, | ||
239 | .card = CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H, | ||
222 | }, | 240 | }, |
223 | }; | 241 | }; |
224 | const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); | 242 | const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); |
@@ -229,23 +247,25 @@ void cx23885_card_list(struct cx23885_dev *dev) | |||
229 | 247 | ||
230 | if (0 == dev->pci->subsystem_vendor && | 248 | if (0 == dev->pci->subsystem_vendor && |
231 | 0 == dev->pci->subsystem_device) { | 249 | 0 == dev->pci->subsystem_device) { |
232 | printk("%s: Your board has no valid PCIe Subsystem ID and thus can't\n" | 250 | printk(KERN_INFO |
233 | "%s: be autodetected. Please pass card=<n> insmod option to\n" | 251 | "%s: Board has no valid PCIe Subsystem ID and can't\n" |
234 | "%s: workaround that. Redirect complaints to the vendor of\n" | 252 | "%s: be autodetected. Pass card=<n> insmod option\n" |
235 | "%s: the TV card. Best regards,\n" | 253 | "%s: to workaround that. Redirect complaints to the\n" |
254 | "%s: vendor of the TV card. Best regards,\n" | ||
236 | "%s: -- tux\n", | 255 | "%s: -- tux\n", |
237 | dev->name, dev->name, dev->name, dev->name, dev->name); | 256 | dev->name, dev->name, dev->name, dev->name, dev->name); |
238 | } else { | 257 | } else { |
239 | printk("%s: Your board isn't known (yet) to the driver. You can\n" | 258 | printk(KERN_INFO |
240 | "%s: try to pick one of the existing card configs via\n" | 259 | "%s: Your board isn't known (yet) to the driver.\n" |
260 | "%s: Try to pick one of the existing card configs via\n" | ||
241 | "%s: card=<n> insmod option. Updating to the latest\n" | 261 | "%s: card=<n> insmod option. Updating to the latest\n" |
242 | "%s: version might help as well.\n", | 262 | "%s: version might help as well.\n", |
243 | dev->name, dev->name, dev->name, dev->name); | 263 | dev->name, dev->name, dev->name, dev->name); |
244 | } | 264 | } |
245 | printk("%s: Here is a list of valid choices for the card=<n> insmod option:\n", | 265 | printk(KERN_INFO "%s: Here is a list of valid choices for the card=<n> insmod option:\n", |
246 | dev->name); | 266 | dev->name); |
247 | for (i = 0; i < cx23885_bcount; i++) | 267 | for (i = 0; i < cx23885_bcount; i++) |
248 | printk("%s: card=%d -> %s\n", | 268 | printk(KERN_INFO "%s: card=%d -> %s\n", |
249 | dev->name, i, cx23885_boards[i].name); | 269 | dev->name, i, cx23885_boards[i].name); |
250 | } | 270 | } |
251 | 271 | ||
@@ -253,11 +273,11 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data) | |||
253 | { | 273 | { |
254 | struct tveeprom tv; | 274 | struct tveeprom tv; |
255 | 275 | ||
256 | tveeprom_hauppauge_analog(&dev->i2c_bus[0].i2c_client, &tv, eeprom_data); | 276 | tveeprom_hauppauge_analog(&dev->i2c_bus[0].i2c_client, &tv, |
277 | eeprom_data); | ||
257 | 278 | ||
258 | /* Make sure we support the board model */ | 279 | /* Make sure we support the board model */ |
259 | switch (tv.model) | 280 | switch (tv.model) { |
260 | { | ||
261 | case 71009: | 281 | case 71009: |
262 | /* WinTV-HVR1200 (PCIe, Retail, full height) | 282 | /* WinTV-HVR1200 (PCIe, Retail, full height) |
263 | * DVB-T and basic analog */ | 283 | * DVB-T and basic analog */ |
@@ -285,21 +305,51 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data) | |||
285 | case 71999: | 305 | case 71999: |
286 | /* WinTV-HVR1200 (PCIe, OEM, full height) | 306 | /* WinTV-HVR1200 (PCIe, OEM, full height) |
287 | * DVB-T and basic analog */ | 307 | * DVB-T and basic analog */ |
288 | case 76601: /* WinTV-HVR1800lp (PCIe, Retail, No IR, Dual channel ATSC and MPEG2 HW Encoder */ | 308 | case 76601: |
289 | case 77001: /* WinTV-HVR1500 (Express Card, OEM, No IR, ATSC and Basic analog */ | 309 | /* WinTV-HVR1800lp (PCIe, Retail, No IR, Dual |
290 | case 77011: /* WinTV-HVR1500 (Express Card, Retail, No IR, ATSC and Basic analog */ | 310 | channel ATSC and MPEG2 HW Encoder */ |
291 | case 77041: /* WinTV-HVR1500Q (Express Card, OEM, No IR, ATSC/QAM and Basic analog */ | 311 | case 77001: |
292 | case 77051: /* WinTV-HVR1500Q (Express Card, Retail, No IR, ATSC/QAM and Basic analog */ | 312 | /* WinTV-HVR1500 (Express Card, OEM, No IR, ATSC |
293 | case 78011: /* WinTV-HVR1800 (PCIe, Retail, 3.5mm in, IR, No FM, Dual channel ATSC and MPEG2 HW Encoder */ | 313 | and Basic analog */ |
294 | case 78501: /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM, Dual channel ATSC and MPEG2 HW Encoder */ | 314 | case 77011: |
295 | case 78521: /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM, Dual channel ATSC and MPEG2 HW Encoder */ | 315 | /* WinTV-HVR1500 (Express Card, Retail, No IR, ATSC |
296 | case 78531: /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, No FM, Dual channel ATSC and MPEG2 HW Encoder */ | 316 | and Basic analog */ |
297 | case 78631: /* WinTV-HVR1800 (PCIe, OEM, No IR, No FM, Dual channel ATSC and MPEG2 HW Encoder */ | 317 | case 77041: |
298 | case 79001: /* WinTV-HVR1250 (PCIe, Retail, IR, full height, ATSC and Basic analog */ | 318 | /* WinTV-HVR1500Q (Express Card, OEM, No IR, ATSC/QAM |
299 | case 79101: /* WinTV-HVR1250 (PCIe, Retail, IR, half height, ATSC and Basic analog */ | 319 | and Basic analog */ |
300 | case 79561: /* WinTV-HVR1250 (PCIe, OEM, No IR, half height, ATSC and Basic analog */ | 320 | case 77051: |
301 | case 79571: /* WinTV-HVR1250 (PCIe, OEM, No IR, full height, ATSC and Basic analog */ | 321 | /* WinTV-HVR1500Q (Express Card, Retail, No IR, ATSC/QAM |
302 | case 79671: /* WinTV-HVR1250 (PCIe, OEM, No IR, half height, ATSC and Basic analog */ | 322 | and Basic analog */ |
323 | case 78011: | ||
324 | /* WinTV-HVR1800 (PCIe, Retail, 3.5mm in, IR, No FM, | ||
325 | Dual channel ATSC and MPEG2 HW Encoder */ | ||
326 | case 78501: | ||
327 | /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM, | ||
328 | Dual channel ATSC and MPEG2 HW Encoder */ | ||
329 | case 78521: | ||
330 | /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM, | ||
331 | Dual channel ATSC and MPEG2 HW Encoder */ | ||
332 | case 78531: | ||
333 | /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, No FM, | ||
334 | Dual channel ATSC and MPEG2 HW Encoder */ | ||
335 | case 78631: | ||
336 | /* WinTV-HVR1800 (PCIe, OEM, No IR, No FM, | ||
337 | Dual channel ATSC and MPEG2 HW Encoder */ | ||
338 | case 79001: | ||
339 | /* WinTV-HVR1250 (PCIe, Retail, IR, full height, | ||
340 | ATSC and Basic analog */ | ||
341 | case 79101: | ||
342 | /* WinTV-HVR1250 (PCIe, Retail, IR, half height, | ||
343 | ATSC and Basic analog */ | ||
344 | case 79561: | ||
345 | /* WinTV-HVR1250 (PCIe, OEM, No IR, half height, | ||
346 | ATSC and Basic analog */ | ||
347 | case 79571: | ||
348 | /* WinTV-HVR1250 (PCIe, OEM, No IR, full height, | ||
349 | ATSC and Basic analog */ | ||
350 | case 79671: | ||
351 | /* WinTV-HVR1250 (PCIe, OEM, No IR, half height, | ||
352 | ATSC and Basic analog */ | ||
303 | case 80019: | 353 | case 80019: |
304 | /* WinTV-HVR1400 (Express Card, Retail, IR, | 354 | /* WinTV-HVR1400 (Express Card, Retail, IR, |
305 | * DVB-T and Basic analog */ | 355 | * DVB-T and Basic analog */ |
@@ -311,7 +361,8 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data) | |||
311 | * DVB-T and MPEG2 HW Encoder */ | 361 | * DVB-T and MPEG2 HW Encoder */ |
312 | break; | 362 | break; |
313 | default: | 363 | default: |
314 | printk("%s: warning: unknown hauppauge model #%d\n", dev->name, tv.model); | 364 | printk(KERN_WARNING "%s: warning: unknown hauppauge model #%d\n", |
365 | dev->name, tv.model); | ||
315 | break; | 366 | break; |
316 | } | 367 | } |
317 | 368 | ||
@@ -319,37 +370,37 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data) | |||
319 | dev->name, tv.model); | 370 | dev->name, tv.model); |
320 | } | 371 | } |
321 | 372 | ||
322 | /* Tuner callback function for cx23885 boards. Currently only needed | 373 | int cx23885_tuner_callback(void *priv, int component, int command, int arg) |
323 | * for HVR1500Q, which has an xc5000 tuner. | ||
324 | */ | ||
325 | int cx23885_tuner_callback(void *priv, int command, int arg) | ||
326 | { | 374 | { |
327 | struct cx23885_i2c *bus = priv; | 375 | struct cx23885_tsport *port = priv; |
328 | struct cx23885_dev *dev = bus->dev; | 376 | struct cx23885_dev *dev = port->dev; |
329 | u32 bitmask = 0; | 377 | u32 bitmask = 0; |
330 | 378 | ||
379 | if (command == XC2028_RESET_CLK) | ||
380 | return 0; | ||
381 | |||
331 | if (command != 0) { | 382 | if (command != 0) { |
332 | printk(KERN_ERR "%s(): Unknown command 0x%x.\n", | 383 | printk(KERN_ERR "%s(): Unknown command 0x%x.\n", |
333 | __func__, command); | 384 | __func__, command); |
334 | return -EINVAL; | 385 | return -EINVAL; |
335 | } | 386 | } |
336 | 387 | ||
337 | switch(dev->board) { | 388 | switch (dev->board) { |
389 | case CX23885_BOARD_HAUPPAUGE_HVR1400: | ||
390 | case CX23885_BOARD_HAUPPAUGE_HVR1500: | ||
338 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: | 391 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: |
339 | /* Tuner Reset Command from xc5000 */ | 392 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: |
340 | if (command == 0) | 393 | /* Tuner Reset Command */ |
341 | bitmask = 0x04; | 394 | bitmask = 0x04; |
342 | break; | 395 | break; |
343 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: | 396 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: |
344 | if (command == 0) { | 397 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: |
345 | 398 | /* Two identical tuners on two different i2c buses, | |
346 | /* Two identical tuners on two different i2c buses, | 399 | * we need to reset the correct gpio. */ |
347 | * we need to reset the correct gpio. */ | 400 | if (port->nr == 0) |
348 | if (bus->nr == 0) | 401 | bitmask = 0x01; |
349 | bitmask = 0x01; | 402 | else if (port->nr == 1) |
350 | else if (bus->nr == 1) | 403 | bitmask = 0x04; |
351 | bitmask = 0x04; | ||
352 | } | ||
353 | break; | 404 | break; |
354 | } | 405 | } |
355 | 406 | ||
@@ -365,7 +416,7 @@ int cx23885_tuner_callback(void *priv, int command, int arg) | |||
365 | 416 | ||
366 | void cx23885_gpio_setup(struct cx23885_dev *dev) | 417 | void cx23885_gpio_setup(struct cx23885_dev *dev) |
367 | { | 418 | { |
368 | switch(dev->board) { | 419 | switch (dev->board) { |
369 | case CX23885_BOARD_HAUPPAUGE_HVR1250: | 420 | case CX23885_BOARD_HAUPPAUGE_HVR1250: |
370 | /* GPIO-0 cx24227 demodulator reset */ | 421 | /* GPIO-0 cx24227 demodulator reset */ |
371 | cx_set(GP0_IO, 0x00010001); /* Bring the part out of reset */ | 422 | cx_set(GP0_IO, 0x00010001); /* Bring the part out of reset */ |
@@ -465,6 +516,32 @@ void cx23885_gpio_setup(struct cx23885_dev *dev) | |||
465 | mdelay(20); | 516 | mdelay(20); |
466 | cx_set(GP0_IO, 0x000f000f); | 517 | cx_set(GP0_IO, 0x000f000f); |
467 | break; | 518 | break; |
519 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: | ||
520 | /* GPIO-0 portb xc3028 reset */ | ||
521 | /* GPIO-1 portb zl10353 reset */ | ||
522 | /* GPIO-2 portc xc3028 reset */ | ||
523 | /* GPIO-3 portc zl10353 reset */ | ||
524 | |||
525 | /* Put the parts into reset and back */ | ||
526 | cx_set(GP0_IO, 0x000f0000); | ||
527 | mdelay(20); | ||
528 | cx_clear(GP0_IO, 0x0000000f); | ||
529 | mdelay(20); | ||
530 | cx_set(GP0_IO, 0x000f000f); | ||
531 | break; | ||
532 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: | ||
533 | /* GPIO-2 xc3028 tuner reset */ | ||
534 | |||
535 | /* The following GPIO's are on the internal AVCore (cx25840) */ | ||
536 | /* GPIO-? zl10353 demod reset */ | ||
537 | |||
538 | /* Put the parts into reset and back */ | ||
539 | cx_set(GP0_IO, 0x00040000); | ||
540 | mdelay(20); | ||
541 | cx_clear(GP0_IO, 0x00000004); | ||
542 | mdelay(20); | ||
543 | cx_set(GP0_IO, 0x00040004); | ||
544 | break; | ||
468 | } | 545 | } |
469 | } | 546 | } |
470 | 547 | ||
@@ -479,6 +556,9 @@ int cx23885_ir_init(struct cx23885_dev *dev) | |||
479 | case CX23885_BOARD_HAUPPAUGE_HVR1400: | 556 | case CX23885_BOARD_HAUPPAUGE_HVR1400: |
480 | /* FIXME: Implement me */ | 557 | /* FIXME: Implement me */ |
481 | break; | 558 | break; |
559 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: | ||
560 | request_module("ir-kbd-i2c"); | ||
561 | break; | ||
482 | } | 562 | } |
483 | 563 | ||
484 | return 0; | 564 | return 0; |
@@ -516,6 +596,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) | |||
516 | 596 | ||
517 | switch (dev->board) { | 597 | switch (dev->board) { |
518 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: | 598 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: |
599 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: | ||
519 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ | 600 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
520 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ | 601 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
521 | ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; | 602 | ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
@@ -548,6 +629,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) | |||
548 | case CX23885_BOARD_HAUPPAUGE_HVR1200: | 629 | case CX23885_BOARD_HAUPPAUGE_HVR1200: |
549 | case CX23885_BOARD_HAUPPAUGE_HVR1700: | 630 | case CX23885_BOARD_HAUPPAUGE_HVR1700: |
550 | case CX23885_BOARD_HAUPPAUGE_HVR1400: | 631 | case CX23885_BOARD_HAUPPAUGE_HVR1400: |
632 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: | ||
551 | default: | 633 | default: |
552 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ | 634 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
553 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ | 635 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
@@ -561,16 +643,10 @@ void cx23885_card_setup(struct cx23885_dev *dev) | |||
561 | case CX23885_BOARD_HAUPPAUGE_HVR1800: | 643 | case CX23885_BOARD_HAUPPAUGE_HVR1800: |
562 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: | 644 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: |
563 | case CX23885_BOARD_HAUPPAUGE_HVR1700: | 645 | case CX23885_BOARD_HAUPPAUGE_HVR1700: |
646 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: | ||
564 | request_module("cx25840"); | 647 | request_module("cx25840"); |
565 | break; | 648 | break; |
566 | } | 649 | } |
567 | } | 650 | } |
568 | 651 | ||
569 | /* ------------------------------------------------------------------ */ | 652 | /* ------------------------------------------------------------------ */ |
570 | |||
571 | /* | ||
572 | * Local variables: | ||
573 | * c-basic-offset: 8 | ||
574 | * End: | ||
575 | * kate: eol "unix"; indent-width 3; remove-trailing-space on; replace-trailing-space-save on; tab-width 8; replace-tabs off; space-indent off; mixed-indent off | ||
576 | */ | ||