summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@hauppauge.com>2010-07-12 15:31:56 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 01:17:22 -0200
commitcc355753e860559744baf5ddb2fcf427433e0346 (patch)
treee1ac13f8195bfb4334e210b3a42ec3af5728d437
parent435b4f7897b7e2f233c313e65ac82bd1d3599c43 (diff)
[media] cx231xx: Clear avmode bits before setting
We need to clear out the field before setting individual bits, or else we end up with a union of whatever was there and what we are trying to set. For example, switching to digital mode ends up being 0x30 instead of 0x10 if we were previously in analog tv mode. Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/cx231xx/cx231xx-avcore.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-avcore.c b/drivers/media/video/cx231xx/cx231xx-avcore.c
index 362a4311cdee..146e52e318eb 100644
--- a/drivers/media/video/cx231xx/cx231xx-avcore.c
+++ b/drivers/media/video/cx231xx/cx231xx-avcore.c
@@ -2392,6 +2392,7 @@ int cx231xx_set_power_mode(struct cx231xx *dev, enum AV_MODE mode)
msleep(PWR_SLEEP_INTERVAL);
}
+ tmp &= (~PWR_AV_MODE);
tmp |= POLARIS_AVMODE_DIGITAL | I2C_DEMOD_EN;
value[0] = (u8) tmp;
value[1] = (u8) (tmp >> 8);