From 2dd9a10d75bd07d0ef1527794e256fc9186c1ab6 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 25 Mar 2006 15:09:02 +0100 Subject: Added video routing support to pvrusb2 From: Hans Verkuil Signed-off-by: Hans Verkuil --- linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'linux/drivers/media') 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 #include +#include #include #include @@ -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); } -- cgit v1.2.3