fe_status_t fe_status;
th_dvb_table_t *tdt;
struct dvb_frontend_parameters p;
+ char buf[100];
while(1) {
ts.tv_sec = time(NULL) + 1;
i = ioctl(tda->tda_fe_fd, FE_SET_FRONTEND, &p);
if(i != 0) {
- syslog(LOG_ERR, "\"%s\" tuning to %dHz"
+ dvb_mux_nicename(buf, sizeof(buf), tdmi);
+ syslog(LOG_ERR, "\"%s\" tuning to \"%s\""
" -- Front configuration failed -- %s",
- tda->tda_rootpath, tdmi->tdmi_fe_params->frequency,
- strerror(errno));
+ tda->tda_rootpath, buf, strerror(errno));
}
free(c);
{
dvb_fe_cmd_t *c;
th_dvb_adapter_t *tda = tdmi->tdmi_adapter;
+ char buf[100];
tdmi->tdmi_state = state;
tda->tda_mux_current = tdmi;
- if(maylog)
- syslog(LOG_DEBUG, "\"%s\" tuning to mux \"%s\"",
- tda->tda_rootpath, "FIXME");
-
+ if(maylog) {
+ dvb_mux_nicename(buf, sizeof(buf), tdmi);
+ syslog(LOG_DEBUG, "\"%s\" tuning to mux \"%s\"", tda->tda_rootpath, buf);
+ }
/* Add tables which will be activated once the tuning is completed */
dvb_table_add_default(tdmi);
}
}
+static const char *
+dvb_polarisation_to_str_long(int pol)
+{
+ switch(pol) {
+ case POLARISATION_VERTICAL: return "Vertical";
+ case POLARISATION_HORIZONTAL: return "Horizontal";
+ default: return "??";
+ }
+}
th_dvb_mux_instance_t *
return txt;
}
+
+/**
+ *
+ */
+void
+dvb_mux_nicename(char *buf, size_t size, th_dvb_mux_instance_t *tdmi)
+{
+ if(tdmi->tdmi_adapter->tda_fe_info->type == FE_QPSK)
+ snprintf(buf, size, "%dkHz %s port %d", tdmi->tdmi_fe_params->frequency,
+ dvb_polarisation_to_str_long(tdmi->tdmi_polarisation),
+ tdmi->tdmi_switchport);
+ else
+ snprintf(buf, size, "%dHz", tdmi->tdmi_fe_params->frequency);
+}
th_dvb_adapter_t *dvb_adapter_find_by_identifier(const char *identifier);
th_dvb_mux_instance_t *dvb_mux_find_by_identifier(const char *identifier);
const char *dvb_mux_status(th_dvb_mux_instance_t *tdmi);
+void dvb_mux_nicename(char *buf, size_t size, th_dvb_mux_instance_t *tdmi);
#endif /* DVB_SUPPORT_H */