diff options
author | Mike Isely <isely@pobox.com> | 2006-12-27 21:26:55 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 10:34:32 -0500 |
commit | 2083230084cee50580ee730cd26669704f7939b9 (patch) | |
tree | 91281506e0db9d57f82abf51c403729267830efc /drivers/media | |
parent | c0e69315edd1d6901a021b85e0eea397444df702 (diff) |
V4L/DVB (5049): Pvrusb2: Enable radio mode for 24xxx devices
These changes implement correct audio routing for radio mode on a
24xxx device.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c | 2 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-wm8775.c | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c index 8df969c4874c..c2a154e4ec59 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c +++ b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c | |||
@@ -63,6 +63,7 @@ static void set_input(struct pvr2_v4l_cx2584x *ctxt) | |||
63 | vid_input = CX25840_COMPOSITE7; | 63 | vid_input = CX25840_COMPOSITE7; |
64 | aud_input = CX25840_AUDIO8; | 64 | aud_input = CX25840_AUDIO8; |
65 | break; | 65 | break; |
66 | case PVR2_CVAL_INPUT_RADIO: // Treat same as composite | ||
66 | case PVR2_CVAL_INPUT_COMPOSITE: | 67 | case PVR2_CVAL_INPUT_COMPOSITE: |
67 | vid_input = CX25840_COMPOSITE3; | 68 | vid_input = CX25840_COMPOSITE3; |
68 | aud_input = CX25840_AUDIO_SERIAL; | 69 | aud_input = CX25840_AUDIO_SERIAL; |
@@ -71,7 +72,6 @@ static void set_input(struct pvr2_v4l_cx2584x *ctxt) | |||
71 | vid_input = CX25840_SVIDEO1; | 72 | vid_input = CX25840_SVIDEO1; |
72 | aud_input = CX25840_AUDIO_SERIAL; | 73 | aud_input = CX25840_AUDIO_SERIAL; |
73 | break; | 74 | break; |
74 | case PVR2_CVAL_INPUT_RADIO: | ||
75 | default: | 75 | default: |
76 | // Just set it to be composite input for now... | 76 | // Just set it to be composite input for now... |
77 | vid_input = CX25840_COMPOSITE3; | 77 | vid_input = CX25840_COMPOSITE3; |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c index 7794c34c355e..3f6bc4b117c7 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c +++ b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c | |||
@@ -50,15 +50,21 @@ static void set_input(struct pvr2_v4l_wm8775 *ctxt) | |||
50 | { | 50 | { |
51 | struct v4l2_routing route; | 51 | struct v4l2_routing route; |
52 | struct pvr2_hdw *hdw = ctxt->hdw; | 52 | struct pvr2_hdw *hdw = ctxt->hdw; |
53 | int msk = 0; | ||
54 | 53 | ||
55 | memset(&route,0,sizeof(route)); | 54 | memset(&route,0,sizeof(route)); |
56 | 55 | ||
57 | pvr2_trace(PVR2_TRACE_CHIPS,"i2c wm8775 set_input(val=%d msk=0x%x)", | 56 | switch(hdw->input_val) { |
58 | hdw->input_val,msk); | 57 | case PVR2_CVAL_INPUT_RADIO: |
58 | route.input = 1; | ||
59 | break; | ||
60 | default: | ||
61 | /* All other cases just use the second input */ | ||
62 | route.input = 2; | ||
63 | break; | ||
64 | } | ||
65 | pvr2_trace(PVR2_TRACE_CHIPS,"i2c wm8775 set_input(val=%d route=0x%x)", | ||
66 | hdw->input_val,route.input); | ||
59 | 67 | ||
60 | // Always point to input #1 no matter what | ||
61 | route.input = 2; | ||
62 | pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_S_AUDIO_ROUTING,&route); | 68 | pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_S_AUDIO_ROUTING,&route); |
63 | } | 69 | } |
64 | 70 | ||