/* Not locked */
lfe->lfe_locked = 0;
+ lfe->lfe_status = 0;
/* Ensure it won't happen immediately */
gtimer_arm(&lfe->lfe_monitor_timer, linuxdvb_frontend_monitor, lfe, 2);
status = SIGNAL_NONE;
/* Set default period */
- tvhtrace("linuxdvb", "%s - status %d", buf, status);
+ if (fe_status != lfe->lfe_status) {
+ tvhdebug("linuxdvb", "%s - status %7s (%s%s%s%s%s%s)", buf,
+ signal2str(status),
+ (fe_status & FE_HAS_SIGNAL) ? "SIGNAL" : "",
+ (fe_status & FE_HAS_CARRIER) ? " | CARRIER" : "",
+ (fe_status & FE_HAS_VITERBI) ? " | VITERBI" : "",
+ (fe_status & FE_HAS_SYNC) ? " | SYNC" : "",
+ (fe_status & FE_HAS_LOCK) ? " | SIGNAL" : "",
+ (fe_status & FE_TIMEDOUT) ? "TIMEOUT" : "");
+ } else {
+ tvhtrace("linuxdvb", "%s - status %d (%04X)", buf, status, fe_status);
+ }
+ lfe->lfe_status = fe_status;
/* Get current mux */
mm = mmi->mmi_mux;
return SM_CODE_TUNING_FAILED;
}
}
+ lfe->lfe_locked = 0;
+ lfe->lfe_status = 0;
/* S2 tuning */
#if DVB_API_VERSION >= 5
SIGNAL_NONE
} signal_state_t;
+static struct strtab signal_statetab[] = {
+ { "GOOD", SIGNAL_GOOD },
+ { "BAD", SIGNAL_BAD },
+ { "FAINT", SIGNAL_BAD },
+ { "NONE", SIGNAL_BAD },
+};
+
+static inline const char * signal2str ( signal_state_t st )
+{
+ const char *r = val2str(st, signal_statetab);
+ if (!r) r = "UNKNOWN";
+ return r;
+}
+
/**
* Streaming messages are sent from the pad to its receivers
*/