Commit d4c779bc authored by Brad Love's avatar Brad Love Committed by Mauro Carvalho Chehab

media: si2168: Add spectrum inversion property

Some tuners produce inverted spectrum, but the si2168 is not
currently set up to accept it. This adds an optional parameter
to set the frontend up to receive inverted spectrum.

Parameter is optional and only boards who enable inversion
will utilize this.
Signed-off-by: default avatarBrad Love <brad@nextdimension.cc>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent a398e043
...@@ -339,6 +339,8 @@ static int si2168_set_frontend(struct dvb_frontend *fe) ...@@ -339,6 +339,8 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
memcpy(cmd.args, "\x14\x00\x0a\x10\x00\x00", 6); memcpy(cmd.args, "\x14\x00\x0a\x10\x00\x00", 6);
cmd.args[4] = delivery_system | bandwidth; cmd.args[4] = delivery_system | bandwidth;
if (dev->spectral_inversion)
cmd.args[5] |= 1;
cmd.wlen = 6; cmd.wlen = 6;
cmd.rlen = 4; cmd.rlen = 4;
ret = si2168_cmd_execute(client, &cmd); ret = si2168_cmd_execute(client, &cmd);
...@@ -798,6 +800,7 @@ static int si2168_probe(struct i2c_client *client, ...@@ -798,6 +800,7 @@ static int si2168_probe(struct i2c_client *client,
dev->ts_mode = config->ts_mode; dev->ts_mode = config->ts_mode;
dev->ts_clock_inv = config->ts_clock_inv; dev->ts_clock_inv = config->ts_clock_inv;
dev->ts_clock_gapped = config->ts_clock_gapped; dev->ts_clock_gapped = config->ts_clock_gapped;
dev->spectral_inversion = config->spectral_inversion;
dev_info(&client->dev, "Silicon Labs Si2168-%c%d%d successfully identified\n", dev_info(&client->dev, "Silicon Labs Si2168-%c%d%d successfully identified\n",
dev->version >> 24 & 0xff, dev->version >> 16 & 0xff, dev->version >> 24 & 0xff, dev->version >> 16 & 0xff,
......
...@@ -46,6 +46,9 @@ struct si2168_config { ...@@ -46,6 +46,9 @@ struct si2168_config {
/* TS clock gapped */ /* TS clock gapped */
bool ts_clock_gapped; bool ts_clock_gapped;
/* Inverted spectrum */
bool spectral_inversion;
}; };
#endif #endif
...@@ -48,6 +48,7 @@ struct si2168_dev { ...@@ -48,6 +48,7 @@ struct si2168_dev {
u8 ts_mode; u8 ts_mode;
bool ts_clock_inv; bool ts_clock_inv;
bool ts_clock_gapped; bool ts_clock_gapped;
bool spectral_inversion;
}; };
/* firmware command struct */ /* firmware command struct */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment