summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88-video.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-video.c')
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 057d9253e..a56c7e90d 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -662,14 +662,25 @@ static int set_scale(struct cx8800_dev *dev, unsigned int width, unsigned int he
static int video_mux(struct cx8800_dev *dev, unsigned int input)
{
- dprintk(1,"video_mux: %d [vmux=%d,gpio=0x%x]\n",
- input, INPUT(input)->vmux, INPUT(input)->gpio0);
+ dprintk(1,"video_mux: %d [vmux=%d,gpio=0x%x,0x%x,0x%x,0x%x]\n",
+ input, INPUT(input)->vmux,
+ INPUT(input)->gpio0,INPUT(input)->gpio1,
+ INPUT(input)->gpio2,INPUT(input)->gpio3);
dev->input = input;
cx_andor(MO_INPUT_FORMAT, 0x03 << 14, INPUT(input)->vmux << 14);
cx_write(MO_GP0_IO, INPUT(input)->gpio0);
cx_write(MO_GP1_IO, INPUT(input)->gpio1);
cx_write(MO_GP2_IO, INPUT(input)->gpio2);
cx_write(MO_GP3_IO, INPUT(input)->gpio3);
+
+ switch (INPUT(input)->type) {
+ case CX88_VMUX_SVIDEO:
+ cx_andor(MO_AFECFG_IO, 0x01, 0x01);
+ break;
+ default:
+ cx_andor(MO_AFECFG_IO, 0x01, 0x00);
+ break;
+ }
return 0;
}