summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tda9887.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/tda9887.c')
-rw-r--r--linux/drivers/media/video/tda9887.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c
index e5c67036f..e30546f4f 100644
--- a/linux/drivers/media/video/tda9887.c
+++ b/linux/drivers/media/video/tda9887.c
@@ -384,8 +384,8 @@ static int tda9887_set_tvnorm(struct tda9887 *t, char *buf)
return 0;
}
-static unsigned int port1 = 1;
-static unsigned int port2 = 1;
+static unsigned int port1 = UNSET;
+static unsigned int port2 = UNSET;
static unsigned int qss = UNSET;
static unsigned int adjust = 0x10;
module_param(port1, int, 0644);
@@ -395,10 +395,19 @@ module_param(adjust, int, 0644);
static int tda9887_set_insmod(struct tda9887 *t, char *buf)
{
- if (port1)
- buf[1] |= cOutputPort1Inactive;
- if (port2)
- buf[1] |= cOutputPort2Inactive;
+ if (UNSET != port1) {
+ if (port1)
+ buf[1] |= cOutputPort1Inactive;
+ else
+ buf[1] &= ~cOutputPort1Inactive;
+ }
+ if (UNSET != port2) {
+ if (port2)
+ buf[1] |= cOutputPort2Inactive;
+ else
+ buf[1] &= ~cOutputPort2Inactive;
+ }
+
if (UNSET != qss) {
if (qss)
buf[1] |= cQSS;
@@ -413,10 +422,15 @@ static int tda9887_set_insmod(struct tda9887 *t, char *buf)
static int tda9887_set_config(struct tda9887 *t, char *buf)
{
- if (t->config & TDA9887_PORT1)
+ if (t->config & TDA9887_PORT1_ACTIVE)
+ buf[1] &= ~cOutputPort1Inactive;
+ if (t->config & TDA9887_PORT1_INACTIVE)
buf[1] |= cOutputPort1Inactive;
- if (t->config & TDA9887_PORT2)
+ if (t->config & TDA9887_PORT2_ACTIVE)
+ buf[1] &= ~cOutputPort2Inactive;
+ if (t->config & TDA9887_PORT2_INACTIVE)
buf[1] |= cOutputPort2Inactive;
+
if (t->config & TDA9887_QSS)
buf[1] |= cQSS;
if (t->config & TDA9887_INTERCARRIER)
@@ -539,6 +553,8 @@ static int tda9887_configure(struct tda9887 *t)
int rc;
memset(buf,0,sizeof(buf));
+ buf[1] |= cOutputPort1Inactive;
+ buf[1] |= cOutputPort2Inactive;
tda9887_set_tvnorm(t,buf);
if (UNSET != t->pinnacle_id) {
tda9887_set_pinnacle(t,buf);