Kernel < 3.3 dosn't contain DTV_ENUM_DELSYS
But libc-header contains DTV_ENUM_DELSYS...
So most probably the following code needs more finetuning or we need to add DTV_ENUM_DELSYS support into kernels 3.1 and 3.2.
#ifdef DTV_ENUM_DELSYS
struct dtv_property p[1];
p[0].cmd = DTV_ENUM_DELSYS;
struct dtv_properties cmdseq;
cmdseq.num = 1;
cmdseq.props = p;
if (::ioctl(m_fd, FE_GET_PROPERTY, &cmdseq) >= 0)
{
m_delsys.clear();
for (; p[0].u.buffer.len > 0; p[0].u.buffer.len--)
{
fe_delivery_system_t delsys = (fe_delivery_system_t)p[0].u.buffer.data[p[0].u.buffer.len - 1];
m_delsys[delsys] = true;
}
}
#else
/* old DVB API, fill delsys map with some defaults */
switch (fe_info.type)
{
case FE_QPSK:
{
m_delsys[SYS_DVBS] = true;
#if DVB_API_VERSION >= 5
if (fe_info.caps & FE_CAN_2G_MODULATION) m_delsys[SYS_DVBS2] = true;
#endif
break;
}
case FE_QAM:
{
#if DVB_API_VERSION > 5 || DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR >= 6
m_delsys[SYS_DVBC_ANNEX_A] = true;
#else
m_delsys[SYS_DVBC_ANNEX_AC] = true;
#endif
break;
}
case FE_OFDM:
{
m_delsys[SYS_DVBT] = true;
#if DVB_API_VERSION > 5 || DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR >= 3
if (fe_info.caps & FE_CAN_2G_MODULATION) m_delsys[SYS_DVBT2] = true;
#endif
break;
}
case FE_ATSC: // placeholder to prevent warning
{
break;
}
}
#endif
Edited by athoik, 7 December 2014 - 13:16.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916