Skip to content

Commit

Permalink
[media] cx231xx: Clear avmode bits before setting
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Devin Heitmueller authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent 435b4f7 commit cc35575
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/video/cx231xx/cx231xx-avcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cc35575

Please sign in to comment.