aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2009-03-06 22:39:34 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:35 -0400
commit5f6dae802c0f6a943c2c873c203642d1d3c2fc3f (patch)
tree40941ce08c2ef230262b215a78a6a725a8ece0d9 /drivers/media/video/pvrusb2/pvrusb2-wm8775.c
parentedb9dcb885c6288813b62c20e6b578492845f9ad (diff)
V4L/DVB (11176): pvrusb2: Tie in wm8775 sub-device handling
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-wm8775.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-wm8775.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
index f6fcf0ac6118..40b221fe8027 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
@@ -37,6 +37,8 @@
37#include <linux/errno.h> 37#include <linux/errno.h>
38#include <linux/slab.h> 38#include <linux/slab.h>
39 39
40
41
40struct pvr2_v4l_wm8775 { 42struct pvr2_v4l_wm8775 {
41 struct pvr2_i2c_handler handler; 43 struct pvr2_i2c_handler handler;
42 struct pvr2_i2c_client *client; 44 struct pvr2_i2c_client *client;
@@ -158,6 +160,30 @@ int pvr2_i2c_wm8775_setup(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp)
158} 160}
159 161
160 162
163void pvr2_wm8775_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
164{
165 if (hdw->input_dirty) {
166 struct v4l2_routing route;
167
168 memset(&route, 0, sizeof(route));
169
170 switch (hdw->input_val) {
171 case PVR2_CVAL_INPUT_RADIO:
172 route.input = 1;
173 break;
174 default:
175 /* All other cases just use the second input */
176 route.input = 2;
177 break;
178 }
179 pvr2_trace(PVR2_TRACE_CHIPS, "subdev wm8775"
180 " set_input(val=%d route=0x%x)",
181 hdw->input_val, route.input);
182
183 sd->ops->audio->s_routing(sd, &route);
184 }
185}
186
161 187
162 188
163/* 189/*