From 884a7ad99d2b60f3932c79cbf88f7b4cbccdaa0a Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Wed, 17 Feb 2010 20:22:37 +0100 Subject: fix channel switching --- dxr3device.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dxr3device.c b/dxr3device.c index 7b3f754..4d933ad 100644 --- a/dxr3device.c +++ b/dxr3device.c @@ -119,6 +119,7 @@ bool cDxr3Device::CanReplay() const bool cDxr3Device::SetPlayMode(ePlayMode PlayMode) { dsyslog("[dxr3-device] setting playmode %d", PlayMode); + uint32_t val; switch (PlayMode) { case pmNone: @@ -127,6 +128,13 @@ bool cDxr3Device::SetPlayMode(ePlayMode PlayMode) audioOut->setEnabled(false); scrSet = false; playCount = 0; + + // 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 += 10000; + CHECK(ioctl(fdControl, EM8300_IOCTL_SCR_SET, &val)); break; case pmAudioVideo: -- cgit v1.2.3