]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
[media] si2157: Add support for spectral inversion
authorMatthias Schwarzott <zzam@gentoo.org>
Tue, 15 Jul 2014 19:34:36 +0000 (16:34 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 22 Jul 2014 00:29:06 +0000 (21:29 -0300)
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>
drivers/media/tuners/si2157.c
drivers/media/tuners/si2157.h
drivers/media/tuners/si2157_priv.h

index 4730f69cac01cf1891211cea346fd55e0bce42ba..f6199832b4cc5c42bf1f23d6a7c7cbefb64747ec 100644 (file)
@@ -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);
@@ -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 */
index 4465c46baf0e489cb4e26b24e2b8f6daa44538b0..6da4d5d1c8178b25ad5e3965e5a90b06dbd2865f 100644 (file)
@@ -29,6 +29,11 @@ struct si2157_config {
         * frontend
         */
        struct dvb_frontend *fe;
+
+       /*
+        * Spectral Inversion
+        */
+       bool inversion;
 };
 
 #endif
index db79f3c40e4cc3acadf32350772ab8c9bbdf3ccc..3ddab5e6b50038cbb9034f556fb6f77edec5308f 100644 (file)
@@ -26,6 +26,7 @@ struct si2157 {
        struct i2c_client *client;
        struct dvb_frontend *fe;
        bool active;
+       bool inversion;
 };
 
 /* firmare command struct */