diff options
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c b/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c index d0bc3682b..97c3e2c38 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c @@ -35,6 +35,7 @@ #include "pvrusb2-debug.h" #include <linux/videodev.h> #include <media/v4l2-common.h> +#include <media/saa7115.h> #include <linux/errno.h> #include <linux/slab.h> @@ -50,25 +51,27 @@ struct pvr2_v4l_decoder { static void set_input(struct pvr2_v4l_decoder *ctxt) { struct pvr2_hdw *hdw = ctxt->hdw; - int v = 0; + struct v4l2_routing route; + pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 set_input(%d)", hdw->controls[PVR2_CID_INPUT].value); switch(hdw->controls[PVR2_CID_INPUT].value){ case PVR2_CVAL_INPUT_TV: - v = 4; + route.input = SAA7115_COMPOSITE4; break; case PVR2_CVAL_INPUT_COMPOSITE: - v = 5; + route.input = SAA7115_COMPOSITE5; break; case PVR2_CVAL_INPUT_SVIDEO: - v = 8; + route.input = SAA7115_SVIDEO2; break; case PVR2_CVAL_INPUT_RADIO: // ????? No idea yet what to do here default: return; } - pvr2_i2c_client_cmd(ctxt->client,VIDIOC_S_INPUT,&v); + route.output = 0; + pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_S_VIDEO_ROUTING,&route); } |