Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72048
b: refs/heads/master
c: 9a607f0
h: refs/heads/master
v: v3
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Oct 22, 2007
1 parent 88d0853 commit 6279afe
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 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: a39a8ed7beaafe02ce154dfd227f7d734a9f34dc
refs/heads/master: 9a607f01b044dd83aa6daf6edad1e98cfc8c33ba
6 changes: 6 additions & 0 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ static int pvr2_encoder_cmd(void *ctxt,

LOCK_TAKE(hdw->ctl_lock); do {

if (!hdw->flag_encoder_ok) {
ret = -EIO;
break;
}

retry_flag = 0;
try_count++;
ret = 0;
Expand Down Expand Up @@ -273,6 +278,7 @@ static int pvr2_encoder_cmd(void *ctxt,
ret = -EBUSY;
}
if (ret) {
hdw->flag_encoder_ok = 0;
pvr2_trace(
PVR2_TRACE_ERROR_LEGS,
"Giving up on command."
Expand Down
11 changes: 6 additions & 5 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,12 @@ struct pvr2_hdw {
unsigned int cmd_debug_write_len; //
unsigned int cmd_debug_read_len; //

int flag_ok; // device in known good state
int flag_disconnected; // flag_ok == 0 due to disconnect
int flag_init_ok; // true if structure is fully initialized
int flag_streaming_enabled; // true if streaming should be on
int fw1_state; // current situation with fw1
int flag_ok; /* device in known good state */
int flag_disconnected; /* flag_ok == 0 due to disconnect */
int flag_init_ok; /* true if structure is fully initialized */
int flag_streaming_enabled; /* true if streaming should be on */
int fw1_state; /* current situation with fw1 */
int flag_encoder_ok; /* True if encoder is healthy */

int flag_decoder_is_tuned;

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,8 @@ int pvr2_upload_firmware2(struct pvr2_hdw *hdw)
time we configure the encoder, then we'll fully configure it. */
hdw->enc_cur_valid = 0;

hdw->flag_encoder_ok = 0;

/* First prepare firmware loading */
ret |= pvr2_write_register(hdw, 0x0048, 0xffffffff); /*interrupt mask*/
ret |= pvr2_hdw_gpio_chg_dir(hdw,0xffffffff,0x00000088); /*gpio dir*/
Expand Down Expand Up @@ -1346,6 +1348,7 @@ int pvr2_upload_firmware2(struct pvr2_hdw *hdw)
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"firmware2 upload post-proc failure");
} else {
hdw->flag_encoder_ok = !0;
hdw->subsys_enabled_mask |= (1<<PVR2_SUBSYS_B_ENC_FIRMWARE);
}
return ret;
Expand Down

0 comments on commit 6279afe

Please sign in to comment.