Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92774
b: refs/heads/master
c: bb0c2fe
h: refs/heads/master
v: v3
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 8fc617c commit 448b9e9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 16 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: 1c9d10d4d2e791a9eacd9f919dec78c5bc6737e8
refs/heads/master: bb0c2fe0c423d6501395e626501dd8747823cafb
52 changes: 37 additions & 15 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3377,9 +3377,7 @@ static void pvr2_hdw_cmd_modeswitch(struct pvr2_hdw *hdw,int digitalFl)
/* Supposedly we should always have the power on whether in
digital or analog mode. But for now do what appears to
work... */
if (digitalFl) pvr2_hdw_cmd_onair_fe_power_ctrl(hdw,!0);
pvr2_hdw_cmd_onair_digital_path_ctrl(hdw,digitalFl);
if (!digitalFl) pvr2_hdw_cmd_onair_fe_power_ctrl(hdw,0);
pvr2_hdw_cmd_onair_fe_power_ctrl(hdw,digitalFl);
break;
default: break;
}
Expand Down Expand Up @@ -3437,19 +3435,43 @@ static void pvr2_led_ctrl(struct pvr2_hdw *hdw,int onoff)
/* Stop / start video stream transport */
static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl)
{
int cc;
if ((hdw->pathway_state == PVR2_PATHWAY_DIGITAL) &&
(hdw->hdw_desc->digital_control_scheme ==
PVR2_DIGITAL_SCHEME_HAUPPAUGE)) {
cc = (runFl ?
FX2CMD_HCW_DTV_STREAMING_ON :
FX2CMD_HCW_DTV_STREAMING_OFF);
} else {
cc = (runFl ?
FX2CMD_STREAMING_ON :
FX2CMD_STREAMING_OFF);
int ret;

/* If we're in analog mode, then just issue the usual analog
command. */
if (hdw->pathway_state == PVR2_PATHWAY_ANALOG) {
return pvr2_issue_simple_cmd(hdw,
(runFl ?
FX2CMD_STREAMING_ON :
FX2CMD_STREAMING_OFF));
/*Note: Not reached */
}

if (hdw->pathway_state != PVR2_PATHWAY_DIGITAL) {
/* Whoops, we don't know what mode we're in... */
return -EINVAL;
}

/* To get here we have to be in digital mode. The mechanism here
is unfortunately different for different vendors. So we switch
on the device's digital scheme attribute in order to figure out
what to do. */
switch (hdw->hdw_desc->digital_control_scheme) {
case PVR2_DIGITAL_SCHEME_HAUPPAUGE:
return pvr2_issue_simple_cmd(hdw,
(runFl ?
FX2CMD_HCW_DTV_STREAMING_ON :
FX2CMD_HCW_DTV_STREAMING_OFF));
case PVR2_DIGITAL_SCHEME_ONAIR:
ret = pvr2_issue_simple_cmd(hdw,
(runFl ?
FX2CMD_STREAMING_ON :
FX2CMD_STREAMING_OFF));
if (ret) return ret;
return pvr2_hdw_cmd_onair_digital_path_ctrl(hdw,runFl);
default:
return -EINVAL;
}
return pvr2_issue_simple_cmd(hdw,cc);
}


Expand Down

0 comments on commit 448b9e9

Please sign in to comment.