aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-encoder.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-encoder.c b/drivers/media/video/pvrusb2/pvrusb2-encoder.c
index 5669c8ca9ca3..20b614436d2c 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-encoder.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-encoder.c
@@ -391,22 +391,29 @@ static int pvr2_encoder_prep_config(struct pvr2_hdw *hdw)
391int pvr2_encoder_configure(struct pvr2_hdw *hdw) 391int pvr2_encoder_configure(struct pvr2_hdw *hdw)
392{ 392{
393 int ret; 393 int ret;
394 int val;
394 pvr2_trace(PVR2_TRACE_ENCODER,"pvr2_encoder_configure" 395 pvr2_trace(PVR2_TRACE_ENCODER,"pvr2_encoder_configure"
395 " (cx2341x module)"); 396 " (cx2341x module)");
396 hdw->enc_ctl_state.port = CX2341X_PORT_STREAMING; 397 hdw->enc_ctl_state.port = CX2341X_PORT_STREAMING;
397 hdw->enc_ctl_state.width = hdw->res_hor_val; 398 hdw->enc_ctl_state.width = hdw->res_hor_val;
398 hdw->enc_ctl_state.height = hdw->res_ver_val; 399 hdw->enc_ctl_state.height = hdw->res_ver_val;
399 hdw->enc_ctl_state.is_50hz = ((hdw->std_mask_cur & 400 hdw->enc_ctl_state.is_50hz = ((hdw->std_mask_cur & V4L2_STD_525_60) ?
400 (V4L2_STD_NTSC|V4L2_STD_PAL_M)) ?
401 0 : 1); 401 0 : 1);
402 402
403 ret = 0; 403 ret = 0;
404 404
405 ret |= pvr2_encoder_prep_config(hdw); 405 ret |= pvr2_encoder_prep_config(hdw);
406 406
407 /* saa7115: 0xf0 */
408 val = 0xf0;
409 if (hdw->hdw_type == PVR2_HDW_TYPE_24XXX) {
410 /* ivtv cx25840: 0x140 */
411 val = 0x140;
412 }
413
407 if (!ret) ret = pvr2_encoder_vcmd( 414 if (!ret) ret = pvr2_encoder_vcmd(
408 hdw,CX2341X_ENC_SET_NUM_VSYNC_LINES, 2, 415 hdw,CX2341X_ENC_SET_NUM_VSYNC_LINES, 2,
409 0xf0, 0xf0); 416 val, val);
410 417
411 /* setup firmware to notify us about some events (don't know why...) */ 418 /* setup firmware to notify us about some events (don't know why...) */
412 if (!ret) ret = pvr2_encoder_vcmd( 419 if (!ret) ret = pvr2_encoder_vcmd(