From 6031f5f32f81328d710896edfc6a418a628dbd4b Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 25 Feb 2012 22:19:59 +0100 Subject: [PATCH] spark: more workaround for driver bugs in cVideo Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/6bc551884733e682bb8ac4604fdea1430ce3b3bd Author: Stefan Seyfried Date: 2012-02-25 (Sat, 25 Feb 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libspark/video.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libspark/video.cpp b/libspark/video.cpp index 1e51b6f..f4936c3 100644 --- a/libspark/video.cpp +++ b/libspark/video.cpp @@ -183,6 +183,8 @@ retry: void cVideo::closeDevice(void) { lt_debug("%s\n", __func__); + /* looks like sometimes close is unhappy about non-empty buffers */ + Start(); if (fd >= 0) close(fd); fd = -1; @@ -448,7 +450,6 @@ void cVideo::Standby(unsigned int bOn) lt_debug("%s(%d)\n", __func__, bOn); if (bOn) { - Stop(1); closeDevice(); hdmi_out(false); } @@ -458,7 +459,12 @@ void cVideo::Standby(unsigned int bOn) * start. I have no idea why, but enabling it on startup leads * to strange locking problems of the framebuffer driver :-( */ if (!hdmi_enabled) + { hdmi_out(true); + /* make sure the driver has time to settle. + * again - lame, but makes it work... */ + sleep(1); + } openDevice(); } video_standby = bOn;