1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright (C) 2005 Mike Isely <isely@pobox.com>
5 * Copyright (C) 2004 Aurelien Alleaume <slts@free.fr>
10 This source file is specifically designed to interface with the
15 #include "pvrusb2-wm8775.h"
18 #include "pvrusb2-hdw-internal.h"
19 #include "pvrusb2-debug.h"
20 #include <linux/videodev2.h>
21 #include <media/v4l2-common.h>
22 #include <linux/errno.h>
24 void pvr2_wm8775_subdev_update(struct pvr2_hdw
*hdw
, struct v4l2_subdev
*sd
)
26 if (hdw
->input_dirty
|| hdw
->force_dirty
) {
29 switch (hdw
->input_val
) {
30 case PVR2_CVAL_INPUT_RADIO
:
34 /* All other cases just use the second input */
38 pvr2_trace(PVR2_TRACE_CHIPS
, "subdev wm8775 set_input(val=%d route=0x%x)",
39 hdw
->input_val
, input
);
41 sd
->ops
->audio
->s_routing(sd
, input
, 0, 0);