summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraustriancoder <austriancoder>2004-09-15 13:46:19 +0000
committeraustriancoder <austriancoder>2004-09-15 13:46:19 +0000
commit720b6e62a42909a17969d5be40ca907d5752cc09 (patch)
treed88f6799d24364be7a665657f0798a9716a5bd06
parentb04632b8c2c28575b56592f386878f1c654dbe99 (diff)
downloadvdr-plugin-dxr3-720b6e62a42909a17969d5be40ca907d5752cc09.tar.gz
vdr-plugin-dxr3-720b6e62a42909a17969d5be40ca907d5752cc09.tar.bz2
we get now videomode from driver and set only a new one, if the wanted one is different to the driver defaults one.
-rw-r--r--HISTORY4
-rw-r--r--dxr3interface.c24
2 files changed, 21 insertions, 7 deletions
diff --git a/HISTORY b/HISTORY
index f8ff2f1..daf9c25 100644
--- a/HISTORY
+++ b/HISTORY
@@ -239,4 +239,6 @@ NOTE: I havent found time to include all of the languages, will be done in pre2
- dxr3memcpy.c/h: fix to support older compilers like gcc-2.95
- dxr3memcpy.c/h: should now compile on alpha and powerpc
- added many comments into source
-- using doxygen for docs \ No newline at end of file
+- using doxygen for docs
+- cDxr3Interface::ConfigureDevice(): we get now videomode from driver and set only a
+ new one, if the wanted one is different to the driver defaults one. \ No newline at end of file
diff --git a/dxr3interface.c b/dxr3interface.c
index 90cd990..6562a3c 100644
--- a/dxr3interface.c
+++ b/dxr3interface.c
@@ -919,9 +919,17 @@ void cDxr3Interface::UploadMicroCode()
//! config and setup device via ioctl calls
void cDxr3Interface::ConfigureDevice()
{
- uint32_t videomode = 0;
+ // get videomode from driver
+ uint32_t videomode_from_driver = 0;
+
+ if (ioctl(m_fdControl, EM8300_IOCTL_GET_VIDEOMODE, &videomode_from_driver) == -1)
+ {
+ cLog::Instance() << "Unable to get videomode\n";
+ exit(1);
+ }
// set video mode
+ uint32_t videomode = 0;
if (cDxr3ConfigData::Instance().GetVideoMode() == PAL)
{
videomode = EM8300_VIDEOMODE_PAL;
@@ -947,12 +955,16 @@ void cDxr3Interface::ConfigureDevice()
}
}
- // make ioctl
- if (ioctl(m_fdControl, EM8300_IOCTL_SET_VIDEOMODE, &videomode) == -1)
+ // are the two videmodes different?
+ if (videomode_from_driver != videomode)
{
- cLog::Instance() << "Unable to set videomode\n";
- exit(1);
- }
+ // make ioctl
+ if (ioctl(m_fdControl, EM8300_IOCTL_SET_VIDEOMODE, &videomode) == -1)
+ {
+ cLog::Instance() << "Unable to set videomode\n";
+ exit(1);
+ }
+ }
// set audio mode
if (!cDxr3ConfigData::Instance().GetUseDigitalOut())