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.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/linux/drivers/media/video/tea5767.c b/linux/drivers/media/video/tea5767.c
index fb0e1616a..4f28fead0 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.11 2005/06/21 15:40:33 mchehab Exp $
+ * $Id: tea5767.c,v 1.12 2005/06/28 23:41:47 mkrufky Exp $
*
* Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@brturbo.com.br)
* This code is placed under the terms of the GNU General Public License
@@ -53,10 +53,10 @@ extern unsigned int tuner_debug;
/* Third register */
/* Station search from botton to up */
-#define TEA5767_SEARCH_UP 0x80
+#define TEA5767_SEARCH_UP 0x80
/* Searches with ADC output = 10 */
-#define TEA5767_SRCH_HIGH_LVL 0x60
+#define TEA5767_SRCH_HIGH_LVL 0x60
/* Searches with ADC output = 10 */
#define TEA5767_SRCH_MID_LVL 0x40
@@ -68,7 +68,7 @@ extern unsigned int tuner_debug;
#define TEA5767_HIGH_LO_INJECT 0x10
/* Disable stereo */
-#define TEA5767_MONO 0x08
+#define TEA5767_MONO 0x08
/* Disable right channel and turns to mono */
#define TEA5767_MUTE_RIGHT 0x04
@@ -84,7 +84,7 @@ extern unsigned int tuner_debug;
#define TEA5767_STDBY 0x40
/* Japan freq (76-108 MHz. If disabled, 87.5-108 MHz */
-#define TEA5767_JAPAN_BAND 0x20
+#define TEA5767_JAPAN_BAND 0x20
/* Unselected means 32.768 KHz freq as reference. Otherwise Xtal at 13 MHz */
#define TEA5767_XTAL_32768 0x10
@@ -147,12 +147,12 @@ static void set_tv_freq(struct i2c_client *c, unsigned int freq)
static void tea5767_status_dump(unsigned char *buffer)
{
unsigned int div, frq;
-
+
if (TEA5767_READY_FLAG_MASK & buffer[0])
printk(PREFIX "Ready Flag ON\n");
else
printk(PREFIX "Ready Flag OFF\n");
-
+
if (TEA5767_BAND_LIMIT_MASK & buffer[0])
printk(PREFIX "Tuner at band limit\n");
else
@@ -177,7 +177,7 @@ static void tea5767_status_dump(unsigned char *buffer)
}
buffer[0] = (div>>8) & 0x3f;
buffer[1] = div & 0xff;
-
+
printk(PREFIX "Frequency %d.%03d KHz (divider = 0x%04x)\n",
frq/1000,frq%1000,div);
@@ -187,7 +187,7 @@ static void tea5767_status_dump(unsigned char *buffer)
printk(PREFIX "Mono\n");
printk(PREFIX "IF Counter = %d\n",buffer[2] & TEA5767_IF_CNTR_MASK);
-
+
printk(PREFIX "ADC Level = %d\n",(buffer[3] & TEA5767_ADC_LEVEL_MASK)>>4);
printk(PREFIX "Chip ID = %d\n",(buffer[3] & TEA5767_CHIP_ID_MASK));
@@ -228,7 +228,7 @@ static void set_radio_freq(struct i2c_client *c, unsigned int frq)
break;
case TEA5767_LOW_LO_13MHz:
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;
@@ -241,7 +241,7 @@ static void set_radio_freq(struct i2c_client *c, unsigned int frq)
case TEA5767_HIGH_LO_32768:
default:
tuner_dbg("TEA5767 radio HIGH LO inject xtal @ 32,768 MHz\n");
-
+
buffer[2] |= TEA5767_HIGH_LO_INJECT;
buffer[3] |= TEA5767_XTAL_32768;
div = (1000*(frq*4/16+700+225)+16384)>>15;
@@ -266,7 +266,7 @@ static int tea5767_signal(struct i2c_client *c)
memset(buffer,0,sizeof(buffer));
if (5 != (rc = i2c_master_recv(c,buffer,5)))
tuner_warn ( "i2c i/o error: rc == %d (should be 5)\n",rc);
-
+
return ((buffer[3] & TEA5767_ADC_LEVEL_MASK) <<(13-4));
}
@@ -279,12 +279,12 @@ static int tea5767_stereo(struct i2c_client *c)
memset(buffer,0,sizeof(buffer));
if (5 != (rc = i2c_master_recv(c,buffer,5)))
tuner_warn ( "i2c i/o error: rc == %d (should be 5)\n",rc);
-
+
rc = buffer[2] & TEA5767_STEREO_MASK;
if ( tuner_debug )
tuner_dbg("TEA5767 radio ST GET = %02x\n", rc);
-
+
return ( (buffer[2] & TEA5767_STEREO_MASK) ? V4L2_TUNER_SUB_STEREO: 0);
}
@@ -300,7 +300,7 @@ int tea_detection(struct i2c_client *c)
}
/* If all bytes are the same then it's a TV tuner and not a tea5767 chip. */
- if (buffer[0] == buffer[1] && buffer[0] == buffer[2] &&
+ if (buffer[0] == buffer[1] && buffer[0] == buffer[2] &&
buffer[0] == buffer[3] && buffer[0] == buffer[4]) {
tuner_warn ( "All bytes are equal. It is not a TEA5767\n" );
return EINVAL;
@@ -309,7 +309,7 @@ int tea_detection(struct i2c_client *c)
/* Status bytes:
* Byte 4: bit 3:1 : CI (Chip Identification) == 0
* bit 0 : internally set to 0
- * Byte 5: bit 7:0 : == 0
+ * Byte 5: bit 7:0 : == 0
*/
if (!((buffer[3] & 0x0f) == 0x00) && (buffer[4] == 0x00)) {