summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorHartmut Hackmann <devnull@localhost>2005-06-21 20:42:53 +0000
committerHartmut Hackmann <devnull@localhost>2005-06-21 20:42:53 +0000
commitd74253c906f8140f2cd31d02fedfdaeae1a1e9f8 (patch)
treec87a7a02bbcde8d9451cfabfa77ca31eef65556a /linux/drivers/media
parente4fb18bc910451df7349998cdc8da00b8edcd4df (diff)
downloadmediapointer-dvb-s2-d74253c906f8140f2cd31d02fedfdaeae1a1e9f8.tar.gz
mediapointer-dvb-s2-d74253c906f8140f2cd31d02fedfdaeae1a1e9f8.tar.bz2
- dont turn off the xtal output of tda8274/75 in sleep mode
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-dvb.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-dvb.c b/linux/drivers/media/video/saa7134/saa7134-dvb.c
index b51a03c1c..3bb6ff17e 100644
--- a/linux/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-dvb.c,v 1.15 2005/06/14 22:47:36 hhackmann Exp $
+ * $Id: saa7134-dvb.c,v 1.16 2005/06/21 20:42:53 hhackmann Exp $
*
* (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
*
@@ -150,7 +150,7 @@ static int philips_tu1216_pll_init(struct dvb_frontend *fe)
static u8 tu1216_init[] = { 0x0b, 0xf5, 0x85, 0xab };
struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tu1216_init,.len = sizeof(tu1216_init) };
- // setup PLL configuration
+ /* setup PLL configuration */
if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1)
return -EIO;
msleep(1);
@@ -167,7 +167,7 @@ static int philips_tu1216_pll_set(struct dvb_frontend *fe, struct dvb_frontend_p
int tuner_frequency = 0;
u8 band, cp, filter;
- // determine charge pump
+ /* determine charge pump */
tuner_frequency = params->frequency + 36166000;
if (tuner_frequency < 87000000)
return -EINVAL;
@@ -192,7 +192,7 @@ static int philips_tu1216_pll_set(struct dvb_frontend *fe, struct dvb_frontend_p
else
return -EINVAL;
- // determine band
+ /* determine band */
if (params->frequency < 49000000)
return -EINVAL;
else if (params->frequency < 161000000)
@@ -204,7 +204,7 @@ static int philips_tu1216_pll_set(struct dvb_frontend *fe, struct dvb_frontend_p
else
return -EINVAL;
- // setup PLL filter
+ /* setup PLL filter */
switch (params->u.ofdm.bandwidth) {
case BANDWIDTH_6_MHZ:
filter = 0;
@@ -222,11 +222,12 @@ static int philips_tu1216_pll_set(struct dvb_frontend *fe, struct dvb_frontend_p
return -EINVAL;
}
- // calculate divisor
- // ((36166000+((1000000/6)/2)) + Finput)/(1000000/6)
+ /* calculate divisor
+ * ((36166000+((1000000/6)/2)) + Finput)/(1000000/6)
+ */
tuner_frequency = (((params->frequency / 1000) * 6) + 217496) / 1000;
- // setup tuner buffer
+ /* setup tuner buffer */
tuner_buf[0] = (tuner_frequency >> 8) & 0x7f;
tuner_buf[1] = tuner_frequency & 0xff;
tuner_buf[2] = 0xca;
@@ -266,7 +267,7 @@ static struct tda1004x_config philips_tu1216_config = {
static int philips_fmd1216_pll_init(struct dvb_frontend *fe)
{
struct saa7134_dev *dev = fe->dvb->priv;
- // this message is to set up ATC and ALC
+ /* this message is to set up ATC and ALC */
static u8 fmd1216_init[] = { 0x0b, 0xdc, 0x9c, 0xa0 };
struct i2c_msg tuner_msg = {.addr = 0x61,.flags = 0,.buf = fmd1216_init,.len = sizeof(fmd1216_init) };
@@ -280,7 +281,7 @@ static int philips_fmd1216_pll_init(struct dvb_frontend *fe)
static void philips_fmd1216_analog(struct dvb_frontend *fe)
{
struct saa7134_dev *dev = fe->dvb->priv;
- // this message actually turns the tuner back to analog mode
+ /* this message actually turns the tuner back to analog mode */
static u8 fmd1216_init[] = { 0x0b, 0xdc, 0x9c, 0x60 };
struct i2c_msg tuner_msg = {.addr = 0x61,.flags = 0,.buf = fmd1216_init,.len = sizeof(fmd1216_init) };
@@ -302,11 +303,11 @@ static int philips_fmd1216_pll_set(struct dvb_frontend *fe, struct dvb_frontend_
int divider = 0;
u8 band, mode, cp;
- // determine charge pump
+ /* determine charge pump */
tuner_frequency = params->frequency + 36130000;
if (tuner_frequency < 87000000)
return -EINVAL;
- // low band
+ /* low band */
else if (tuner_frequency < 180000000) {
band = 1;
mode = 7;
@@ -315,7 +316,7 @@ static int philips_fmd1216_pll_set(struct dvb_frontend *fe, struct dvb_frontend_
band = 1;
mode = 6;
cp = 1;
- // mid band
+ /* mid band */
} else if (tuner_frequency < 366000000) {
if (params->u.ofdm.bandwidth == BANDWIDTH_8_MHZ) {
band = 10;
@@ -332,7 +333,7 @@ static int philips_fmd1216_pll_set(struct dvb_frontend *fe, struct dvb_frontend_
}
mode = 6;
cp = 1;
- // high band
+ /* high band */
} else if (tuner_frequency < 662000000) {
if (params->u.ofdm.bandwidth == BANDWIDTH_8_MHZ) {
band = 12;
@@ -359,11 +360,11 @@ static int philips_fmd1216_pll_set(struct dvb_frontend *fe, struct dvb_frontend_
cp = 1;
}
- // calculate divisor
- // ((36166000 + Finput) / 166666) rounded!
+ /* calculate divisor */
+ /* ((36166000 + Finput) / 166666) rounded! */
divider = (tuner_frequency + 83333) / 166667;
- // setup tuner buffer
+ /* setup tuner buffer */
tuner_buf[0] = (divider >> 8) & 0x7f;
tuner_buf[1] = divider & 0xff;
tuner_buf[2] = 0x80 | (cp << 6) | (mode << 3) | 4;
@@ -453,7 +454,7 @@ static int philips_tda827x_pll_set(struct dvb_frontend *fe, struct dvb_frontend_
case BANDWIDTH_7_MHZ:
if_freq = 4500000;
break;
- default: // 8 MHz or Auto
+ default: /* 8 MHz or Auto */
if_freq = 5000000;
break;
}
@@ -500,7 +501,7 @@ static int philips_tda827x_pll_set(struct dvb_frontend *fe, struct dvb_frontend_
static void philips_tda827x_pll_sleep(struct dvb_frontend *fe)
{
struct saa7134_dev *dev = fe->dvb->priv;
- static u8 tda827x_sleep[] = { 0x30, 0xc0};
+ static u8 tda827x_sleep[] = { 0x30, 0xd0};
struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tda827x_sleep,
.len = sizeof(tda827x_sleep) };
i2c_transfer(&dev->i2c_adap, &tuner_msg, 1);