* It's now possible to enable/disable the signal quality monitor per
adapter. This is now default off as it seem to mostly cause problems for people and it's only useful if you have complex setups with multiple adapters, etc.
This commit is contained in:
parent
b3da58f631
commit
8d32499e11
6 changed files with 52 additions and 8 deletions
5
debian/changelog
vendored
5
debian/changelog
vendored
|
@ -5,6 +5,11 @@ hts-tvheadend (2.8) hts; urgency=low
|
|||
* Added support for manual creation of DVR entries. Prior to this it
|
||||
was only possible to schedule a recording based on EPG entries.
|
||||
|
||||
* It's now possible to enable/disable the signal quality monitor per
|
||||
adapter. This is now default off as it seem to mostly cause problems
|
||||
for people and it's only useful if you have complex setups with
|
||||
multiple adapters, etc.
|
||||
|
||||
hts-tvheadend (2.7) hts; urgency=low
|
||||
|
||||
* Added support for DVB subtitles. Currently only forwarded over HTSP
|
||||
|
|
|
@ -163,6 +163,7 @@ typedef struct th_dvb_adapter {
|
|||
char *tda_identifier;
|
||||
uint32_t tda_autodiscovery;
|
||||
uint32_t tda_idlescan;
|
||||
uint32_t tda_qmon;
|
||||
uint32_t tda_diseqc_version;
|
||||
char *tda_displayname;
|
||||
|
||||
|
@ -213,6 +214,8 @@ void dvb_adapter_set_auto_discovery(th_dvb_adapter_t *tda, int on);
|
|||
|
||||
void dvb_adapter_set_idlescan(th_dvb_adapter_t *tda, int on);
|
||||
|
||||
void dvb_adapter_set_qmon(th_dvb_adapter_t *tda, int on);
|
||||
|
||||
void dvb_adapter_set_diseqc_version(th_dvb_adapter_t *tda, unsigned int v);
|
||||
|
||||
void dvb_adapter_clone(th_dvb_adapter_t *dst, th_dvb_adapter_t *src);
|
||||
|
|
|
@ -78,6 +78,7 @@ tda_save(th_dvb_adapter_t *tda)
|
|||
htsmsg_add_str(m, "displayname", tda->tda_displayname);
|
||||
htsmsg_add_u32(m, "autodiscovery", tda->tda_autodiscovery);
|
||||
htsmsg_add_u32(m, "idlescan", tda->tda_idlescan);
|
||||
htsmsg_add_u32(m, "qmon", tda->tda_qmon);
|
||||
htsmsg_add_u32(m, "diseqc_version", tda->tda_diseqc_version);
|
||||
hts_settings_save(m, "dvbadapters/%s", tda->tda_identifier);
|
||||
htsmsg_destroy(m);
|
||||
|
@ -145,6 +146,25 @@ dvb_adapter_set_idlescan(th_dvb_adapter_t *tda, int on)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void
|
||||
dvb_adapter_set_qmon(th_dvb_adapter_t *tda, int on)
|
||||
{
|
||||
if(tda->tda_qmon == on)
|
||||
return;
|
||||
|
||||
lock_assert(&global_lock);
|
||||
|
||||
tvhlog(LOG_NOTICE, "dvb", "Adapter \"%s\" quality monitoring set to: %s",
|
||||
tda->tda_displayname, on ? "On" : "Off");
|
||||
|
||||
tda->tda_qmon = on;
|
||||
tda_save(tda);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -298,6 +318,7 @@ dvb_adapter_init(uint32_t adapter_mask)
|
|||
|
||||
htsmsg_get_u32(c, "autodiscovery", &tda->tda_autodiscovery);
|
||||
htsmsg_get_u32(c, "idlescan", &tda->tda_idlescan);
|
||||
htsmsg_get_u32(c, "qmon", &tda->tda_qmon);
|
||||
htsmsg_get_u32(c, "diseqc_version", &tda->tda_diseqc_version);
|
||||
}
|
||||
htsmsg_destroy(l);
|
||||
|
@ -337,11 +358,14 @@ dvb_adapter_mux_scanner(void *aux)
|
|||
}
|
||||
|
||||
if(!tda->tda_idlescan && TAILQ_FIRST(&tda->tda_scan_queues[0]) == NULL) {
|
||||
/* Idlescan is disabled and no muxes are bad.
|
||||
If the currently tuned mux is ok, we can stick to it */
|
||||
/* Idlescan is disabled and no muxes are bad */
|
||||
|
||||
if(!tda->tda_qmon)
|
||||
return; // Quality monitoring is disabled
|
||||
|
||||
/* If the currently tuned mux is ok, we can stick to it */
|
||||
|
||||
tdmi = tda->tda_mux_current;
|
||||
|
||||
if(tdmi != NULL && tdmi->tdmi_quality > 90)
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -123,13 +123,17 @@ dvb_fe_monitor(void *aux)
|
|||
}
|
||||
|
||||
if(status != TDMI_FE_UNKNOWN) {
|
||||
q = tdmi->tdmi_quality + (status - TDMI_FE_OK + 1);
|
||||
q = MAX(MIN(q, 100), 0);
|
||||
if(tda->tda_qmon) {
|
||||
q = tdmi->tdmi_quality + (status - TDMI_FE_OK + 1);
|
||||
q = MAX(MIN(q, 100), 0);
|
||||
} else {
|
||||
q = 100;
|
||||
}
|
||||
if(q != tdmi->tdmi_quality) {
|
||||
tdmi->tdmi_quality = q;
|
||||
update = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(update) {
|
||||
htsmsg_t *m = htsmsg_create_map();
|
||||
|
|
|
@ -1048,6 +1048,7 @@ extjs_dvbadapter(http_connection_t *hc, const char *remain, void *opaque)
|
|||
htsmsg_add_str(r, "name", tda->tda_displayname);
|
||||
htsmsg_add_u32(r, "automux", tda->tda_autodiscovery);
|
||||
htsmsg_add_u32(r, "idlescan", tda->tda_idlescan);
|
||||
htsmsg_add_u32(r, "qmon", tda->tda_qmon);
|
||||
htsmsg_add_str(r, "diseqcversion",
|
||||
((const char *[]){"DiSEqC 1.0 / 2.0",
|
||||
"DiSEqC 1.1 / 2.1"})
|
||||
|
@ -1065,6 +1066,9 @@ extjs_dvbadapter(http_connection_t *hc, const char *remain, void *opaque)
|
|||
s = http_arg_get(&hc->hc_req_args, "idlescan");
|
||||
dvb_adapter_set_idlescan(tda, !!s);
|
||||
|
||||
s = http_arg_get(&hc->hc_req_args, "qmon");
|
||||
dvb_adapter_set_qmon(tda, !!s);
|
||||
|
||||
if((s = http_arg_get(&hc->hc_req_args, "diseqcversion")) != NULL) {
|
||||
if(!strcmp(s, "DiSEqC 1.0 / 2.0"))
|
||||
dvb_adapter_set_diseqc_version(tda, 0);
|
||||
|
|
|
@ -1008,7 +1008,7 @@ tvheadend.dvb_adapter_general = function(adapterData, satConfStore) {
|
|||
|
||||
var confreader = new Ext.data.JsonReader({
|
||||
root: 'dvbadapters'
|
||||
}, ['name', 'automux', 'idlescan', 'diseqcversion']);
|
||||
}, ['name', 'automux', 'idlescan', 'diseqcversion', 'qmon']);
|
||||
|
||||
|
||||
function saveConfForm () {
|
||||
|
@ -1032,6 +1032,10 @@ tvheadend.dvb_adapter_general = function(adapterData, satConfStore) {
|
|||
new Ext.form.Checkbox({
|
||||
fieldLabel: 'Idle scanning',
|
||||
name: 'idlescan'
|
||||
}),
|
||||
new Ext.form.Checkbox({
|
||||
fieldLabel: 'Monitor signal quality',
|
||||
name: 'qmon'
|
||||
})
|
||||
];
|
||||
|
||||
|
@ -1057,7 +1061,7 @@ tvheadend.dvb_adapter_general = function(adapterData, satConfStore) {
|
|||
style:'margin:10px',
|
||||
bodyStyle:'padding:5px',
|
||||
labelAlign: 'right',
|
||||
labelWidth: 110,
|
||||
labelWidth: 130,
|
||||
waitMsgTarget: true,
|
||||
reader: confreader,
|
||||
defaultType: 'textfield',
|
||||
|
|
Loading…
Add table
Reference in a new issue