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.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 56b72e44d..109bdeb75 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -667,6 +667,9 @@ static int video_mux(struct cx8800_dev *dev, unsigned int input)
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);
return 0;
}
@@ -1230,6 +1233,9 @@ static int video_open(struct inode *inode, struct file *file)
if (fh->radio) {
dprintk(1,"video_open: setting radio device\n");
cx_write(MO_GP0_IO, cx88_boards[dev->board].radio.gpio0);
+ cx_write(MO_GP1_IO, cx88_boards[dev->board].radio.gpio1);
+ cx_write(MO_GP2_IO, cx88_boards[dev->board].radio.gpio2);
+ cx_write(MO_GP3_IO, cx88_boards[dev->board].radio.gpio3);
dev->tvaudio = WW_FM;
cx88_set_tvaudio(dev);
cx88_set_stereo(dev,V4L2_TUNER_MODE_STEREO);
@@ -1384,6 +1390,21 @@ static int set_control(struct cx8800_dev *dev, struct v4l2_control *ctl)
return 0;
}
+static int init_controls(struct cx8800_dev *dev)
+{
+ static struct v4l2_control mute = {
+ .id = V4L2_CID_AUDIO_MUTE,
+ .value = 1,
+ };
+ static struct v4l2_control volume = {
+ .id = V4L2_CID_AUDIO_VOLUME,
+ .value = 0,
+ };
+
+ set_control(dev,&mute);
+ set_control(dev,&volume);
+}
+
/* ------------------------------------------------------------------ */
static int cx8800_g_fmt(struct cx8800_dev *dev, struct cx8800_fh *fh,
@@ -2333,6 +2354,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
}
dev->lmmio = ioremap(pci_resource_start(pci_dev,0),
pci_resource_len(pci_dev,0));
+ dev->bmmio = (u8*)dev->lmmio;
/* initialize driver struct */
OOPS("init structs");
@@ -2435,6 +2457,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
down(&dev->lock);
set_tvnorm(dev,tvnorms);
video_mux(dev,0);
+ init_controls(dev);
up(&dev->lock);
return 0;