diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-09-09 16:03:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 16:57:49 -0400 |
commit | e52e98a7eccfb0e7e91630d01690fb11d77db77d (patch) | |
tree | d910e743159977ee695c40b795a4b84d43a4dbcb /drivers/media/video/cx88/cx88-dvb.c | |
parent | 24a70fdce872d70171b1f49dcd1a7c3a4e8396b2 (diff) |
[PATCH] v4l: CX88 updates and card additions
- Remove $Id CVS logs for V4L files
- add ioctl indirection via cx88_ioctl_hook and cx88_ioctl_translator to
cx88-blackbird.c.
- declare the indirection hooks from cx88-blackbird.c.
- dcprintk macro which uses core instead of dev->core on cx88-video.c.
- replace dev->core occurances with core on cx88-video.c.
- CodingStyle fixes.
- MaxInput replaced by a define.
- cx8801 structures moved from cx88.h.
- The output_mode needs to be set for the Hauppauge Nova-T DVB-T
for versions after 2.6.12.
- Corrected GPIO values for cx88 cards #28 & #31 for s-video and composite.
- Updated DViCO FusionHDTV5 Gold & added DVB support.
- Fixed DViCO FusionHDTV 3 Gold-Q GPIO.
- Some clean up in cx88-tvaudio.c
- replaced hex values when writing to AUD_CTL to EN_xx for better reading.
- Allow select by hand between Mono, Lang1, Lang2 and Stereo for BTSC.
- Support for stereo NICAM and BTSC improved.
- Broken stereo check removed.
- Added support for remote control to Cinergy DVBT-1400.
- local var renamed from rc5 to a better name (ircode).
- LGDT330X QAM lock bug fixes.
- Some reorg: move some bits to struct cx88_core, factor out common ioctl's
to cx88_do_ioctl.
- Get rid of '//' comments, replace them with #if 0 and /**/.
- Minor clean-ups: remove dcprintk and replace all instances of "dev->core"
with "core".
- Added some registers to control PCI controller at CX2388x chips.
- New tuner standby API.
- Small mpeg fixes and cleanups for blackbird.
- fix mpeg packet size & count
- add VIDIOC_QUERYCAP ioctl for the mpeg stream
- return more information in struct v4l2_format
- fix default window height
- small cleanups
Signed-off-by: Uli Luckas <luckas@musoft.de>
Signed-off-by: Torsten Seeboth <Torsten.Seeboth@t-online.de>
Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Patrick Boettcher <patrick.boettcher@desy.de>
Signed-off-by: Catalin Climov <catalin@climov.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 78d223257a68..cc71cafc2cbd 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: cx88-dvb.c,v 1.58 2005/08/07 09:24:08 mkrufky Exp $ | ||
3 | * | 2 | * |
4 | * device driver for Conexant 2388x based TV cards | 3 | * device driver for Conexant 2388x based TV cards |
5 | * MPEG Transport Stream (DVB) routines | 4 | * MPEG Transport Stream (DVB) routines |
@@ -31,6 +30,7 @@ | |||
31 | #include <linux/suspend.h> | 30 | #include <linux/suspend.h> |
32 | #include <linux/config.h> | 31 | #include <linux/config.h> |
33 | 32 | ||
33 | |||
34 | #include "cx88.h" | 34 | #include "cx88.h" |
35 | #include "dvb-pll.h" | 35 | #include "dvb-pll.h" |
36 | 36 | ||
@@ -210,16 +210,26 @@ static struct or51132_config pchdtv_hd3000 = { | |||
210 | static int lgdt330x_pll_set(struct dvb_frontend* fe, | 210 | static int lgdt330x_pll_set(struct dvb_frontend* fe, |
211 | struct dvb_frontend_parameters* params) | 211 | struct dvb_frontend_parameters* params) |
212 | { | 212 | { |
213 | /* FIXME make this routine use the tuner-simple code. | ||
214 | * It could probably be shared with a number of ATSC | ||
215 | * frontends. Many share the same tuner with analog TV. */ | ||
216 | |||
213 | struct cx8802_dev *dev= fe->dvb->priv; | 217 | struct cx8802_dev *dev= fe->dvb->priv; |
218 | struct cx88_core *core = dev->core; | ||
214 | u8 buf[4]; | 219 | u8 buf[4]; |
215 | struct i2c_msg msg = | 220 | struct i2c_msg msg = |
216 | { .addr = dev->core->pll_addr, .flags = 0, .buf = buf, .len = 4 }; | 221 | { .addr = dev->core->pll_addr, .flags = 0, .buf = buf, .len = 4 }; |
217 | int err; | 222 | int err; |
218 | 223 | ||
219 | dvb_pll_configure(dev->core->pll_desc, buf, params->frequency, 0); | 224 | /* Put the analog decoder in standby to keep it quiet */ |
225 | if (core->tda9887_conf) { | ||
226 | cx88_call_i2c_clients (dev->core, TUNER_SET_STANDBY, NULL); | ||
227 | } | ||
228 | |||
229 | dvb_pll_configure(core->pll_desc, buf, params->frequency, 0); | ||
220 | dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", | 230 | dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", |
221 | __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); | 231 | __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); |
222 | if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { | 232 | if ((err = i2c_transfer(&core->i2c_adap, &msg, 1)) != 1) { |
223 | printk(KERN_WARNING "cx88-dvb: %s error " | 233 | printk(KERN_WARNING "cx88-dvb: %s error " |
224 | "(addr %02x <- %02x, err = %i)\n", | 234 | "(addr %02x <- %02x, err = %i)\n", |
225 | __FUNCTION__, buf[0], buf[1], err); | 235 | __FUNCTION__, buf[0], buf[1], err); |
@@ -228,6 +238,13 @@ static int lgdt330x_pll_set(struct dvb_frontend* fe, | |||
228 | else | 238 | else |
229 | return -EREMOTEIO; | 239 | return -EREMOTEIO; |
230 | } | 240 | } |
241 | if (core->tuner_type == TUNER_LG_TDVS_H062F) { | ||
242 | /* Set the Auxiliary Byte. */ | ||
243 | buf[2] &= ~0x20; | ||
244 | buf[2] |= 0x18; | ||
245 | buf[3] = 0x50; | ||
246 | i2c_transfer(&core->i2c_adap, &msg, 1); | ||
247 | } | ||
231 | return 0; | 248 | return 0; |
232 | } | 249 | } |
233 | 250 | ||
@@ -261,6 +278,14 @@ static struct lgdt330x_config fusionhdtv_3_gold = { | |||
261 | .pll_set = lgdt330x_pll_set, | 278 | .pll_set = lgdt330x_pll_set, |
262 | .set_ts_params = lgdt330x_set_ts_param, | 279 | .set_ts_params = lgdt330x_set_ts_param, |
263 | }; | 280 | }; |
281 | |||
282 | static struct lgdt330x_config fusionhdtv_5_gold = { | ||
283 | .demod_address = 0x0e, | ||
284 | .demod_chip = LGDT3303, | ||
285 | .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */ | ||
286 | .pll_set = lgdt330x_pll_set, | ||
287 | .set_ts_params = lgdt330x_set_ts_param, | ||
288 | }; | ||
264 | #endif | 289 | #endif |
265 | 290 | ||
266 | static int dvb_register(struct cx8802_dev *dev) | 291 | static int dvb_register(struct cx8802_dev *dev) |
@@ -346,6 +371,22 @@ static int dvb_register(struct cx8802_dev *dev) | |||
346 | &dev->core->i2c_adap); | 371 | &dev->core->i2c_adap); |
347 | } | 372 | } |
348 | break; | 373 | break; |
374 | case CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD: | ||
375 | dev->ts_gen_cntrl = 0x08; | ||
376 | { | ||
377 | /* Do a hardware reset of chip before using it. */ | ||
378 | struct cx88_core *core = dev->core; | ||
379 | |||
380 | cx_clear(MO_GP0_IO, 1); | ||
381 | mdelay(100); | ||
382 | cx_set(MO_GP0_IO, 1); | ||
383 | mdelay(200); | ||
384 | dev->core->pll_addr = 0x61; | ||
385 | dev->core->pll_desc = &dvb_pll_tdvs_tua6034; | ||
386 | dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_5_gold, | ||
387 | &dev->core->i2c_adap); | ||
388 | } | ||
389 | break; | ||
349 | #endif | 390 | #endif |
350 | default: | 391 | default: |
351 | printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", | 392 | printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", |