diff options
author | Mike Isely <isely@pobox.com> | 2007-01-19 23:56:04 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 10:34:41 -0500 |
commit | 606cf9caeb3b908426757924bfdce85cb854aa81 (patch) | |
tree | f7236b01b9d8e3af4b12116a9c0ebe055f1ac60c /drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c | |
parent | 27c7b710a4010e10b14500c0b27bb4c2a806de1b (diff) |
V4L/DVB (5093): Pvrusb2: Emit VIDIOC_S_TUNER correctly
Audio mode changes are not private to the audio chip - other I2C
modules need to see this as well. And since the command in question
is VIDIOC_S_TUNER which is a standard v4l2 command, we really should
be broadcasting it out. This change sets up a broadcast pathway for
VIDIOC_S_TUNER and also eliminates the now redundant code from the
audio chip handler.
This fix enables stereo reception for the FM radio
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c index b1f6809625e8..c650e02ccd00 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c | |||
@@ -140,6 +140,29 @@ const struct pvr2_i2c_op pvr2_i2c_op_v4l2_volume = { | |||
140 | }; | 140 | }; |
141 | 141 | ||
142 | 142 | ||
143 | static void set_audiomode(struct pvr2_hdw *hdw) | ||
144 | { | ||
145 | struct v4l2_tuner vt; | ||
146 | memset(&vt,0,sizeof(vt)); | ||
147 | vt.audmode = hdw->audiomode_val; | ||
148 | pvr2_i2c_core_cmd(hdw,VIDIOC_S_TUNER,&vt); | ||
149 | } | ||
150 | |||
151 | |||
152 | static int check_audiomode(struct pvr2_hdw *hdw) | ||
153 | { | ||
154 | return (hdw->input_dirty || | ||
155 | hdw->audiomode_dirty); | ||
156 | } | ||
157 | |||
158 | |||
159 | const struct pvr2_i2c_op pvr2_i2c_op_v4l2_audiomode = { | ||
160 | .check = check_audiomode, | ||
161 | .update = set_audiomode, | ||
162 | .name = "v4l2_audiomode", | ||
163 | }; | ||
164 | |||
165 | |||
143 | static void set_frequency(struct pvr2_hdw *hdw) | 166 | static void set_frequency(struct pvr2_hdw *hdw) |
144 | { | 167 | { |
145 | unsigned long fv; | 168 | unsigned long fv; |