diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-07-05 18:59:37 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-08-02 18:11:46 -0400 |
commit | 6a2a1ca34ca68025df793a1bedfba658be2b1952 (patch) | |
tree | e3d1129400b09e1675f59cdf853f2b8698ebbe13 /drivers/media/dvb-core/dvb_frontend.c | |
parent | f1b1eabff0eb3fc46b06668de8174c0f23b271fd (diff) | |
download | linux-6a2a1ca34ca68025df793a1bedfba658be2b1952.tar.gz linux-6a2a1ca34ca68025df793a1bedfba658be2b1952.tar.bz2 linux-6a2a1ca34ca68025df793a1bedfba658be2b1952.zip |
media: dvb_frontend: ensure that the step is ok for both FE and tuner
The frequency step should take into account the tuner step,
as, if tuner step is bigger than frontend step, the zigzag
algorithm won't be doing the right thing, as it will be
tuning multiple times at the same frequency.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/dvb-core/dvb_frontend.c')
-rw-r--r-- | drivers/media/dvb-core/dvb_frontend.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index fe0fae482ba4..c4e7ebfe4d29 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -939,7 +939,10 @@ static void dvb_frontend_get_frequency_limits(struct dvb_frontend *fe, static u32 dvb_frontend_get_stepsize(struct dvb_frontend *fe) { struct dtv_frontend_properties *c = &fe->dtv_property_cache; - u32 step = fe->ops.info.frequency_stepsize_hz; + u32 fe_step = fe->ops.info.frequency_stepsize_hz; + u32 tuner_step = fe->ops.tuner_ops.info.frequency_step_hz; + u32 step = max(fe_step, tuner_step); + switch (c->delivery_system) { case SYS_DVBS: case SYS_DVBS2: |