示例#1
0
CFrontend::~CFrontend(void)
{
	if (diseqcType > MINI_DISEQC)
		sendDiseqcStandby();

	close(fd);
#if HAVE_DVB_API_VERSION < 3
	if (secfd >= 0)
		close(secfd);
#endif
}
示例#2
0
CFrontend::~CFrontend(void)
{
    if (diseqcType > MINI_DISEQC)
        sendDiseqcStandby();

    /* tested on dm500, VOLTAGE_OFF switched into passthrough mode,
       FE_POWER_OFF does something else to save some power...
       It does no harm on dbox2, at least not on philips sat
       enigma does exactly the same it its savePower() function
     */
    secSetVoltage(SEC_VOLTAGE_OFF, 1);
    secSetTone(SEC_TONE_OFF, 1);
#if HAVE_DVB_API_VERSION < 3
    fop(ioctl, FE_SET_POWER_STATE, FE_POWER_OFF);
    if (secfd >= 0)
        close(secfd);
#endif
    close(fd);
}
示例#3
0
void CFrontend::Close(void)
{
	if(standby)
		return;

	INFO("[fe%d] close frontend fd %d", fenumber, fd);

	if (!slave && config.diseqcType > MINI_DISEQC)
		sendDiseqcStandby();
	// Disable tone first as it's imposed on voltage
	secSetTone(SEC_TONE_OFF, 20);
	// Disable voltage immediately and wait 50ms to prevent
	// a fast power-off -> power-on sequence where diseqc equipment
	// might not reset properly.
	secSetVoltage(SEC_VOLTAGE_OFF, 50);

	tuned	= false;
	standby	= true;;
	close(fd);
	fd = -1;
}