From 6089b4f5c2fbc8328dc39db09443df57bcbd40a6 Mon Sep 17 00:00:00 2001 From: Julian Scheel Date: Wed, 2 Aug 2017 11:42:54 +0200 Subject: [PATCH] wip: stv0910: Adapt symbolrate in blindscan mode The blindscan mode searches for a symbolrate-range of +/-25% around the given start value. To ensure that the highes scanned symbolrate could be received at all the frontend must be configured to set the basebandfilter for this symbolrate. Thus increase the symbolrate which is given to the frontend by 25%. --- frontends/stv0910.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontends/stv0910.c b/frontends/stv0910.c index 923190c..7cde804 100644 --- a/frontends/stv0910.c +++ b/frontends/stv0910.c @@ -1248,13 +1248,17 @@ static int set_parameters(struct dvb_frontend *fe) struct dtv_frontend_properties *p = &fe->dtv_property_cache; stop(state); - if (fe->ops.tuner_ops.set_params) - fe->ops.tuner_ops.set_params(fe); if (fe->ops.tuner_ops.get_if_frequency) fe->ops.tuner_ops.get_if_frequency(fe, &IF); state->TuneMode = p->symbol_rate & 1 ? BlindScan : ColdStart; p->symbol_rate &= ~(0x1); state->symbol_rate = p->symbol_rate; + if (state->TuneMode == BlindScan) + p->symbol_rate = max((u32)(p->symbol_rate + p->symbol_rate/4), + (u32)70000000); + + if (fe->ops.tuner_ops.set_params) + fe->ops.tuner_ops.set_params(fe); stat = start(state, p); return stat; }