- { { { 0xe0, 0x10, 0x38, 0xf0, 0x00, 0x00 }, 4 }, 0 },
- { { { 0xe0, 0x10, 0x38, 0xf2, 0x00, 0x00 }, 4 }, 0 },
- { { { 0xe0, 0x10, 0x38, 0xf1, 0x00, 0x00 }, 4 }, 0 },
- { { { 0xe0, 0x10, 0x38, 0xf3, 0x00, 0x00 }, 4 }, 0 },
- { { { 0xe0, 0x10, 0x38, 0xf4, 0x00, 0x00 }, 4 }, 0 },
- { { { 0xe0, 0x10, 0x38, 0xf6, 0x00, 0x00 }, 4 }, 0 },
- { { { 0xe0, 0x10, 0x38, 0xf5, 0x00, 0x00 }, 4 }, 0 },
- { { { 0xe0, 0x10, 0x38, 0xf7, 0x00, 0x00 }, 4 }, 0 },
- { { { 0xe0, 0x10, 0x38, 0xf8, 0x00, 0x00 }, 4 }, 0 },
- { { { 0xe0, 0x10, 0x38, 0xfa, 0x00, 0x00 }, 4 }, 0 },
- { { { 0xe0, 0x10, 0x38, 0xf9, 0x00, 0x00 }, 4 }, 0 },
- { { { 0xe0, 0x10, 0x38, 0xfb, 0x00, 0x00 }, 4 }, 0 },
- { { { 0xe0, 0x10, 0x38, 0xfc, 0x00, 0x00 }, 4 }, 0 },
- { { { 0xe0, 0x10, 0x38, 0xfe, 0x00, 0x00 }, 4 }, 0 },
- { { { 0xe0, 0x10, 0x38, 0xfd, 0x00, 0x00 }, 4 }, 0 },
- { { { 0xe0, 0x10, 0x38, 0xff, 0x00, 0x00 }, 4 }, 0 }
+ { { { 0xe0, 0x10, 0x38, 0xf0, 0x00, 0x00 }, 4 }, 0 },
+ { { { 0xe0, 0x10, 0x38, 0xf2, 0x00, 0x00 }, 4 }, 0 },
+ { { { 0xe0, 0x10, 0x38, 0xf1, 0x00, 0x00 }, 4 }, 0 },
+ { { { 0xe0, 0x10, 0x38, 0xf3, 0x00, 0x00 }, 4 }, 0 },
+ { { { 0xe0, 0x10, 0x38, 0xf4, 0x00, 0x00 }, 4 }, 0 },
+ { { { 0xe0, 0x10, 0x38, 0xf6, 0x00, 0x00 }, 4 }, 0 },
+ { { { 0xe0, 0x10, 0x38, 0xf5, 0x00, 0x00 }, 4 }, 0 },
+ { { { 0xe0, 0x10, 0x38, 0xf7, 0x00, 0x00 }, 4 }, 0 },
+ { { { 0xe0, 0x10, 0x38, 0xf8, 0x00, 0x00 }, 4 }, 0 },
+ { { { 0xe0, 0x10, 0x38, 0xfa, 0x00, 0x00 }, 4 }, 0 },
+ { { { 0xe0, 0x10, 0x38, 0xf9, 0x00, 0x00 }, 4 }, 0 },
+ { { { 0xe0, 0x10, 0x38, 0xfb, 0x00, 0x00 }, 4 }, 0 },
+ { { { 0xe0, 0x10, 0x38, 0xfc, 0x00, 0x00 }, 4 }, 0 },
+ { { { 0xe0, 0x10, 0x38, 0xfe, 0x00, 0x00 }, 4 }, 0 },
+ { { { 0xe0, 0x10, 0x38, 0xfd, 0x00, 0x00 }, 4 }, 0 },
+ { { { 0xe0, 0x10, 0x38, 0xff, 0x00, 0x00 }, 4 }, 0 }
- msg_Dbg(p_input, "Frontend Info:\tname = %s\n\t\tfrequency_min = %d\n\t\tfrequency_max = %d\n\t\tfrequency_stepsize = %d\n\t\tfrequency_tolerance = %d\n\t\tsymbol_rate_min = %d\n\t\tsymbol_rate_max = %d\n\t\tsymbol_rate_tolerance (ppm) = %d\n\t\tnotifier_delay (ms)= %d\n",
- info->name,
- info->frequency_min,
- info->frequency_max,
- info->frequency_stepsize,
- info->frequency_tolerance,
- info->symbol_rate_min,
- info->symbol_rate_max,
- info->symbol_rate_tolerance,
- info->notifier_delay );
-
+ /* Print out frontend capabilities. */
+ msg_Dbg(p_input, "Frontend Info:\tname = %s\n\t\tfrequency_min = %d\n\t\tfrequency_max = %d\n\t\tfrequency_stepsize = %d\n\t\tfrequency_tolerance = %d\n\t\tsymbol_rate_min = %d\n\t\tsymbol_rate_max = %d\n\t\tsymbol_rate_tolerance (ppm) = %d\n\t\tnotifier_delay (ms)= %d\n",
+ info->name,
+ info->frequency_min,
+ info->frequency_max,
+ info->frequency_stepsize,
+ info->frequency_tolerance,
+ info->symbol_rate_min,
+ info->symbol_rate_max,
+ info->symbol_rate_tolerance,
+ info->notifier_delay );
+ msg_Dbg(p_input, "Frontend Info capability list:");
+ if (info->caps&FE_IS_STUPID)
+ msg_Dbg(p_input, "no capabilities - frontend is stupid!");
+ if (info->caps&FE_CAN_INVERSION_AUTO)
+ msg_Dbg(p_input, "inversion auto");
+ if (info->caps&FE_CAN_FEC_1_2)
+ msg_Dbg(p_input, "forward error correction 1/2");
+ if (info->caps&FE_CAN_FEC_2_3)
+ msg_Dbg(p_input, "forward error correction 2/3");
+ if (info->caps&FE_CAN_FEC_3_4)
+ msg_Dbg(p_input, "forward error correction 3/4");
+ if (info->caps&FE_CAN_FEC_4_5)
+ msg_Dbg(p_input, "forward error correction 4/5");
+ if (info->caps&FE_CAN_FEC_5_6)
+ msg_Dbg(p_input, "forward error correction 5/6");
+ if (info->caps&FE_CAN_FEC_6_7)
+ msg_Dbg(p_input, "forward error correction 6/7");
+ if (info->caps&FE_CAN_FEC_7_8)
+ msg_Dbg(p_input, "forward error correction 7/8");
+ if (info->caps&FE_CAN_FEC_8_9)
+ msg_Dbg(p_input, "forward error correction 8/9");
+ if (info->caps&FE_CAN_FEC_AUTO)
+ msg_Dbg(p_input, "forward error correction auto");
+ if (info->caps&FE_CAN_QPSK)
+ msg_Dbg(p_input, "card can do QPSK");
+ if (info->caps&FE_CAN_QAM_16)
+ msg_Dbg(p_input, "card can do QAM 16");
+ if (info->caps&FE_CAN_QAM_32)
+ msg_Dbg(p_input, "card can do QAM 32");
+ if (info->caps&FE_CAN_QAM_64)
+ msg_Dbg(p_input, "card can do QAM 64");
+ if (info->caps&FE_CAN_QAM_128)
+ msg_Dbg(p_input, "card can do QAM 128");
+ if (info->caps&FE_CAN_QAM_256)
+ msg_Dbg(p_input, "card can do QAM 256");
+ if (info->caps&FE_CAN_QAM_AUTO)
+ msg_Dbg(p_input, "card can do QAM auto");
+ if (info->caps&FE_CAN_TRANSMISSION_MODE_AUTO)
+ msg_Dbg(p_input, "transmission mode auto");
+ if (info->caps&FE_CAN_BANDWIDTH_AUTO)
+ msg_Dbg(p_input, "bandwidth mode auto");
+ if (info->caps&FE_CAN_GUARD_INTERVAL_AUTO)
+ msg_Dbg(p_input, "guard interval mode auto");
+ if (info->caps&FE_CAN_HIERARCHY_AUTO)
+ msg_Dbg(p_input, "hierarchy mode auto");
+ if (info->caps&FE_CAN_MUTE_TS)
+ msg_Dbg(p_input, "card can mute TS");
+ if (info->caps&FE_CAN_CLEAN_SETUP)
+ msg_Dbg(p_input, "clean setup");
+ msg_Dbg(p_input,"End of capability list");
+
- case FE_HAS_SIGNAL: /* found something above the noise level */
- msg_Dbg(p_input, "ioctl_CheckQPSK: FE_HAS_SIGNAL");
- break;
- case FE_HAS_CARRIER: /* found a DVB signal */
- msg_Dbg(p_input, "ioctl_CheckQPSK: FE_HAS_CARRIER");
- break;
- case FE_HAS_VITERBI: /* FEC is stable */
- msg_Dbg(p_input, "ioctl_CheckQPSK: FE_HAS_VITERBI");
- break;
- case FE_HAS_SYNC: /* found sync bytes */
- msg_Dbg(p_input, "ioctl_CheckQPSK: FE_HAS_SYNC");
- break;
- case FE_HAS_LOCK: /* everything's working... */
- msg_Dbg(p_input, "ioctl_CheckQPSK: FE_HAS_LOCK");
- break;
- case FE_TIMEDOUT: /* no lock within the last ~2 seconds */
- msg_Dbg(p_input, "ioctl_CheckQPSK: FE_TIMEDOUT");
- return -2;
- case FE_REINIT: /* frontend was reinitialized, */
- /* application is recommned to reset */
- /* DiSEqC, tone and parameters */
- msg_Dbg(p_input, "ioctl_CheckQPSK: FE_REINIT");
- return -1;
+ case FE_HAS_SIGNAL: /* found something above the noise level */
+ msg_Dbg(p_input, "ioctl_CheckFrontend: FE_HAS_SIGNAL");
+ break;
+ case FE_HAS_CARRIER: /* found a DVB signal */
+ msg_Dbg(p_input, "ioctl_CheckFrontend: FE_HAS_CARRIER");
+ break;
+ case FE_HAS_VITERBI: /* FEC is stable */
+ msg_Dbg(p_input, "ioctl_CheckFrontend: FE_HAS_VITERBI");
+ break;
+ case FE_HAS_SYNC: /* found sync bytes */
+ msg_Dbg(p_input, "ioctl_CheckFrontend: FE_HAS_SYNC");
+ break;
+ case FE_HAS_LOCK: /* everything's working... */
+ msg_Dbg(p_input, "ioctl_CheckFrontend: FE_HAS_LOCK");
+ break;
+ case FE_TIMEDOUT: /* no lock within the last ~2 seconds */
+ msg_Dbg(p_input, "ioctl_CheckFrontend: FE_TIMEDOUT");
+ return -2;
+ case FE_REINIT: /* frontend was reinitialized, */
+ /* application is recommned to reset */
+ /* DiSEqC, tone and parameters */
+ msg_Dbg(p_input, "ioctl_CheckFrontend: FE_REINIT");
+ return -1;
+
+/*****************************************************************************
+ * dvb_DecodeBandwidth : decodes arguments for DVB S/C/T card
+ *****************************************************************************/
+fe_bandwidth_t dvb_DecodeBandwidth(input_thread_t * p_input, int bandwidth)
+{
+ fe_bandwidth_t fe_bandwidth = 0;
+
+ switch (bandwidth)
+ {
+ case 0:
+ fe_bandwidth = BANDWIDTH_AUTO;
+ break;
+ case 6:
+ fe_bandwidth = BANDWIDTH_6_MHZ;
+ break;
+ case 7:
+ fe_bandwidth = BANDWIDTH_7_MHZ;
+ break;
+ case 8:
+ fe_bandwidth = BANDWIDTH_8_MHZ;
+ break;
+ default:
+ msg_Dbg( p_input, "terrestrial dvb has bandwidth not set, using auto");
+ fe_bandwidth = BANDWIDTH_AUTO;
+ break;
+ }
+
+ return fe_bandwidth;
+}
+
+fe_code_rate_t dvb_DecodeFEC(input_thread_t * p_input, int fec)
+{
+ fe_code_rate_t fe_fec = FEC_NONE;
+
+ switch( fec )
+ {
+ case 1:
+ fe_fec = FEC_1_2;
+ break;
+ case 2:
+ fe_fec = FEC_2_3;
+ break;
+ case 3:
+ fe_fec = FEC_3_4;
+ break;
+ case 4:
+ fe_fec = FEC_4_5;
+ break;
+ case 5:
+ fe_fec = FEC_5_6;
+ break;
+ case 6:
+ fe_fec = FEC_6_7;
+ break;
+ case 7:
+ fe_fec = FEC_7_8;
+ break;
+ case 8:
+ fe_fec = FEC_8_9;
+ break;
+ case 9:
+ fe_fec = FEC_AUTO;
+ break;
+ default:
+ /* cannot happen */
+ fe_fec = FEC_NONE;
+ msg_Err( p_input, "argument has invalid FEC (%d)", fec);
+ break;
+ }
+ return fe_fec;
+}
+
+fe_modulation_t dvb_DecodeModulation(input_thread_t * p_input, int modulation)
+{
+ fe_modulation_t fe_modulation = 0;
+
+ switch( modulation )
+ {
+ case -1:
+ fe_modulation = QPSK;
+ break;
+ case 0:
+ fe_modulation = QAM_AUTO;
+ break;
+ case 16:
+ fe_modulation = QAM_16;
+ break;
+ case 32:
+ fe_modulation = QAM_32;
+ break;
+ case 64:
+ fe_modulation = QAM_64;
+ break;
+ case 128:
+ fe_modulation = QAM_128;
+ break;
+ case 256:
+ fe_modulation = QAM_256;
+ break;
+ default:
+ msg_Dbg( p_input, "terrestrial/cable dvb has constellation/modulation not set, using auto");
+ fe_modulation = QAM_AUTO;
+ break;
+ }
+ return fe_modulation;
+}
+
+fe_transmit_mode_t dvb_DecodeTransmission(input_thread_t * p_input, int transmission)
+{
+ fe_transmit_mode_t fe_transmission = 0;
+
+ switch( transmission )
+ {
+ case 0:
+ fe_transmission = TRANSMISSION_MODE_AUTO;
+ break;
+ case 2:
+ fe_transmission = TRANSMISSION_MODE_2K;
+ break;
+ case 8:
+ fe_transmission = TRANSMISSION_MODE_8K;
+ break;
+ default:
+ msg_Dbg( p_input, "terrestrial dvb has transmission mode not set, using auto");
+ fe_transmission = TRANSMISSION_MODE_AUTO;
+ break;
+ }
+ return fe_transmission;
+}
+
+fe_guard_interval_t dvb_DecodeGuardInterval(input_thread_t * p_input, int guard)
+{
+ fe_guard_interval_t fe_guard = 0;
+
+ switch( guard )
+ {
+ case 0:
+ fe_guard = GUARD_INTERVAL_AUTO;
+ break;
+ case 4:
+ fe_guard = GUARD_INTERVAL_1_4;
+ break;
+ case 8:
+ fe_guard = GUARD_INTERVAL_1_8;
+ break;
+ case 16:
+ fe_guard = GUARD_INTERVAL_1_16;
+ break;
+ case 32:
+ fe_guard = GUARD_INTERVAL_1_32;
+ break;
+ default:
+ msg_Dbg( p_input, "terrestrial dvb has guard interval not set, using auto");
+ fe_guard = GUARD_INTERVAL_AUTO;
+ break;
+ }
+ return fe_guard;
+}
+
+fe_hierarchy_t dvb_DecodeHierarchy(input_thread_t * p_input, int hierarchy)
+{
+ fe_hierarchy_t fe_hierarchy = 0;
+
+ switch (hierarchy)
+ {
+ case -1:
+ fe_hierarchy = HIERARCHY_NONE;
+ break;
+ case 0:
+ fe_hierarchy = HIERARCHY_AUTO;
+ break;
+ case 1:
+ fe_hierarchy = HIERARCHY_1;
+ break;
+ case 2:
+ fe_hierarchy = HIERARCHY_2;
+ break;
+ case 4:
+ fe_hierarchy = HIERARCHY_4;
+ break;
+ default:
+ msg_Dbg( p_input, "terrestrial dvb has hierarchy not set, using auto");
+ fe_hierarchy = HIERARCHY_AUTO;
+ break;
+ }
+ return fe_hierarchy;
+}
+
+fe_spectral_inversion_t dvb_DecodeInversion(input_thread_t * p_input, int inversion)
+{
+ fe_spectral_inversion_t fe_inversion=0;
+
+ switch (inversion)
+ {
+ case 0:
+ fe_inversion = INVERSION_OFF;
+ break;
+ case 1:
+ fe_inversion = INVERSION_ON;
+ break;
+ case 2:
+ fe_inversion = INVERSION_AUTO;
+ break;
+ default:
+ msg_Dbg( p_input, "dvb has inversion/polarisation not set, using auto");
+ fe_inversion = INVERSION_AUTO;
+ break;
+ }
+ return fe_inversion;
+}