summaryrefslogtreecommitdiff
path: root/dxr3interface.c
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 /dxr3interface.c
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.
Diffstat (limited to 'dxr3interface.c')
-rw-r--r--dxr3interface.c24
1 files changed, 18 insertions, 6 deletions
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())