summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorHolger Waechtler <devnull@localhost>2002-11-21 11:28:25 +0000
committerHolger Waechtler <devnull@localhost>2002-11-21 11:28:25 +0000
commit5bda9268a3568563544c8c15982b206c1f80933a (patch)
tree7f58f2cc060190f19585747d8e7dd04456ad405f /linux/drivers/media
parentf5021a7def1b67f972d71eb6d4817fcf8ebe87d3 (diff)
downloadmediapointer-dvb-s2-5bda9268a3568563544c8c15982b206c1f80933a.tar.gz
mediapointer-dvb-s2-5bda9268a3568563544c8c15982b206c1f80933a.tar.bz2
- set up BLK_OUT stream mode, the demodulator works more reliable in this
mode - now we don't need to clear the interrupt bits anymore - use one frequency divisor for all bands - use high PLL charge pump current all the time
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/frontends/grundig_29504-401.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/linux/drivers/media/dvb/frontends/grundig_29504-401.c b/linux/drivers/media/dvb/frontends/grundig_29504-401.c
index ddee114c4..27bc5e982 100644
--- a/linux/drivers/media/dvb/frontends/grundig_29504-401.c
+++ b/linux/drivers/media/dvb/frontends/grundig_29504-401.c
@@ -101,24 +101,19 @@ int tsa5060_write (struct dvb_i2c_bus *i2c, u8 data [4])
* frequency offset is 36000000 Hz.
*/
static
-int tsa5060_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, u8 pwr)
+int tsa5060_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
{
u32 div;
u8 buf [4];
u8 cfg;
- if (freq < 700000000) {
- div = (36000000 + freq) / 31250;
- cfg = 0x86;
- } else {
- div = (36000000 + freq) / 166666;
- cfg = 0x88;
- }
+ div = (36000000 + freq) / 166666;
+ cfg = 0x88;
buf [0] = (div >> 8) & 0x7f;
buf [1] = div & 0xff;
buf [2] = ((div >> 10) & 0x60) | cfg;
- buf [3] = pwr << 6;
+ buf [3] = 0xc0;
return tsa5060_write (i2c, buf);
}
@@ -179,12 +174,13 @@ int apply_frontend_param (struct dvb_i2c_bus *i2c,
u8 val0x04;
u8 val0x05;
u8 val0x06;
+ int bw = p->bandwidth - BANDWIDTH_8_MHZ;
if (param->inversion != INVERSION_ON &&
param->inversion != INVERSION_OFF)
return -EINVAL;
- if (p->bandwidth < BANDWIDTH_8_MHZ || p->bandwidth > BANDWIDTH_6_MHZ)
+ if (bw < 0 || bw > 2)
return -EINVAL;
if (p->code_rate_HP != FEC_1_2 && p->code_rate_HP != FEC_2_3 &&
@@ -234,6 +230,7 @@ int apply_frontend_param (struct dvb_i2c_bus *i2c,
val0x04 = (p->transmission_mode << 2) | p->guard_interval;
val0x05 = fec_tab[p->code_rate_HP];
+
if (p->hierarchy_information != HIERARCHY_NONE)
val0x05 |= (p->code_rate_LP - FEC_1_2) << 3;
@@ -311,7 +308,7 @@ int init (struct dvb_i2c_bus *i2c)
/*l64781_writereg (i2c, 0x19, 0x92);*/
/* Everything is two's complement, soft bit and CSI_OUT too */
- l64781_writereg (i2c, 0x1e, 0x49);
+ l64781_writereg (i2c, 0x1e, 0x09);
return 0;
}
@@ -394,9 +391,8 @@ int grundig_29504_401_ioctl (struct dvb_frontend *fe,
{
struct dvb_frontend_parameters *p = arg;
- tsa5060_set_tv_freq (i2c, p->frequency, 3);
+ tsa5060_set_tv_freq (i2c, p->frequency);
apply_frontend_param (i2c, p);
-// tsa5060_set_tv_freq (i2c, p->frequency, 0);
}
case FE_GET_FRONTEND:
/* we could correct the frequency here, but...
@@ -411,13 +407,6 @@ int grundig_29504_401_ioctl (struct dvb_frontend *fe,
case FE_INIT:
return init (i2c);
- case FE_RESET:
- //reset_afc (i2c);
- apply_tps (i2c);
- l64781_readreg (i2c, 0x00); /* clear interrupt registers... */
- l64781_readreg (i2c, 0x01); /* dto. */
- break;
-
default:
dprintk ("%s: unknown command !!!\n", __FUNCTION__);
return -EINVAL;