From: Antti Palosaari <crope@iki.fi>
To: Matthias Schwarzott <zzam@gentoo.org>, linux-media@vger.kernel.org
Subject: Re: [PATCH 3/3] si2157: Add support for spectral inversion
Date: Sat, 19 Jul 2014 05:25:08 +0300 [thread overview]
Message-ID: <53C9D704.8080404@iki.fi> (raw)
In-Reply-To: <1405452876-8543-3-git-send-email-zzam@gentoo.org>
Patch applied.
http://git.linuxtv.org/cgit.cgi/anttip/media_tree.git/log/?h=silabs
However, it is usually demod which fixes inverted IF. There was only one
other tuner driver having IF spectrum inversion, Mxl5007t.
Logically looking signal goes from tuner to demod and when it goes out
from tuner it is correct, but when it arrives to demod input it is
inverted (on case IF wiring is cross-connected). So it even logically
belongs to demod, IMHO.
regards
Antti
On 07/15/2014 10:34 PM, Matthias Schwarzott wrote:
> This is needed for PCTV 522e support.
>
> Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
> ---
> drivers/media/tuners/si2157.c | 3 +++
> drivers/media/tuners/si2157.h | 5 +++++
> drivers/media/tuners/si2157_priv.h | 1 +
> 3 files changed, 9 insertions(+)
>
> diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
> index 91808e8..06153fa 100644
> --- a/drivers/media/tuners/si2157.c
> +++ b/drivers/media/tuners/si2157.c
> @@ -253,6 +253,8 @@ static int si2157_set_params(struct dvb_frontend *fe)
>
> memcpy(cmd.args, "\x14\x00\x03\x07\x00\x00", 6);
> cmd.args[4] = delivery_system | bandwidth;
> + if (s->inversion)
> + cmd.args[5] = 0x01;
> cmd.wlen = 6;
> cmd.rlen = 1;
> ret = si2157_cmd_execute(s, &cmd);
> @@ -314,6 +316,7 @@ static int si2157_probe(struct i2c_client *client,
>
> s->client = client;
> s->fe = cfg->fe;
> + s->inversion = cfg->inversion;
> mutex_init(&s->i2c_mutex);
>
> /* check if the tuner is there */
> diff --git a/drivers/media/tuners/si2157.h b/drivers/media/tuners/si2157.h
> index 4465c46..6da4d5d 100644
> --- a/drivers/media/tuners/si2157.h
> +++ b/drivers/media/tuners/si2157.h
> @@ -29,6 +29,11 @@ struct si2157_config {
> * frontend
> */
> struct dvb_frontend *fe;
> +
> + /*
> + * Spectral Inversion
> + */
> + bool inversion;
> };
>
> #endif
> diff --git a/drivers/media/tuners/si2157_priv.h b/drivers/media/tuners/si2157_priv.h
> index db79f3c..3ddab5e 100644
> --- a/drivers/media/tuners/si2157_priv.h
> +++ b/drivers/media/tuners/si2157_priv.h
> @@ -26,6 +26,7 @@ struct si2157 {
> struct i2c_client *client;
> struct dvb_frontend *fe;
> bool active;
> + bool inversion;
> };
>
> /* firmare command struct */
>
--
http://palosaari.fi/
next prev parent reply other threads:[~2014-07-19 2:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1405411120-9569-1-git-send-email-zzam@gentoo.org>
2014-07-15 7:58 ` [PATCH 1/2] si2157: Add support for spectrum inversion Matthias Schwarzott
2014-07-15 11:08 ` Antti Palosaari
2014-07-15 19:26 ` Matthias Schwarzott
2014-07-15 19:34 ` [PATCH 1/3] cxusb: Prepare for si2157 driver getting more parameters Matthias Schwarzott
2014-07-19 2:15 ` Antti Palosaari
2014-07-15 19:34 ` [PATCH 2/3] em28xx-dvb: " Matthias Schwarzott
2014-07-19 2:16 ` Antti Palosaari
2014-07-15 19:34 ` [PATCH 3/3] si2157: Add support for spectral inversion Matthias Schwarzott
2014-07-19 2:25 ` Antti Palosaari [this message]
2014-07-15 7:58 ` [PATCH 2/2] si2157: Add get_if_frequency callback Matthias Schwarzott
2014-07-15 11:08 ` Antti Palosaari
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=53C9D704.8080404@iki.fi \
--to=crope@iki.fi \
--cc=linux-media@vger.kernel.org \
--cc=zzam@gentoo.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 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).