summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2009-03-06 21:39:34 -0600
committerMike Isely <isely@pobox.com>2009-03-06 21:39:34 -0600
commit0f16c4cd5b6c0c18492d34470bd380aa23d0f862 (patch)
treec0b1dbf8b71eb6347743baa0a00d799d170d4490 /linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
parentd22a03cd627da69843d2a79a7587179c19df4a40 (diff)
downloadmediapointer-dvb-s2-0f16c4cd5b6c0c18492d34470bd380aa23d0f862.tar.gz
mediapointer-dvb-s2-0f16c4cd5b6c0c18492d34470bd380aa23d0f862.tar.bz2
pvrusb2: Tie in wm8775 sub-device handling
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c b/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
index 6cdcbf2fe..b5b2d0b72 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
@@ -38,6 +38,8 @@
#include <linux/slab.h>
#include "compat.h"
+
+
struct pvr2_v4l_wm8775 {
struct pvr2_i2c_handler handler;
struct pvr2_i2c_client *client;
@@ -159,6 +161,30 @@ int pvr2_i2c_wm8775_setup(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp)
}
+void pvr2_wm8775_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
+{
+ if (hdw->input_dirty) {
+ struct v4l2_routing route;
+
+ memset(&route, 0, sizeof(route));
+
+ switch (hdw->input_val) {
+ case PVR2_CVAL_INPUT_RADIO:
+ route.input = 1;
+ break;
+ default:
+ /* All other cases just use the second input */
+ route.input = 2;
+ break;
+ }
+ pvr2_trace(PVR2_TRACE_CHIPS, "subdev wm8775"
+ " set_input(val=%d route=0x%x)",
+ hdw->input_val, route.input);
+
+ sd->ops->audio->s_routing(sd, &route);
+ }
+}
+
/*