From 8eb27e90e90b31267973b83302eba6d2601479d8 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Thu, 11 Aug 2005 17:18:38 +0000 Subject: * tda9887.c, cx88-dvb.c: - This patch addresses valid objections to experimental code used to mute the tda9887 when the tuner is used for digital TV reception. That code is removed and replaced by a better solution. Comments have been added, indicating that t_standby should be implemented in the future. Signed-off-by: Mac Michaels Signed-off-by: Michael Krufky --- linux/drivers/media/video/cx88/cx88-dvb.c | 19 ++++++++++++++----- linux/drivers/media/video/tda9887.c | 4 +++- 2 files changed, 17 insertions(+), 6 deletions(-) (limited to 'linux/drivers/media/video') diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index 9228e90ac..c95b3fb7b 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-dvb.c,v 1.58 2005/08/07 09:24:08 mkrufky Exp $ + * $Id: cx88-dvb.c,v 1.59 2005/08/11 17:18:38 mkrufky Exp $ * * device driver for Conexant 2388x based TV cards * MPEG Transport Stream (DVB) routines @@ -225,15 +225,24 @@ static int lgdt330x_pll_set(struct dvb_frontend* fe, * frontends. Many share the same tuner with analog TV. */ struct cx8802_dev *dev= fe->dvb->priv; + struct cx88_core *core = dev->core; u8 buf[4]; struct i2c_msg msg = { .addr = dev->core->pll_addr, .flags = 0, .buf = buf, .len = 4 }; int err; - dvb_pll_configure(dev->core->pll_desc, buf, params->frequency, 0); + /* Put the analog decoder in standby to keep it quiet */ + /* FIXME: it is using a side effect to mute tuner instead of T_STANDBY */ + if (core->tda9887_conf) { + v4l2_std_id std = V4L2_STD_ATSC; + + cx88_call_i2c_clients(core, VIDIOC_S_STD, &std); + } + + dvb_pll_configure(core->pll_desc, buf, params->frequency, 0); dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); - if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { + if ((err = i2c_transfer(&core->i2c_adap, &msg, 1)) != 1) { printk(KERN_WARNING "cx88-dvb: %s error " "(addr %02x <- %02x, err = %i)\n", __FUNCTION__, buf[0], buf[1], err); @@ -242,12 +251,12 @@ static int lgdt330x_pll_set(struct dvb_frontend* fe, else return -EREMOTEIO; } - if (dev->core->tuner_type == TUNER_LG_TDVS_H062F) { + if (core->tuner_type == TUNER_LG_TDVS_H062F) { /* Set the Auxiliary Byte. */ buf[2] &= ~0x20; buf[2] |= 0x18; buf[3] = 0x50; - i2c_transfer(&dev->core->i2c_adap, &msg, 1); + i2c_transfer(&core->i2c_adap, &msg, 1); } return 0; } diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c index f54dbef9e..881c82423 100644 --- a/linux/drivers/media/video/tda9887.c +++ b/linux/drivers/media/video/tda9887.c @@ -390,7 +390,9 @@ static int tda9887_set_tvnorm(struct tda9887 *t, char *buf) } } if (NULL == norm) { - dprintk(PREFIX "Oops: no tvnorm entry found\n"); + /* FIXME: it is using a side effect to mute tuner instead of T_STANDBY */ + dprintk(PREFIX "Unsupported tvnorm entry - audio muted\n"); + buf[1] |= cForcedMuteAudioON; return -1; } -- cgit v1.2.3