diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 10:30:07 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 10:30:07 -0700 |
commit | ab8e823515305a93715e71b81efcbe27c6ce0f59 (patch) | |
tree | eb812c3886727e23feff7e275e3a7c7cbdd56f2f /drivers/media/video/saa7134/saa7134-video.c | |
parent | 4d5e392c33820dc8861423bb1b8dae205ea0ad3d (diff) | |
parent | e1634208b77872ac0884da6d92f0d46f9a61eaa7 (diff) | |
download | blackbird-op-linux-ab8e823515305a93715e71b81efcbe27c6ce0f59.tar.gz blackbird-op-linux-ab8e823515305a93715e71b81efcbe27c6ce0f59.zip |
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
V4L/DVB (4712): Fix warning when compiling on x86_i64
V4L/DVB (4711): Radio: No need to return void
V4L/DVB (4708): Add tveeprom support for Philips FM1236/FM1216ME MK5
V4L/DVB (4707): 4linux: complete conversion to hotplug safe PCI API
V4L/DVB (4706): Do not enable VIDEO_V4L2 unconditionally
V4L/DVB (4704): SAA713x: fixed compile warning in SECAM fixup
V4L/DVB (4703): Add support for the ASUS EUROPA2 OEM board
V4L/DVB (4702): Fix: set antenna input for DVB-T for Asus P7131 Dual hybrid
V4L/DVB (4701): Saa713x audio fixes
V4L/DVB (4676a): Remove Kconfig item for DiB7000M support
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-video.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 60 |
1 files changed, 58 insertions, 2 deletions
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 2c171af9a9f2..203302f21827 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c @@ -43,12 +43,16 @@ static unsigned int gbuffers = 8; static unsigned int noninterlaced = 1; static unsigned int gbufsize = 720*576*4; static unsigned int gbufsize_max = 720*576*4; +static char secam[] = "--"; module_param(video_debug, int, 0644); MODULE_PARM_DESC(video_debug,"enable debug messages [video]"); module_param(gbuffers, int, 0444); MODULE_PARM_DESC(gbuffers,"number of capture buffers, range 2-32"); module_param(noninterlaced, int, 0644); MODULE_PARM_DESC(noninterlaced,"capture non interlaced video"); +module_param_string(secam, secam, sizeof(secam), 0644); +MODULE_PARM_DESC(secam, "force SECAM variant, either DK,L or Lc"); + #define dprintk(fmt, arg...) if (video_debug) \ printk(KERN_DEBUG "%s/video: " fmt, dev->name , ## arg) @@ -279,7 +283,43 @@ static struct saa7134_tvnorm tvnorms[] = { .id = V4L2_STD_SECAM, NORM_625_50, - .sync_control = 0x18, /* old: 0x58, */ + .sync_control = 0x18, + .luma_control = 0x1b, + .chroma_ctrl1 = 0xd1, + .chroma_gain = 0x80, + .chroma_ctrl2 = 0x00, + .vgate_misc = 0x1c, + + },{ + .name = "SECAM-DK", + .id = V4L2_STD_SECAM_DK, + NORM_625_50, + + .sync_control = 0x18, + .luma_control = 0x1b, + .chroma_ctrl1 = 0xd1, + .chroma_gain = 0x80, + .chroma_ctrl2 = 0x00, + .vgate_misc = 0x1c, + + },{ + .name = "SECAM-L", + .id = V4L2_STD_SECAM_L, + NORM_625_50, + + .sync_control = 0x18, + .luma_control = 0x1b, + .chroma_ctrl1 = 0xd1, + .chroma_gain = 0x80, + .chroma_ctrl2 = 0x00, + .vgate_misc = 0x1c, + + },{ + .name = "SECAM-Lc", + .id = V4L2_STD_SECAM_LC, + NORM_625_50, + + .sync_control = 0x18, .luma_control = 0x1b, .chroma_ctrl1 = 0xd1, .chroma_gain = 0x80, @@ -1769,6 +1809,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, { v4l2_std_id *id = arg; unsigned int i; + v4l2_std_id fixup; for (i = 0; i < TVNORMS; i++) if (*id == tvnorms[i].id) @@ -1779,7 +1820,22 @@ static int video_do_ioctl(struct inode *inode, struct file *file, break; if (i == TVNORMS) return -EINVAL; - + if ((*id & V4L2_STD_SECAM) && (secam[0] != '-')) { + if (secam[0] == 'L' || secam[0] == 'l') { + if (secam[1] == 'C' || secam[1] == 'c') + fixup = V4L2_STD_SECAM_LC; + else + fixup = V4L2_STD_SECAM_L; + } else { + if (secam[0] == 'D' || secam[0] == 'd') + fixup = V4L2_STD_SECAM_DK; + else + fixup = V4L2_STD_SECAM; + } + for (i = 0; i < TVNORMS; i++) + if (fixup == tvnorms[i].id) + break; + } mutex_lock(&dev->lock); if (res_check(fh, RESOURCE_OVERLAY)) { spin_lock_irqsave(&dev->slock,flags); |