summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/dib8000.c
diff options
context:
space:
mode:
authorOlivier Grenie2011-07-04 17:33:54 +0200
committerMauro Carvalho Chehab2011-11-24 23:49:33 +0100
commit1f6bfcc752445ea03cb63c0c6bf5ee54d0fa73d5 (patch)
treea35274d46c25d35c7bdd6fffaa8013b39f45c63c /drivers/media/dvb/frontends/dib8000.c
parent[media] DiBcom: correct warnings (diff)
downloadkernel-qcow2-linux-1f6bfcc752445ea03cb63c0c6bf5ee54d0fa73d5.tar.gz
kernel-qcow2-linux-1f6bfcc752445ea03cb63c0c6bf5ee54d0fa73d5.tar.xz
kernel-qcow2-linux-1f6bfcc752445ea03cb63c0c6bf5ee54d0fa73d5.zip
[media] DiB8000: improve the tuning and the SNR monitoring
This patches improves the tuning of the dib8000 and correct the monitoringr of the SNR.The patch allows to faster detect that there is no ISDB-T channel on the wanted frequency. Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr> Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/dib8000.c')
-rw-r--r--drivers/media/dvb/frontends/dib8000.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/dib8000.c b/drivers/media/dvb/frontends/dib8000.c
index fe284d5292f5..96c6a61f5b06 100644
--- a/drivers/media/dvb/frontends/dib8000.c
+++ b/drivers/media/dvb/frontends/dib8000.c
@@ -2215,7 +2215,7 @@ static int dib8000_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par
((state->fe[0]->dtv_property_cache.layer[1].segment_count == 0) ||
((state->fe[0]->dtv_property_cache.isdbt_layer_enabled & (2 << 0)) == 0)) &&
((state->fe[0]->dtv_property_cache.layer[2].segment_count == 0) || ((state->fe[0]->dtv_property_cache.isdbt_layer_enabled & (3 << 0)) == 0)))) {
- int i = 80000;
+ int i = 100;
u8 found = 0;
u8 tune_failed = 0;
@@ -2243,6 +2243,7 @@ static int dib8000_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par
default:
dprintk("unhandled autosearch result");
case 1:
+ tune_failed |= (1 << index_frontend);
dprintk("autosearch failed for the frontend%i", index_frontend);
break;
}
@@ -2401,7 +2402,7 @@ static int dib8000_read_snr(struct dvb_frontend *fe, u16 * snr)
for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++)
snr_master += dib8000_get_snr(state->fe[index_frontend]);
- if (snr_master != 0) {
+ if ((snr_master >> 16) != 0) {
snr_master = 10*intlog10(snr_master>>16);
*snr = snr_master / ((1 << 24) / 10);
}