aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-12-01 16:52:02 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-12-01 16:52:02 +0000
commitde665315b73c332aaded298c612c4d24d485df6f (patch)
tree0ad3c81d7f797b1b0729cc979656bb73363c68ff /lib
parent20fc6d7c0f9a9f23217b9562a743ab681cd33f75 (diff)
downloadenigma2-de665315b73c332aaded298c612c4d24d485df6f.tar.gz
enigma2-de665315b73c332aaded298c612c4d24d485df6f.zip
remove test linkage stuff
Diffstat (limited to 'lib')
-rw-r--r--lib/dvb/frontend.cpp50
1 files changed, 21 insertions, 29 deletions
diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp
index 049753b0..c99a64ff 100644
--- a/lib/dvb/frontend.cpp
+++ b/lib/dvb/frontend.cpp
@@ -292,9 +292,9 @@ eDVBFrontend::eDVBFrontend(int adap, int fe, int &ok): m_type(-1), m_fe(fe), m_c
for (int i=0; i<entries; ++i)
m_data[i] = -1;
- m_data[7] = !m_fe;
+// m_data[7] = !m_fe;
- eDebug("m_data[7] = %d %d", m_data[7], m_fe);
+// eDebug("m_data[7] = %d %d", m_data[7], m_fe);
return;
}
@@ -384,34 +384,23 @@ void eDVBFrontend::timeout()
#endif
int eDVBFrontend::readInputpower()
{
- int power=0;
-// if ( eSystemInfo::getInstance()->canMeasureLNBCurrent() )
+ int power=m_fe;
+
+ // open front prozessor
+ int fp=::open("/dev/dbox/fp0", O_RDWR);
+ if (fp < 0)
{
-// switch ( eSystemInfo::getInstance()->getHwType() )
- {
-// case eSystemInfo::DM7000:
-// case eSystemInfo::DM7020:
- {
- // open front prozessor
- int fp=::open("/dev/dbox/fp0", O_RDWR);
- if (fp < 0)
- {
- eDebug("couldn't open fp");
- return -1;
- }
- static bool old_fp = (::ioctl(fp, FP_IOCTL_GET_ID) < 0);
- if ( ioctl( fp, old_fp ? 9 : 0x100, &power ) < 0 )
- {
- eDebug("FP_IOCTL_GET_LNB_CURRENT failed (%m)");
- return -1;
- }
- ::close(fp);
-// break;
- }
-// default:
-// eDebug("Inputpower read for platform %d not yet implemented", eSystemInfo::getInstance()->getHwType());
- }
+ eDebug("couldn't open fp");
+ return -1;
}
+ static bool old_fp = (::ioctl(fp, FP_IOCTL_GET_ID) < 0);
+ if ( ioctl( fp, old_fp ? 9 : 0x100, &power ) < 0 )
+ {
+ eDebug("FP_IOCTL_GET_LNB_CURRENT failed (%m)");
+ return -1;
+ }
+ ::close(fp);
+
return power;
}
@@ -515,7 +504,10 @@ void eDVBFrontend::tuneLoop() // called by m_tuneTimer
break;
case eSecCommand::SET_POWER_LIMITING_MODE:
{
- int fd=::open("/dev/i2c/0", O_RDWR);
+ int fd = m_fe ?
+ ::open("/dev/i2c/1", O_RDWR) :
+ ::open("/dev/i2c/0", O_RDWR);
+
unsigned char data[2];
::ioctl(fd, I2C_SLAVE_FORCE, 0x10 >> 1);
if(::read(fd, data, 1) != 1)