Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92439
b: refs/heads/master
c: e1edb19
h: refs/heads/master
i:
  92437: 0ff878a
  92435: 317f86d
  92431: 8c7e33b
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent c4fc733 commit fed87b4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 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: dbc40a0e582a88d2561d13d1fea4f3496bff9650
refs/heads/master: e1edb19a001b25c0ce2e52a669cba6b6eb31883c
23 changes: 19 additions & 4 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3193,17 +3193,32 @@ int pvr2_hdw_cmd_deep_reset(struct pvr2_hdw *hdw)
}


int pvr2_hdw_cmd_powerup(struct pvr2_hdw *hdw)
static int pvr2_hdw_cmd_power_ctrl(struct pvr2_hdw *hdw, int onoff)
{
int status;
LOCK_TAKE(hdw->ctl_lock); do {
pvr2_trace(PVR2_TRACE_INIT,"Requesting powerup");
hdw->cmd_buffer[0] = FX2CMD_POWER_ON;
status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0);
if (onoff) {
pvr2_trace(PVR2_TRACE_INIT, "Requesting powerup");
hdw->cmd_buffer[0] = FX2CMD_POWER_ON;
} else {
pvr2_trace(PVR2_TRACE_INIT, "Requesting powerdown");
hdw->cmd_buffer[0] = FX2CMD_POWER_OFF;
}
status = pvr2_send_request(hdw, hdw->cmd_buffer, 1, NULL, 0);
} while (0); LOCK_GIVE(hdw->ctl_lock);
return status;
}

int pvr2_hdw_cmd_powerup(struct pvr2_hdw *hdw)
{
return pvr2_hdw_cmd_power_ctrl(hdw, 1);
}

int pvr2_hdw_cmd_powerdown(struct pvr2_hdw *hdw)
{
return pvr2_hdw_cmd_power_ctrl(hdw, 0);
}


int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *hdw)
{
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ int pvr2_hdw_cmd_deep_reset(struct pvr2_hdw *);
/* Execute simple reset command */
int pvr2_hdw_cmd_powerup(struct pvr2_hdw *);

/* suspend */
int pvr2_hdw_cmd_powerdown(struct pvr2_hdw *);

/* Order decoder to reset */
int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *);

Expand Down

0 comments on commit fed87b4

Please sign in to comment.