summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-03-25 22:19:47 -0600
committerMike Isely <isely@pobox.com>2006-03-25 22:19:47 -0600
commit2fc29f23f48a916f556d40ce8498ed27a0b1f0fc (patch)
tree31fc945bb3439f83bf95491744cd0f31be1ec8ef /linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
parent6de66fc86dee706f81addaad380002538f65219c (diff)
downloadmediapointer-dvb-s2-2fc29f23f48a916f556d40ce8498ed27a0b1f0fc.tar.gz
mediapointer-dvb-s2-2fc29f23f48a916f556d40ce8498ed27a0b1f0fc.tar.bz2
Update pvrusb2's cx25840 module handling to use new routing API
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c b/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
index df1eeefd5..3cbce8eba 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
@@ -34,7 +34,7 @@
#include "pvrusb2-hdw-internal.h"
#include "pvrusb2-debug.h"
-#include <cx25840.h>
+#include <media/cx25840.h>
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <linux/errno.h>
@@ -52,39 +52,39 @@ struct pvr2_v4l_cx2584x {
static void set_input(struct pvr2_v4l_cx2584x *ctxt)
{
struct pvr2_hdw *hdw = ctxt->hdw;
- struct v4l2_audio inp;
- int msk = 0;
+ struct v4l2_routing route;
+ enum cx25840_video_input vid_input;
+ enum cx25840_audio_input aud_input;
- int v = 0;
+ memset(&route,0,sizeof(route));
switch(hdw->controls[PVR2_CID_INPUT].value) {
case PVR2_CVAL_INPUT_TV:
- msk = (8 << 16) | 7;
+ vid_input = CX25840_COMPOSITE7;
+ aud_input = CX25840_AUDIO8;
break;
case PVR2_CVAL_INPUT_COMPOSITE:
- msk = (0 << 16) | 3;
+ vid_input = CX25840_COMPOSITE3;
+ aud_input = CX25840_AUDIO_SERIAL;
break;
case PVR2_CVAL_INPUT_SVIDEO:
- msk = (0 << 16) | 0x510;
+ vid_input = CX25840_SVIDEO1;
+ aud_input = CX25840_AUDIO_SERIAL;
break;
case PVR2_CVAL_INPUT_RADIO:
- msk = 0; /* FIXME: Need to figure out radio */
- break;
default:
+ // Just set it to be composite input for now...
+ vid_input = CX25840_COMPOSITE3;
+ aud_input = CX25840_AUDIO_SERIAL;
break;
}
- pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx2584x set_input(val=%d msk=0x%x)",
- hdw->controls[PVR2_CID_INPUT].value,msk);
-
- v = msk & 0x0000ffffu;
- pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx2584x S_INPUT val=0x%x",v);
- pvr2_i2c_client_cmd(ctxt->client,VIDIOC_S_INPUT,&v);
- v = (msk >> 16) & 0x0000ffffu;
- pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx2584x S_AUDIO val=0x%x",v);
- memset(&inp,0,sizeof(inp));
- inp.index = v;
- pvr2_i2c_client_cmd(ctxt->client,VIDIOC_S_AUDIO,&inp);
+ pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx2584x set_input vid=0x%x aud=0x%x",
+ vid_input,aud_input);
+ route.input = (u32)vid_input;
+ pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_S_VIDEO_ROUTING,&route);
+ route.input = (u32)aud_input;
+ pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_S_AUDIO_ROUTING,&route);
}