From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Antti Palosaari <crope@iki.fi>
Cc: Brad Love <brad@nextdimension.cc>, linux-media@vger.kernel.org
Subject: Re: [PATCH v3 04/14] si2157: Add analog tuning related functions
Date: Thu, 19 Dec 2019 14:13:00 +0100 [thread overview]
Message-ID: <20191219141300.3ffbdb1e@kernel.org> (raw)
In-Reply-To: <f2375be1-5bb2-ef59-ecd9-a3a8f6081b99@iki.fi>
Em Sun, 24 Nov 2019 07:09:07 +0200
Antti Palosaari <crope@iki.fi> escreveu:
> On 11/14/19 10:03 PM, Brad Love wrote:
> > Include set_analog_params, get_frequency, and get_bandwidth.
> >
> > Tested with NTSC and PAL standards via ch3/4 generator. Other standards
> > are included, but are untested due to lack of generator.
> >
> > Signed-off-by: Brad Love <brad@nextdimension.cc>
> > ---
> > Changes since v1:
> > - remove __func__ from dev_dbg macros
>
> After all it looks pretty simply, but implementation is not done that
> simply. Crazy RF/IF offsets, impossible values and so.
>
> I think you need to study some tuner basics:
> * what IF frequency is, why, and so
> * IF vs. BW, what is relation, what are possible values
> * Down conversion RF to IF. OK, *on that case* firmware covers PLL, but
> it is fundamental. So basics of integer-N and fractional-N PLL is always
> you must to know.
> * Filtering. Especially IF filtering, which is generally low-pass
> filtering. Think possible filters when selecting IF.
For me, the implementation seems to make sense. I mean, for analog TV, both
channel bandwidth and chroma/audio sub-carrier IF depends on the TV standard
only.
So, for NTSC and PAL/M/N/N', bandwidth is always 6MHz. For other standards, it
may be either 6MHz, 7MHz or 8MHz. the actual bandwidth depends if it is
a channel at VHF or at UHF range.
So, this part of the patch sounds OK to me.
The IF is actually a little trickier. Yet, if you take a lok on other
tuners, like drivers/media/tuners/tda827x.c, it is up tot he tuner to
automatically set the IF that will work for each video standard:
static void tda827x_set_std(struct dvb_frontend *fe,
struct analog_parameters *params)
{
struct tda827x_priv *priv = fe->tuner_priv;
char *mode;
priv->lpsel = 0;
if (params->std & V4L2_STD_MN) {
priv->sgIF = 92;
priv->lpsel = 1;
mode = "MN";
} else if (params->std & V4L2_STD_B) {
priv->sgIF = 108;
mode = "B";
...
static int tda827xo_set_analog_params(struct dvb_frontend *fe,
struct analog_parameters *params)
{
...
N = freq + priv->sgIF;
In other words, for analog TV, the tuner will always receive the
channel central frequency, with may vary depending on the video
standard, and will adjust it to tune at the right channel, using the
per-standard IF (if needed), as, on most tuner drivers, the tunning
frequency should be either initial frequency or the main carrier
frequency, and not the center frequency.
Cheers,
Mauro
next prev parent reply other threads:[~2019-12-19 13:13 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-14 20:03 [PATCH v3 00/14] si2157: Analog tuning and optimizations Brad Love
2019-11-14 20:03 ` [PATCH v3 01/14] si2157: Enable tuner status flags Brad Love
2019-11-14 20:03 ` [PATCH v3 02/14] si2157: Check error status bit on cmd execute Brad Love
2019-11-15 11:09 ` Antti Palosaari
2019-11-14 20:03 ` [PATCH v3 03/14] si2157: Better check for running tuner in init Brad Love
2019-11-15 11:16 ` Antti Palosaari
2019-11-14 20:03 ` [PATCH v3 04/14] si2157: Add analog tuning related functions Brad Love
2019-11-24 5:09 ` Antti Palosaari
2019-12-19 13:13 ` Mauro Carvalho Chehab [this message]
2019-12-20 15:32 ` Antti Palosaari
2020-02-01 21:20 ` Brad Love
2019-11-14 20:03 ` [PATCH v3 05/14] si2157: Briefly wait for tuning operation to complete Brad Love
2019-11-15 11:31 ` Antti Palosaari
2019-11-14 20:04 ` [PATCH v3 06/14] si2157: module debug option to wait on signal lock Brad Love
2019-11-14 20:04 ` [PATCH v3 07/14] cx23885: Add analog frontend to Hauppauge QuadHD Brad Love
2019-11-14 20:04 ` [PATCH v3 08/14] cx23885: Add analog frontend to 1265_K4 Brad Love
2019-11-14 20:04 ` [PATCH v3 09/14] cx23885: Add analog frontend to HVR5525 Brad Love
2019-11-14 20:04 ` [PATCH v3 10/14] cx23885: Add i2c device analog tuner support Brad Love
2019-11-14 20:04 ` [PATCH v3 11/14] cx231xx: " Brad Love
2019-11-17 6:53 ` kbuild test robot
2019-11-17 6:53 ` [PATCH] cx231xx: fix semicolon.cocci warnings kbuild test robot
2019-11-14 20:04 ` [PATCH v3 12/14] si2157: add on-demand rf strength func Brad Love
2019-11-15 20:23 ` Antti Palosaari
2019-11-14 20:04 ` [PATCH v3 13/14] lgdt3306a: Add CNR v5 stat Brad Love
2019-11-14 20:04 ` [PATCH v3 14/14] cx25840: Register labeling, chip specific correction Brad Love
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=20191219141300.3ffbdb1e@kernel.org \
--to=mchehab+huawei@kernel.org \
--cc=brad@nextdimension.cc \
--cc=crope@iki.fi \
--cc=linux-media@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.