diff options
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-encoder.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-encoder.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-encoder.c b/drivers/media/video/pvrusb2/pvrusb2-encoder.c index d094cac9f7a5..3ec8093ae97a 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-encoder.c +++ b/drivers/media/video/pvrusb2/pvrusb2-encoder.c | |||
@@ -363,15 +363,19 @@ int pvr2_encoder_start(struct pvr2_hdw *hdw) | |||
363 | pvr2_encoder_vcmd(hdw,CX2341X_ENC_MUTE_VIDEO,1, | 363 | pvr2_encoder_vcmd(hdw,CX2341X_ENC_MUTE_VIDEO,1, |
364 | hdw->input_val == PVR2_CVAL_INPUT_RADIO ? 1 : 0); | 364 | hdw->input_val == PVR2_CVAL_INPUT_RADIO ? 1 : 0); |
365 | 365 | ||
366 | if (hdw->config == pvr2_config_vbi) { | 366 | switch (hdw->config) { |
367 | case pvr2_config_vbi: | ||
367 | status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_START_CAPTURE,2, | 368 | status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_START_CAPTURE,2, |
368 | 0x01,0x14); | 369 | 0x01,0x14); |
369 | } else if (hdw->config == pvr2_config_mpeg) { | 370 | break; |
371 | case pvr2_config_mpeg: | ||
370 | status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_START_CAPTURE,2, | 372 | status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_START_CAPTURE,2, |
371 | 0,0x13); | 373 | 0,0x13); |
372 | } else { | 374 | break; |
375 | default: /* Unhandled cases for now */ | ||
373 | status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_START_CAPTURE,2, | 376 | status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_START_CAPTURE,2, |
374 | 0,0x13); | 377 | 0,0x13); |
378 | break; | ||
375 | } | 379 | } |
376 | if (!status) { | 380 | if (!status) { |
377 | hdw->subsys_enabled_mask |= (1<<PVR2_SUBSYS_B_ENC_RUN); | 381 | hdw->subsys_enabled_mask |= (1<<PVR2_SUBSYS_B_ENC_RUN); |
@@ -386,15 +390,19 @@ int pvr2_encoder_stop(struct pvr2_hdw *hdw) | |||
386 | /* mask all interrupts */ | 390 | /* mask all interrupts */ |
387 | pvr2_write_register(hdw, 0x0048, 0xffffffff); | 391 | pvr2_write_register(hdw, 0x0048, 0xffffffff); |
388 | 392 | ||
389 | if (hdw->config == pvr2_config_vbi) { | 393 | switch (hdw->config) { |
394 | case pvr2_config_vbi: | ||
390 | status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_STOP_CAPTURE,3, | 395 | status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_STOP_CAPTURE,3, |
391 | 0x01,0x01,0x14); | 396 | 0x01,0x01,0x14); |
392 | } else if (hdw->config == pvr2_config_mpeg) { | 397 | break; |
398 | case pvr2_config_mpeg: | ||
393 | status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_STOP_CAPTURE,3, | 399 | status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_STOP_CAPTURE,3, |
394 | 0x01,0,0x13); | 400 | 0x01,0,0x13); |
395 | } else { | 401 | break; |
402 | default: /* Unhandled cases for now */ | ||
396 | status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_STOP_CAPTURE,3, | 403 | status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_STOP_CAPTURE,3, |
397 | 0x01,0,0x13); | 404 | 0x01,0,0x13); |
405 | break; | ||
398 | } | 406 | } |
399 | 407 | ||
400 | /* change some GPIO data */ | 408 | /* change some GPIO data */ |