Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92446
b: refs/heads/master
c: 1b9c18c
h: refs/heads/master
v: v3
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 19d87bc commit f7fb3df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: e9db1ff23507d3e430db2bd130bd7861baa8c87e
refs/heads/master: 1b9c18c54d68cc22f090948fc47890c56d22153d
11 changes: 8 additions & 3 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3352,6 +3352,7 @@ static void pvr2_hdw_cmd_modeswitch(struct pvr2_hdw *hdw,int digitalFl)
default: break;
}

pvr2_hdw_untrip_unlocked(hdw);
hdw->pathway_state = cmode;
}

Expand Down Expand Up @@ -3814,6 +3815,7 @@ static int pvr2_hdw_state_eval(struct pvr2_hdw *hdw)
unsigned int st;
int state_updated = 0;
int callback_flag = 0;
int analog_mode;

pvr2_trace(PVR2_TRACE_STBITS,
"Drive state check START");
Expand All @@ -3824,17 +3826,20 @@ static int pvr2_hdw_state_eval(struct pvr2_hdw *hdw)
/* Process all state and get back over disposition */
state_updated = pvr2_hdw_state_update(hdw);

analog_mode = (hdw->pathway_state != PVR2_PATHWAY_DIGITAL);

/* Update master state based upon all other states. */
if (!hdw->flag_ok) {
st = PVR2_STATE_DEAD;
} else if (hdw->fw1_state != FW1_STATE_OK) {
st = PVR2_STATE_COLD;
} else if (!hdw->state_encoder_ok) {
} else if (analog_mode && !hdw->state_encoder_ok) {
st = PVR2_STATE_WARM;
} else if (hdw->flag_tripped || hdw->flag_decoder_missed) {
} else if (hdw->flag_tripped ||
(analog_mode && hdw->flag_decoder_missed)) {
st = PVR2_STATE_ERROR;
} else if (hdw->state_usbstream_run &&
((hdw->pathway_state != PVR2_PATHWAY_ANALOG) ||
(!analog_mode ||
(hdw->state_encoder_run && hdw->state_decoder_run))) {
st = PVR2_STATE_RUN;
} else {
Expand Down

0 comments on commit f7fb3df

Please sign in to comment.