Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138298
b: refs/heads/master
c: 75212a0
h: refs/heads/master
v: v3
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent f1b8307 commit 798937a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b481880bff1f98085a9f57362393463e6e3a3157
refs/heads/master: 75212a02734155de3d25c91344a9083d7bf2aef1
18 changes: 17 additions & 1 deletion trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/firmware.h>
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <media/tuner.h>
#include "pvrusb2.h"
#include "pvrusb2-std.h"
#include "pvrusb2-util.h"
Expand Down Expand Up @@ -2261,7 +2262,6 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw)
}

pvr2_i2c_core_check_stale(hdw);
hdw->tuner_updated = 0;

if (!pvr2_hdw_dev_ok(hdw)) return;

Expand Down Expand Up @@ -2944,6 +2944,21 @@ static void pvr2_subdev_update(struct pvr2_hdw *hdw)
unsigned int id;
pvr2_subdev_update_func fp;

pvr2_trace(PVR2_TRACE_CHIPS, "subdev update...");

if (hdw->tuner_updated) {
struct tuner_setup setup;
pvr2_trace(PVR2_TRACE_CHIPS, "subdev tuner set_type(%d)",
hdw->tuner_type);
if (((int)(hdw->tuner_type)) >= 0) {
setup.addr = ADDR_UNSET;
setup.type = hdw->tuner_type;
setup.mode_mask = T_RADIO | T_ANALOG_TV;
v4l2_device_call_all(&hdw->v4l2_dev, 0,
tuner, s_type_addr, &setup);
}
}

if (hdw->input_dirty || hdw->std_dirty) {
pvr2_trace(PVR2_TRACE_CHIPS, "subdev v4l2 set_standard");
if (hdw->input_val == PVR2_CVAL_INPUT_RADIO) {
Expand Down Expand Up @@ -3241,6 +3256,7 @@ static int pvr2_hdw_commit_execute(struct pvr2_hdw *hdw)
/* Check and update state for all sub-devices. */
pvr2_subdev_update(hdw);

hdw->tuner_updated = 0;
for (idx = 0; idx < hdw->control_cnt; idx++) {
cptr = hdw->controls + idx;
if (!cptr->info->clear_dirty) continue;
Expand Down

0 comments on commit 798937a

Please sign in to comment.