From: Andy Walls Date: Mon, 18 Jan 2010 00:12:24 +0000 (-0300) Subject: V4L/DVB: ivtv: Adjust msleep() delays used to prevent tinny audio and PCI bus hang X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=95480f2773588eabb35ac9354d068b068ef11e70;p=mv-sheeva.git V4L/DVB: ivtv: Adjust msleep() delays used to prevent tinny audio and PCI bus hang Martin Dauskardt has done extensive testing on what values can be used and and concluded that only 300 ms total is required to avoid bad video effects such as occasional black screen and short sync disturbances. Furthermore he determined how this 300 ms was split between the two msleep()s did matter very much, so he suggested 150ms/150ms as one acceptable alternative that is implemented here. Many thanks go to Martin. Tested-by: Martin Dauskardt Signed-off-by: Andy Walls Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/video/ivtv/ivtv-streams.c index 2f90dd255cd..1f9387f6ca2 100644 --- a/drivers/media/video/ivtv/ivtv-streams.c +++ b/drivers/media/video/ivtv/ivtv-streams.c @@ -581,10 +581,10 @@ int ivtv_start_v4l2_encode_stream(struct ivtv_stream *s) v4l2_subdev_call(itv->sd_audio, audio, s_stream, 1); /* Avoid unpredictable PCI bus hang - disable video clocks */ v4l2_subdev_call(itv->sd_video, video, s_stream, 0); - ivtv_msleep_timeout(300, 1); + ivtv_msleep_timeout(150, 1); ivtv_vapi(itv, CX2341X_ENC_INITIALIZE_INPUT, 0); v4l2_subdev_call(itv->sd_video, video, s_stream, 1); - ivtv_msleep_timeout(300, 1); + ivtv_msleep_timeout(150, 1); } /* begin_capture */