Skip to content

Commit

Permalink
[media] si2157: Add support for spectral inversion
Browse files Browse the repository at this point in the history
This is needed for PCTV 522e support.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
  • Loading branch information
Matthias Schwarzott authored and Mauro Carvalho Chehab committed Jul 22, 2014
1 parent c3b513b commit 05024ef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/tuners/si2157.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -307,6 +309,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 */
Expand Down
5 changes: 5 additions & 0 deletions drivers/media/tuners/si2157.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ struct si2157_config {
* frontend
*/
struct dvb_frontend *fe;

/*
* Spectral Inversion
*/
bool inversion;
};

#endif
1 change: 1 addition & 0 deletions drivers/media/tuners/si2157_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ struct si2157 {
struct i2c_client *client;
struct dvb_frontend *fe;
bool active;
bool inversion;
};

/* firmare command struct */
Expand Down

0 comments on commit 05024ef

Please sign in to comment.