[linux-dvb] [REVISED PATCH] FusionHDTV 5 Gold card
Michael Krufky
mkrufky at m1k.net
Thu Aug 11 07:30:05 CEST 2005
Mac Michaels wrote:
> This pair of patches 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.
>
> Attached are patches for dvb-kernel CVS and video4linux CVS.
Mac-
Attached is a re-worked version of your patch against video4linux cvs.
This patch IS safe to apply to cvs. I have tested the patch, and it
works correctly. This can be applied, and it does not aggravate the
backwards compatibility of cx88-dvb.c . FIXME: comments have been
inserted, indicating that T_STANDBY should be implemented in the future.
> Signed-off-by Mac Michaels <wmichaels1 at earthlink.net>
Signed-off-by: Michael Krufky <mkrufky at m1k.net>
-------------- next part --------------
cx88-dvb.c | 17 +++++++++++++----
tda9887.c | 4 +++-
2 files changed, 16 insertions(+), 5 deletions(-)
diff -upr video4linux.orig/cx88-dvb.c video4linux/cx88-dvb.c
--- video4linux.orig/cx88-dvb.c 2005-08-11 01:10:34.000000000 +0000
+++ video4linux/cx88-dvb.c 2005-08-11 01:14:20.000000000 +0000
@@ -225,15 +225,24 @@ static int lgdt330x_pll_set(struct dvb_f
* 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_f
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 -upr video4linux.orig/tda9887.c video4linux/tda9887.c
--- video4linux.orig/tda9887.c 2005-08-11 01:10:34.000000000 +0000
+++ video4linux/tda9887.c 2005-08-11 01:13:04.000000000 +0000
@@ -390,7 +390,9 @@ static int tda9887_set_tvnorm(struct tda
}
}
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;
}
More information about the linux-dvb
mailing list