summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88-video.c
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-06-23 14:33:51 +0000
committerGerd Knorr <devnull@localhost>2004-06-23 14:33:51 +0000
commit25a121bba097b66e8fba1e371c5df6321ba51d19 (patch)
tree407d3d9fad4043341a9f1eb7bc1ce7bdfdc5907d /linux/drivers/media/video/cx88/cx88-video.c
parent0e796b2ee04bd1acbdc5150e7c939cc349aa23d5 (diff)
downloadmediapointer-dvb-s2-25a121bba097b66e8fba1e371c5df6321ba51d19.tar.gz
mediapointer-dvb-s2-25a121bba097b66e8fba1e371c5df6321ba51d19.tar.bz2
- misc fixes from various people.
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-video.c')
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 47dcd2052..4024b8ef9 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -146,63 +146,75 @@ static struct cx8800_tvnorm tvnorms[] = {
.id = V4L2_STD_NTSC_M,
.cxiformat = VideoFormatNTSC,
.cxoformat = 0x181f0008,
+ .step_dr = 4406250,
},{
.name = "NTSC-JP",
.id = V4L2_STD_NTSC_M_JP,
.cxiformat = VideoFormatNTSCJapan,
.cxoformat = 0x181f0008,
+ .step_dr = 4406250,
#if 0
},{
.name = "NTSC-4.43",
.id = FIXME,
.cxiformat = VideoFormatNTSC443,
.cxoformat = 0x181f0008,
+ .step_dr = 4406250,
#endif
},{
.name = "PAL-BG",
.id = V4L2_STD_PAL_BG,
.cxiformat = VideoFormatPAL,
.cxoformat = 0x181f0008,
+ .step_dr = 4406250,
},{
.name = "PAL-DK",
.id = V4L2_STD_PAL_DK,
.cxiformat = VideoFormatPAL,
.cxoformat = 0x181f0008,
+ .step_dr = 4406250,
},{
.name = "PAL-I",
.id = V4L2_STD_PAL_I,
.cxiformat = VideoFormatPAL,
.cxoformat = 0x181f0008,
+ .step_dr = 4406250,
},{
.name = "PAL-M",
.id = V4L2_STD_PAL_M,
.cxiformat = VideoFormatPALM,
.cxoformat = 0x1c1f0008,
+ .step_dr = 4406250,
},{
.name = "PAL-N",
.id = V4L2_STD_PAL_N,
.cxiformat = VideoFormatPALN,
.cxoformat = 0x1c1f0008,
+ .step_dr = 4406250,
},{
.name = "PAL-Nc",
.id = V4L2_STD_PAL_Nc,
.cxiformat = VideoFormatPALNC,
.cxoformat = 0x1c1f0008,
+ .step_dr = 4406250,
},{
.name = "PAL-60",
.id = V4L2_STD_PAL_60,
.cxiformat = VideoFormatPAL60,
.cxoformat = 0x181f0008,
+ .step_dr = 4406250,
},{
.name = "SECAM-L",
.id = V4L2_STD_SECAM_L,
.cxiformat = VideoFormatSECAM,
.cxoformat = 0x181f0008,
+ .step_dr = 4250000,
},{
.name = "SECAM-DK",
.id = V4L2_STD_SECAM_DK,
.cxiformat = VideoFormatSECAM,
.cxoformat = 0x181f0008,
+ .step_dr = 4250000,
}
};
@@ -570,7 +582,7 @@ static int set_tvnorm(struct cx8800_dev *dev, struct cx8800_tvnorm *norm)
cx_write(MO_SUB_STEP, (u32)tmp64);
// MO_SUB_STEP_DR = 8 * 4406250 / video dec clock * 2^22
- tmp64 = 4406250 * 8 * (u64)(1 << 22);
+ tmp64 = norm->step_dr * 8 * (u64)(1 << 22);
do_div(tmp64, vdec_clock);
dprintk(1,"set_tvnorm: MO_SUB_STEP_DR 0x%08x [old=0x%08x]\n",
(u32)tmp64, cx_read(MO_SUB_STEP_DR));
@@ -666,6 +678,10 @@ static int set_scale(struct cx8800_dev *dev, unsigned int width, unsigned int he
// setup filters
value = 0;
value |= (1 << 19); // CFILT (default)
+ if (dev->tvnorm->id & V4L2_STD_SECAM)
+ value |= (1 << 15);
+ if (INPUT(dev->input)->type == CX88_VMUX_SVIDEO)
+ value |= (1 << 13) | (1 << 5);
if (V4L2_FIELD_INTERLACED == field)
value |= (1 << 3); // VINT (interlaced vertical scaling)
if (width < 385)
@@ -697,10 +713,14 @@ static int video_mux(struct cx8800_dev *dev, unsigned int input)
case CX88_VMUX_SVIDEO:
cx_set(MO_AFECFG_IO, 0x00000001);
cx_set(MO_INPUT_FORMAT, 0x00010010);
+ cx_set(MO_FILTER_EVEN, 0x00002020);
+ cx_set(MO_FILTER_ODD, 0x00002020);
break;
default:
cx_clear(MO_AFECFG_IO, 0x00000001);
cx_clear(MO_INPUT_FORMAT, 0x00010010);
+ cx_clear(MO_FILTER_EVEN, 0x00002020);
+ cx_clear(MO_FILTER_ODD, 0x00002020);
break;
}
return 0;