Em Thu, 5 Jul 2018 08:35:24 -0400 Michael Ira Krufky <mkrufky@xxxxxxxxxxx> escreveu: > On Wed, Jul 4, 2018 at 10:47 PM Mauro Carvalho Chehab > <mchehab+samsung@xxxxxxxxxx> wrote: > > > > Right now, satellite tuner drivers specify frequencies in kHz, > > while terrestrial/cable ones specify in Hz. That's confusing > > for developers. > > > > However, the main problem is that universal tuners capable > > of handling both satellite and non-satelite delivery systems > > are appearing. We end by needing to hack the drivers in > > order to support such hybrid tuners. > > > > So, convert everything to specify tuner frequencies in Hz. > > > > Plese notice that a similar patch is also needed for frontends. > > > > Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@xxxxxxxxxx> > > I'm okay with the idea behind this, but I'm not sure I'm behind the > way it's being done. What if, rather than changing every tuner range > to HZ, instead, to add a new field to indicate the magnitude. This can > be Hz, KHz, MHz, etc > > This way, the ranges would remain unaltered, and userspace can remain > unchanged. Although the patch as-is may solve a problem, it might be > better to solve it with less impact. With just those patches, userspace remains unchanged. Internally, the DVB core handles kHz conversion when needed, but it will keep exposing data from FE_GET_INFO on kHz for Satellite systems or in Hz for cable/terrestrial in a transparent way. In the future, it could be interesting to change internally the frequencies to u64 and have some new ioctls (or dtv properties) that would always handle frequencies in Hz. With those patches, doing such change should be really simple, as now the internal representation becomes independent from the external one (see patch 2/2). Thanks, Mauro