summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/tuner-core.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index a0a38be0d..6bebe514a 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: tuner-core.c,v 1.23 2005/06/19 15:59:25 mchehab Exp $
+ * $Id: tuner-core.c,v 1.24 2005/06/19 17:17:34 mchehab Exp $
*
* i2c tv tuner chip device driver
* core core, i.e. kernel interfaces, registering and so on
@@ -509,10 +509,37 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
}
break;
}
+ case VIDIOCSTUNER:
+ {
+ struct video_tuner *vt = arg;
+ struct v4l2_tuner tuner;
+
+ CHECK_ADDR(radio_tuner,"VIDIOCSTUNER","radio");
+ CHECK_V4L2;
+
+ memcpy (&tuner, t, sizeof(struct v4l2_tuner) );
+
+ if ( VIDEO_TUNER_STEREO_ON & vt->flags)
+ tuner.audmode=V4L2_TUNER_MODE_STEREO;
+ else
+ tuner.audmode=V4L2_TUNER_MODE_MONO;
+
+ if (t->set_tuner) {
+ t->set_tuner(client,&tuner);
+ } else {
+ tuner_dbg ("Unimplemented IOCTL VIDIO_S_TUNER called to tuner-core.\n");
+ }
+ break;
+
+ return 0;
+ }
case VIDIOC_S_TUNER: /* Allow changing radio range and audio mode */
{
struct v4l2_tuner *tuner = arg;
+ CHECK_ADDR(radio_tuner,"VIDIOC_S_TUNER","radio");
+ SWITCH_V4L2;
+
/* To switch the audio mode, applications initialize the
index and audmode fields and the reserved array and
call the VIDIOC_S_TUNER ioctl. */