diff options
Diffstat (limited to 'v4l_experimental/pvrusb2/pvrusb2-hdw.c')
-rw-r--r-- | v4l_experimental/pvrusb2/pvrusb2-hdw.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/v4l_experimental/pvrusb2/pvrusb2-hdw.c b/v4l_experimental/pvrusb2/pvrusb2-hdw.c index 15969ac46..2c6bfc949 100644 --- a/v4l_experimental/pvrusb2/pvrusb2-hdw.c +++ b/v4l_experimental/pvrusb2/pvrusb2-hdw.c @@ -1,6 +1,6 @@ /* * - * $Id: pvrusb2-hdw.c,v 1.9 2006/01/09 06:45:51 mcisely Exp $ + * $Id: pvrusb2-hdw.c,v 1.10 2006/01/09 06:54:46 mcisely Exp $ * * Copyright (C) 2005 Mike Isely <isely@pobox.com> * @@ -44,6 +44,7 @@ static int ctlchg = 0; static int initusbreset = 1; static int procreload = 0; static int tuner[PVR_NUM] = { [0 ... PVR_NUM-1] = -1 }; +static int tolerance[PVR_NUM] = { [0 ... PVR_NUM-1] = 0 }; module_param(ctlchg, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(ctlchg, "0=optimize ctl change 1=always accept new ctl value"); @@ -58,6 +59,8 @@ module_param(width, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(width, "video width : 720,480,352"); module_param_array(tuner, int, NULL, 0444); MODULE_PARM_DESC(tuner,"specify installed tuner type"); +module_param_array(tolerance, int, NULL, 0444); +MODULE_PARM_DESC(tolerance,"specify stream error tolerance"); #define PVR2_CTL_WRITE_ENDPOINT 0x01 #define PVR2_CTL_READ_ENDPOINT 0x81 @@ -944,6 +947,17 @@ static int get_default_tuner_type(struct pvr2_hdw *hdw) } +static unsigned int get_default_error_tolerance(struct pvr2_hdw *hdw) +{ + int unit_number = hdw->unit_number; + int tp = 0; + if ((unit_number >= 0) && (unit_number < PVR_NUM)) { + tp = tolerance[unit_number]; + } + return tp; +} + + static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw) { unsigned int idx; @@ -1005,8 +1019,15 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw) pvr2_trace(PVR2_TRACE_INIT, "pvr2_hdw_setup: video stream is %p",hdw->vid_stream); if (hdw->vid_stream) { + idx = get_default_error_tolerance(hdw); + if (idx) { + pvr2_trace(PVR2_TRACE_INIT, + "pvr2_hdw_setup: video stream %p" + " setting tolerance %u", + hdw->vid_stream,idx); + } pvr2_stream_setup(hdw->vid_stream,hdw->usb_dev, - PVR2_VID_ENDPOINT); + PVR2_VID_ENDPOINT,idx); } if (!pvr2_hdw_dev_ok(hdw)) return; @@ -2129,7 +2150,7 @@ void pvr2_hdw_render_useless_unlocked(struct pvr2_hdw *hdw) pvr2_trace(PVR2_TRACE_INIT,"render_useless"); hdw->flag_ok = 0; if (hdw->vid_stream) { - pvr2_stream_setup(hdw->vid_stream,0,0); + pvr2_stream_setup(hdw->vid_stream,0,0,0); } hdw->flag_streaming_enabled = 0; hdw->subsys_enabled_mask = 0; |