summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tea5767.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/tea5767.c')
-rw-r--r--linux/drivers/media/video/tea5767.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/linux/drivers/media/video/tea5767.c b/linux/drivers/media/video/tea5767.c
index 38061f94e..f34dc46b0 100644
--- a/linux/drivers/media/video/tea5767.c
+++ b/linux/drivers/media/video/tea5767.c
@@ -2,7 +2,7 @@
* For Philips TEA5767 FM Chip used on some TV Cards like Prolink Pixelview
* I2C address is allways 0xC0.
*
- * $Id: tea5767.c,v 1.15 2005/07/02 14:53:02 nsh Exp $
+ * $Id: tea5767.c,v 1.16 2005/07/05 17:37:35 nsh Exp $
*
* Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@brturbo.com.br)
* This code is placed under the terms of the GNU General Public License
@@ -196,8 +196,7 @@ static void set_radio_freq(struct i2c_client *c, unsigned int frq)
unsigned div;
int rc;
- if (tuner_debug)
- printk(PREFIX "radio freq counter %d\n", frq);
+ tuner_dbg (PREFIX "radio freq counter %d\n", frq);
/* Rounds freq to next decimal value - for 62.5 KHz step */
/* frq = 20*(frq/16)+radio_frq[frq%16]; */
@@ -207,48 +206,41 @@ static void set_radio_freq(struct i2c_client *c, unsigned int frq)
TEA5767_ST_NOISE_CTL | TEA5767_JAPAN_BAND;
buffer[4] = 0;
- if (t->mode & T_STANDBY) {
- if (tuner_debug)
- tuner_dbg("TEA5767 set to standby mode\n");
+ if (t->mode == T_STANDBY) {
+ tuner_dbg("TEA5767 set to standby mode\n");
buffer[3] |= TEA5767_STDBY;
}
if (t->audmode == V4L2_TUNER_MODE_MONO) {
- if (tuner_debug)
- tuner_dbg("TEA5767 set to mono\n");
+ tuner_dbg("TEA5767 set to mono\n");
buffer[2] |= TEA5767_MONO;
} else {
- if (tuner_debug)
- tuner_dbg("TEA5767 set to stereo\n");
+ tuner_dbg("TEA5767 set to stereo\n");
}
/* Should be replaced */
switch (TEA5767_HIGH_LO_32768) {
case TEA5767_HIGH_LO_13MHz:
- if (tuner_debug)
- tuner_dbg ("TEA5767 radio HIGH LO inject xtal @ 13 MHz\n");
+ tuner_dbg ("TEA5767 radio HIGH LO inject xtal @ 13 MHz\n");
buffer[2] |= TEA5767_HIGH_LO_INJECT;
buffer[4] |= TEA5767_PLLREF_ENABLE;
div = (frq * 4 / 16 + 700 + 225 + 25) / 50;
break;
case TEA5767_LOW_LO_13MHz:
- if (tuner_debug)
- tuner_dbg ("TEA5767 radio LOW LO inject xtal @ 13 MHz\n");
+ tuner_dbg ("TEA5767 radio LOW LO inject xtal @ 13 MHz\n");
buffer[4] |= TEA5767_PLLREF_ENABLE;
div = (frq * 4 / 16 - 700 - 225 + 25) / 50;
break;
case TEA5767_LOW_LO_32768:
- if (tuner_debug)
- tuner_dbg ("TEA5767 radio LOW LO inject xtal @ 32,768 MHz\n");
+ tuner_dbg ("TEA5767 radio LOW LO inject xtal @ 32,768 MHz\n");
buffer[3] |= TEA5767_XTAL_32768;
/* const 700=4000*175 Khz - to adjust freq to right value */
div = (1000 * (frq * 4 / 16 - 700 - 225) + 16384) >> 15;
break;
case TEA5767_HIGH_LO_32768:
default:
- if (tuner_debug)
- tuner_dbg ("TEA5767 radio HIGH LO inject xtal @ 32,768 MHz\n");
+ tuner_dbg ("TEA5767 radio HIGH LO inject xtal @ 32,768 MHz\n");
buffer[2] |= TEA5767_HIGH_LO_INJECT;
buffer[3] |= TEA5767_XTAL_32768;
@@ -290,8 +282,7 @@ static int tea5767_stereo(struct i2c_client *c)
rc = buffer[2] & TEA5767_STEREO_MASK;
- if (tuner_debug)
- tuner_dbg("TEA5767 radio ST GET = %02x\n", rc);
+ tuner_dbg("TEA5767 radio ST GET = %02x\n", rc);
return ((buffer[2] & TEA5767_STEREO_MASK) ? V4L2_TUNER_SUB_STEREO : 0);
}