diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2005-06-19 17:17:34 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2005-06-19 17:17:34 +0000 |
commit | 21486d75bc263ec83ac03fcfe245adfe115184fe (patch) | |
tree | 596f975de58508cd8e1f17b2a065415bcb59beba | |
parent | 8a548c9a82ac9ce5b45287c8b9e6ab128b8648ae (diff) | |
download | mediapointer-dvb-s2-21486d75bc263ec83ac03fcfe245adfe115184fe.tar.gz mediapointer-dvb-s2-21486d75bc263ec83ac03fcfe245adfe115184fe.tar.bz2 |
VIDIOCSTUNER ioctl implemented on tuner-core.c.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 29 | ||||
-rw-r--r-- | v4l/ChangeLog | 7 |
2 files changed, 34 insertions, 2 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. */ diff --git a/v4l/ChangeLog b/v4l/ChangeLog index 12d1e62db..dc0c8d530 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,5 +1,10 @@ 2005-06-19 14:41 mchehab - cx88-video.c, tea5767.c, tuner-core.c, tuner.h: + * tuner-core.c: + + - VIDIOCSTUNER ioctl implemented. + +2005-06-19 14:41 mchehab + * cx88-video.c, tea5767.c, tuner-core.c, tuner.h: - Added inicial support for changing radio mode stereo/mono for tea5767 |