Skip to content

Commit

Permalink
V4L/DVB: ivtv: Adjust msleep() delays used to prevent tinny audio and…
Browse files Browse the repository at this point in the history
… PCI bus hang

Martin Dauskardt <martin.dauskardt@gmx.de> 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 <martin.dauskardt@gmx.de>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Andy Walls authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent 3ccc646 commit 95480f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/ivtv/ivtv-streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 95480f2

Please sign in to comment.