Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138279
b: refs/heads/master
c: af78e16
h: refs/heads/master
i:
  138277: c03c315
  138275: 7846476
  138271: 3a0d8ee
v: v3
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent bb76fb8 commit b261d6b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 27 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: 6907205bcbe7b8bcdc0720bc75e1d2558162d017
refs/heads/master: af78e16b5d5ba74566814ba0f50ee1d736d933a5
65 changes: 39 additions & 26 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1655,19 +1655,29 @@ static const char *pvr2_get_state_name(unsigned int st)

static int pvr2_decoder_enable(struct pvr2_hdw *hdw,int enablefl)
{
if (!hdw->decoder_ctrl) {
if (!hdw->flag_decoder_missed) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"WARNING: No decoder present");
hdw->flag_decoder_missed = !0;
trace_stbit("flag_decoder_missed",
hdw->flag_decoder_missed);
}
return -EIO;
if (hdw->decoder_ctrl) {
hdw->decoder_ctrl->enable(hdw->decoder_ctrl->ctxt, enablefl);
return 0;
}
hdw->decoder_ctrl->enable(hdw->decoder_ctrl->ctxt,enablefl);
// ?????
return 0;
/* Even though we really only care about the video decoder chip at
this point, we'll broadcast stream on/off to all sub-devices
anyway, just in case somebody else wants to hear the
command... */
v4l2_device_call_all(&hdw->v4l2_dev, 0, video, s_stream, enablefl);
if (hdw->decoder_client_id) {
/* We get here if the encoder has been noticed. Otherwise
we'll issue a warning to the user (which should
normally never happen). */
return 0;
}
if (!hdw->flag_decoder_missed) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"WARNING: No decoder present");
hdw->flag_decoder_missed = !0;
trace_stbit("flag_decoder_missed",
hdw->flag_decoder_missed);
}
return -EIO;
}


Expand Down Expand Up @@ -4009,23 +4019,26 @@ int pvr2_hdw_cmd_powerdown(struct pvr2_hdw *hdw)

int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *hdw)
{
if (!hdw->decoder_ctrl) {
pvr2_trace(PVR2_TRACE_INIT,
"Unable to reset decoder: nothing attached");
return -ENOTTY;
pvr2_trace(PVR2_TRACE_INIT,
"Requesting decoder reset");
if (hdw->decoder_ctrl) {
if (!hdw->decoder_ctrl->force_reset) {
pvr2_trace(PVR2_TRACE_INIT,
"Unable to reset decoder: not implemented");
return -ENOTTY;
}
hdw->decoder_ctrl->force_reset(hdw->decoder_ctrl->ctxt);
return 0;
} else {
}

if (!hdw->decoder_ctrl->force_reset) {
pvr2_trace(PVR2_TRACE_INIT,
"Unable to reset decoder: not implemented");
return -ENOTTY;
if (hdw->decoder_client_id) {
v4l2_device_call_all(&hdw->v4l2_dev, hdw->decoder_client_id,
core, reset, 0);
return 0;
}

pvr2_trace(PVR2_TRACE_INIT,
"Requesting decoder reset");
hdw->decoder_ctrl->force_reset(hdw->decoder_ctrl->ctxt);
// ?????
return 0;
"Unable to reset decoder: nothing attached");
return -ENOTTY;
}


Expand Down

0 comments on commit b261d6b

Please sign in to comment.