From a9b09976c0dc86d75f5b9814b870cf99f7c3f23a Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Tue, 29 Jun 2010 16:25:18 +0200 Subject: improve cDxr3Device::Clear() by using scr hack --- dxr3device.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dxr3device.c b/dxr3device.c index c116b74..0f623bd 100644 --- a/dxr3device.c +++ b/dxr3device.c @@ -173,12 +173,16 @@ void cDxr3Device::TrickSpeed(int Speed) void cDxr3Device::Clear() { dsyslog("[dxr3-device] clear"); + uint32_t val = 0; - uint32_t ioval = EM8300_SUBDEVICE_VIDEO; - CHECK(ioctl(fdControl, EM8300_IOCTL_FLUSH, &ioval)); + // here we use some magic + // set the scr into future so that the firmware/hardware + // clears the buffers. + CHECK(ioctl(fdControl, EM8300_IOCTL_SCR_GET, &val)); + val += TIMESTAMPS_500MS * 4; + CHECK(ioctl(fdControl, EM8300_IOCTL_SCR_SET, &val)); audioOut->flush(); - cDevice::Clear(); } -- cgit v1.2.3