aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7115.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-03-14 14:33:33 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-21 11:53:41 -0500
commitf89982a978974cc2fb74f512d7ec7438e0e851ea (patch)
treeda9f6499f89f73fd0308f6ec98839ed41d5bba20 /drivers/media/video/saa7115.c
parentf5762e441d5022ecc5b66b5fe54e41e2ac5d02be (diff)
V4L/DVB (3514): SAA7113 doesn't have auto std chroma detection mode
This patch makes chroma standard selection based at possible values, according with datasheet. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7115.c')
-rw-r--r--drivers/media/video/saa7115.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c
index 7050d81c0242..498d9aaec1e5 100644
--- a/drivers/media/video/saa7115.c
+++ b/drivers/media/video/saa7115.c
@@ -713,6 +713,35 @@ static void saa7115_set_v4lstd(struct i2c_client *client, v4l2_std_id std)
713 saa7115_writeregs(client, saa7115_cfg_50hz_video); 713 saa7115_writeregs(client, saa7115_cfg_50hz_video);
714 } 714 }
715 715
716 /* Register 0E - Bits D6-D4 on NO-AUTO mode
717 (SAA7113 doesn't have auto mode)
718 50 Hz / 625 lines 60 Hz / 525 lines
719 000 PAL BGDHI (4.43Mhz) NTSC M (3.58MHz)
720 001 NTSC 4.43 (50 Hz) PAL 4.43 (60 Hz)
721 010 Combination-PAL N (3.58MHz) NTSC 4.43 (60 Hz)
722 011 NTSC N (3.58MHz) PAL M (3.58MHz)
723 100 reserved NTSC-Japan (3.58MHz)
724 */
725 if (state->ident == V4L2_IDENT_SAA7113) {
726 u8 reg = saa7115_read(client, 0x0e) & 0x8f;
727
728 if (std & V4L2_STD_PAL) {
729 if (std == V4L2_STD_PAL_M) {
730 reg|=0x30;
731 } else if (std == V4L2_STD_PAL_N) {
732 reg|=0x20;
733 } else if (std == V4L2_STD_PAL_60) {
734 reg|=0x10;
735 }
736 } else if (std & V4L2_STD_NTSC) {
737 if (std == V4L2_STD_NTSC_M_JP) {
738 reg|=0x40;
739 }
740 }
741 saa7115_write(client, 0x0e, reg);
742 }
743
744
716 state->std = std; 745 state->std = std;
717 746
718 /* restart task B if needed */ 747 /* restart task B if needed */