diff options
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 85e61d4b644e..a85ffdaadccb 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -3352,6 +3352,7 @@ static void pvr2_hdw_cmd_modeswitch(struct pvr2_hdw *hdw,int digitalFl) | |||
3352 | default: break; | 3352 | default: break; |
3353 | } | 3353 | } |
3354 | 3354 | ||
3355 | pvr2_hdw_untrip_unlocked(hdw); | ||
3355 | hdw->pathway_state = cmode; | 3356 | hdw->pathway_state = cmode; |
3356 | } | 3357 | } |
3357 | 3358 | ||
@@ -3814,6 +3815,7 @@ static int pvr2_hdw_state_eval(struct pvr2_hdw *hdw) | |||
3814 | unsigned int st; | 3815 | unsigned int st; |
3815 | int state_updated = 0; | 3816 | int state_updated = 0; |
3816 | int callback_flag = 0; | 3817 | int callback_flag = 0; |
3818 | int analog_mode; | ||
3817 | 3819 | ||
3818 | pvr2_trace(PVR2_TRACE_STBITS, | 3820 | pvr2_trace(PVR2_TRACE_STBITS, |
3819 | "Drive state check START"); | 3821 | "Drive state check START"); |
@@ -3824,17 +3826,20 @@ static int pvr2_hdw_state_eval(struct pvr2_hdw *hdw) | |||
3824 | /* Process all state and get back over disposition */ | 3826 | /* Process all state and get back over disposition */ |
3825 | state_updated = pvr2_hdw_state_update(hdw); | 3827 | state_updated = pvr2_hdw_state_update(hdw); |
3826 | 3828 | ||
3829 | analog_mode = (hdw->pathway_state != PVR2_PATHWAY_DIGITAL); | ||
3830 | |||
3827 | /* Update master state based upon all other states. */ | 3831 | /* Update master state based upon all other states. */ |
3828 | if (!hdw->flag_ok) { | 3832 | if (!hdw->flag_ok) { |
3829 | st = PVR2_STATE_DEAD; | 3833 | st = PVR2_STATE_DEAD; |
3830 | } else if (hdw->fw1_state != FW1_STATE_OK) { | 3834 | } else if (hdw->fw1_state != FW1_STATE_OK) { |
3831 | st = PVR2_STATE_COLD; | 3835 | st = PVR2_STATE_COLD; |
3832 | } else if (!hdw->state_encoder_ok) { | 3836 | } else if (analog_mode && !hdw->state_encoder_ok) { |
3833 | st = PVR2_STATE_WARM; | 3837 | st = PVR2_STATE_WARM; |
3834 | } else if (hdw->flag_tripped || hdw->flag_decoder_missed) { | 3838 | } else if (hdw->flag_tripped || |
3839 | (analog_mode && hdw->flag_decoder_missed)) { | ||
3835 | st = PVR2_STATE_ERROR; | 3840 | st = PVR2_STATE_ERROR; |
3836 | } else if (hdw->state_usbstream_run && | 3841 | } else if (hdw->state_usbstream_run && |
3837 | ((hdw->pathway_state != PVR2_PATHWAY_ANALOG) || | 3842 | (!analog_mode || |
3838 | (hdw->state_encoder_run && hdw->state_decoder_run))) { | 3843 | (hdw->state_encoder_run && hdw->state_decoder_run))) { |
3839 | st = PVR2_STATE_RUN; | 3844 | st = PVR2_STATE_RUN; |
3840 | } else { | 3845 | } else { |