[linux-dvb] [PATCH] Fix the min/max frequencies of some DVB-C frontends
abraham.manu at gmail.com
Wed Aug 8 10:43:38 CEST 2007
On 8/8/07, Oliver Endriss <o.endriss at gmx.de> wrote:
> Manu Abraham wrote:
> > On 8/6/07, Michael Krufky <mkrufky at linuxtv.org> wrote:
> > >
> > > Now I'm beginning to have doubts about Oliver's original patch:
> > >
> > > dvb_frontend: Range check of frequency and symbol rate
> > > http://linuxtv.org/hg/v4l-dvb/rev/8186a34dd0a6
> > >
> > > Should we be checking fe->ops.tuner_ops.info.frequency_min|max , instead of
> > > fe->ops.info.frequency_min|max ???
> > Ideally, what's provided by the demod and not the tuner max/min. The
> > tuners max/min should be checked by the demod on setting params.
> > The upper/lower limits in the demodulator drivers, came from the
> > concept of a frontend as a whole. Independant bounds do not make sense
> > (except internally -- It is the demod driver that which sets
> > parameters for the tuner. The external world doesn't need to know
> > what's the limit of the tuner, but only of the frontend as a whole).
> > Ideally, the demodulator should just demodulate only. There are some
> > cases, there are some cases which are not.
> Ok, I'm trying to put all pieces together:
> There might be cases where demod and tuner have different limits.
> So FE_GET_INFO and dvb_frontend_check_parameters() should use the
> 'smallest common bandwidth':
> freq_min = max(fe->ops.info.frequency_min, fe->ops.tuner_ops.info.frequency_min);
> if (fe->ops.info.frequency_max == 0)
> freq_max = fe->ops.tuner_ops.info.frequency_max;
> else if (fe->ops.tuner_ops.info.frequency_max == 0)
> freq_max = fe->ops.info.frequency_max;
> freq_max = min(fe->ops.info.frequency_max, fe->ops.tuner_ops.info.frequency_max);
> if (freq_min == 0 || freq_max == 0)
> printk(KERN_WARNING "frequency limits undefined - please fix the driver\n");
> - A tuner-only driver must set fe->ops.tuner_ops.info.
> - Monolithic drivers must set fe->ops.tuner_ops.info or fe->ops.info
> (or both).
Currently, with our status that's the best we can do. Probably, we can
hope to have better drivers in the future.
More information about the linux-dvb