From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
To: Michael Ira Krufky <mkrufky@linuxtv.org>
Cc: linux-media <linux-media@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
suzuki.katsuhiro@socionext.com, Antti Palosaari <crope@iki.fi>,
Sergey Kozlov <serjk@netup.ru>, Abylay Ospan <aospan@netup.ru>,
Malcolm Priestley <tvboxspy@gmail.com>,
d.scheller.oss@gmail.com, Michael Buesch <m@bues.ch>,
Olli Salonen <olli.salonen@iki.fi>
Subject: Re: [PATCH 1/2] media: dvb: convert tuner_info frequencies to Hz
Date: Thu, 5 Jul 2018 10:13:15 -0300 [thread overview]
Message-ID: <20180705101315.70ea4ef3@coco.lan> (raw)
In-Reply-To: <CAOcJUbzxccYDYoB4ZBPNzVKcidUde56M-=G_PO4vC+Q2N-KqUQ@mail.gmail.com>
Em Thu, 5 Jul 2018 08:35:24 -0400
Michael Ira Krufky <mkrufky@linuxtv.org> escreveu:
> On Wed, Jul 4, 2018 at 10:47 PM Mauro Carvalho Chehab
> <mchehab+samsung@kernel.org> 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@kernel.org>
>
> 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
next prev parent reply other threads:[~2018-07-05 13:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-05 2:46 [PATCH 0/2] DVB: represent frequencies at tuner/frontend .info in Hz Mauro Carvalho Chehab
2018-07-05 2:46 ` [PATCH 1/2] media: dvb: convert tuner_info frequencies to Hz Mauro Carvalho Chehab
2018-07-05 12:35 ` Michael Ira Krufky
2018-07-05 13:13 ` Mauro Carvalho Chehab [this message]
2018-07-05 19:16 ` Michael Büsch
2018-07-05 21:31 ` Mauro Carvalho Chehab
2018-07-05 2:46 ` [PATCH 2/2] media: dvb: represent min/max/step/tolerance freqs in Hz Mauro Carvalho Chehab
2018-07-05 5:31 ` kbuild test robot
2018-07-05 5:31 ` kbuild test robot
2018-07-05 5:49 ` [PATCH] media: dvb: fix noderef.cocci warnings kbuild test robot
2018-07-05 11:56 ` Michael Ira Krufky
2018-07-05 5:49 ` [PATCH 2/2] media: dvb: represent min/max/step/tolerance freqs in Hz kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180705101315.70ea4ef3@coco.lan \
--to=mchehab+samsung@kernel.org \
--cc=aospan@netup.ru \
--cc=crope@iki.fi \
--cc=d.scheller.oss@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=m@bues.ch \
--cc=mchehab@infradead.org \
--cc=mkrufky@linuxtv.org \
--cc=olli.salonen@iki.fi \
--cc=serjk@netup.ru \
--cc=suzuki.katsuhiro@socionext.com \
--cc=tvboxspy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).