diff options
author | Darron Broad <darron@kewl.org> | 2008-12-18 04:28:18 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:39:17 -0500 |
commit | 6639f1e060c2d2f3331ba6bcefe8f65b623365f3 (patch) | |
tree | 0258b3165e479a5a360c8c50b35f51c771d618d9 /drivers/media/dvb/frontends/cx24116.c | |
parent | 2fac9a0f44d1950abb0e16f5d43f88866962ca3c (diff) |
V4L/DVB (9917): cx24116: change to ALGO_HW
Slow tuning, EG:
> szap-s2 -r -c 39.FTATV "1=Pgm1;Net1"
reading channels from file '39.FTATV'
zapping to 3 '1=Pgm1;Net1':
delivery DVB-S, modulation QPSK
sat 0, frequency 11140 MHz V, symbolrate 1425000, coderate 5/6, rolloff 0.35
vpid 0x0200, apid 0x0300, sid 0x0001
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
status 00 | signal c2c0 | snr 0000 | ber 00012d4a | unc 00000000 |
status 03 | signal ff80 | snr 0000 | ber 00000000 | unc 00000000 |
status 01 | signal ff80 | snr 0000 | ber 00000000 | unc 00000000 |
status 01 | signal ff80 | snr 0000 | ber 00000000 | unc 00000000 |
status 03 | signal c040 | snr 0000 | ber 00000000 | unc 00000000 |
status 03 | signal ff80 | snr 0000 | ber 00000000 | unc 00000000 |
status 01 | signal ff80 | snr 0000 | ber 00000000 | unc 00000000 |
status 03 | signal c040 | snr 0000 | ber 00000000 | unc 00000000 |
status 01 | signal ff80 | snr 0000 | ber 00000000 | unc 00000000 |
status 01 | signal ff80 | snr 0000 | ber 00000000 | unc 00000000 |
status 01 | signal c040 | snr 0000 | ber 00000000 | unc 00000000 |
status 01 | signal ff80 | snr 0000 | ber 00000000 | unc 00000000 |
status 01 | signal ff80 | snr 0000 | ber 00000000 | unc 00000000 |
status 01 | signal c040 | snr 0000 | ber 00000000 | unc 00000000 |
status 03 | signal c040 | snr 0000 | ber 00000000 | unc 00000000 |
status 1f | signal c040 | snr bb33 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
Appears to be resolved by dropping zig-zag tuning and relying on
hardware only:
> szap-s2 -r -c 39.FTATV "1=Pgm1;Net1"
reading channels from file '39.FTATV'
zapping to 3 '1=Pgm1;Net1':
delivery DVB-S, modulation QPSK
sat 0, frequency 11140 MHz V, symbolrate 1425000, coderate 5/6, rolloff 0.35
vpid 0x0200, apid 0x0300, sid 0x0001
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
status 01 | signal ff80 | snr 0000 | ber 00000000 | unc 00000000 |
status 1f | signal ff80 | snr c199 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal c040 | snr c199 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal ff80 | snr c199 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
Tuning to a weaker channel shows that the hardware recovers sync:
status 1f | signal fe40 | snr 5199 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 03 | signal fd40 | snr 5000 | ber 00000000 | unc 00000000 |
status 1f | signal fe40 | snr 5000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 03 | signal fd80 | snr 5000 | ber 00000000 | unc 00000000 |
status 01 | signal fd80 | snr 4e66 | ber 00000000 | unc 00000000 |
status 1f | signal fe40 | snr 5000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 03 | signal fe40 | snr 5000 | ber 00000000 | unc 00000000 |
status 01 | signal fd80 | snr 0000 | ber 00000000 | unc 00000000 |
status 1f | signal fe40 | snr 5199 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
Also, tuning, moving the dish and then restoring the dish also retunes.
Signed-off-by: Darron Broad <darron@kewl.org>
Cc: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/cx24116.c')
-rw-r--r-- | drivers/media/dvb/frontends/cx24116.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/cx24116.c b/drivers/media/dvb/frontends/cx24116.c index a62ae5f578b0..9b6c89e93f16 100644 --- a/drivers/media/dvb/frontends/cx24116.c +++ b/drivers/media/dvb/frontends/cx24116.c | |||
@@ -106,7 +106,7 @@ MODULE_PARM_DESC(debug, "Activates frontend debugging (default:0)"); | |||
106 | #define CX24116_HAS_SYNCLOCK (0x08) | 106 | #define CX24116_HAS_SYNCLOCK (0x08) |
107 | #define CX24116_HAS_UNKNOWN1 (0x10) | 107 | #define CX24116_HAS_UNKNOWN1 (0x10) |
108 | #define CX24116_HAS_UNKNOWN2 (0x20) | 108 | #define CX24116_HAS_UNKNOWN2 (0x20) |
109 | #define CX24116_STATUS_MASK (0x3f) | 109 | #define CX24116_STATUS_MASK (0x0f) |
110 | #define CX24116_SIGNAL_MASK (0xc0) | 110 | #define CX24116_SIGNAL_MASK (0xc0) |
111 | 111 | ||
112 | #define CX24116_DISEQC_TONEOFF (0) /* toneburst never sent */ | 112 | #define CX24116_DISEQC_TONEOFF (0) /* toneburst never sent */ |
@@ -681,7 +681,8 @@ static int cx24116_read_status(struct dvb_frontend *fe, fe_status_t *status) | |||
681 | { | 681 | { |
682 | struct cx24116_state *state = fe->demodulator_priv; | 682 | struct cx24116_state *state = fe->demodulator_priv; |
683 | 683 | ||
684 | int lock = cx24116_readreg(state, CX24116_REG_SSTATUS); | 684 | int lock = cx24116_readreg(state, CX24116_REG_SSTATUS) & |
685 | CX24116_STATUS_MASK; | ||
685 | 686 | ||
686 | dprintk("%s: status = 0x%02x\n", __func__, lock); | 687 | dprintk("%s: status = 0x%02x\n", __func__, lock); |
687 | 688 | ||
@@ -1430,6 +1431,23 @@ tuned: /* Set/Reset B/W */ | |||
1430 | return ret; | 1431 | return ret; |
1431 | } | 1432 | } |
1432 | 1433 | ||
1434 | static int cx24116_tune(struct dvb_frontend *fe, struct dvb_frontend_parameters *params, | ||
1435 | unsigned int mode_flags, unsigned int *delay, fe_status_t *status) | ||
1436 | { | ||
1437 | *delay = HZ / 5; | ||
1438 | if (params) { | ||
1439 | int ret = cx24116_set_frontend(fe, params); | ||
1440 | if (ret) | ||
1441 | return ret; | ||
1442 | } | ||
1443 | return cx24116_read_status(fe, status); | ||
1444 | } | ||
1445 | |||
1446 | static int cx24116_get_algo(struct dvb_frontend *fe) | ||
1447 | { | ||
1448 | return DVBFE_ALGO_HW; | ||
1449 | } | ||
1450 | |||
1433 | static struct dvb_frontend_ops cx24116_ops = { | 1451 | static struct dvb_frontend_ops cx24116_ops = { |
1434 | 1452 | ||
1435 | .info = { | 1453 | .info = { |
@@ -1461,6 +1479,8 @@ static struct dvb_frontend_ops cx24116_ops = { | |||
1461 | .set_voltage = cx24116_set_voltage, | 1479 | .set_voltage = cx24116_set_voltage, |
1462 | .diseqc_send_master_cmd = cx24116_send_diseqc_msg, | 1480 | .diseqc_send_master_cmd = cx24116_send_diseqc_msg, |
1463 | .diseqc_send_burst = cx24116_diseqc_send_burst, | 1481 | .diseqc_send_burst = cx24116_diseqc_send_burst, |
1482 | .get_frontend_algo = cx24116_get_algo, | ||
1483 | .tune = cx24116_tune, | ||
1464 | 1484 | ||
1465 | .set_property = cx24116_set_property, | 1485 | .set_property = cx24116_set_property, |
1466 | .get_property = cx24116_get_property, | 1486 | .get_property = cx24116_get_property, |