0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "pvrusb2-wm8775.h"
0016
0017
0018 #include "pvrusb2-hdw-internal.h"
0019 #include "pvrusb2-debug.h"
0020 #include <linux/videodev2.h>
0021 #include <media/v4l2-common.h>
0022 #include <linux/errno.h>
0023
0024 void pvr2_wm8775_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
0025 {
0026 if (hdw->input_dirty || hdw->force_dirty) {
0027 u32 input;
0028
0029 switch (hdw->input_val) {
0030 case PVR2_CVAL_INPUT_RADIO:
0031 input = 1;
0032 break;
0033 default:
0034
0035 input = 2;
0036 break;
0037 }
0038 pvr2_trace(PVR2_TRACE_CHIPS, "subdev wm8775 set_input(val=%d route=0x%x)",
0039 hdw->input_val, input);
0040
0041 sd->ops->audio->s_routing(sd, input, 0, 0);
0042 }
0043 }