Full support for Ginger Console
[linux-ginger.git] / drivers / media / video / pvrusb2 / pvrusb2-wm8775.c
blob8c1eae05aa08837072c54298e2d136885862022f
1 /*
4 * Copyright (C) 2005 Mike Isely <isely@pobox.com>
5 * Copyright (C) 2004 Aurelien Alleaume <slts@free.fr>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 This source file is specifically designed to interface with the
25 wm8775.
29 #include "pvrusb2-wm8775.h"
32 #include "pvrusb2-hdw-internal.h"
33 #include "pvrusb2-debug.h"
34 #include <linux/videodev2.h>
35 #include <media/v4l2-common.h>
36 #include <linux/errno.h>
37 #include <linux/slab.h>
39 void pvr2_wm8775_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd)
41 if (hdw->input_dirty || hdw->force_dirty) {
42 u32 input;
44 switch (hdw->input_val) {
45 case PVR2_CVAL_INPUT_RADIO:
46 input = 1;
47 break;
48 default:
49 /* All other cases just use the second input */
50 input = 2;
51 break;
53 pvr2_trace(PVR2_TRACE_CHIPS, "subdev wm8775"
54 " set_input(val=%d route=0x%x)",
55 hdw->input_val, input);
57 sd->ops->audio->s_routing(sd, input, 0, 0);
64 Stuff for Emacs to see, in order to encourage consistent editing style:
65 *** Local Variables: ***
66 *** mode: c ***
67 *** fill-column: 70 ***
68 *** tab-width: 8 ***
69 *** c-basic-offset: 8 ***
70 *** End: ***