Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
linuxdvb: allow to force using old linuxdvb ioctls, fixes#2759
  • Loading branch information
perexg committed Apr 7, 2015
1 parent d58afc0 commit 995aaf8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/html/config_tvadapters.html
Expand Up @@ -89,6 +89,11 @@ <h3>The adapters and tuners are listed / edited in a tree</h3>
In this case, increase the default value. For fast hardware, this value
might be descreased to make the decision of the re-tune algorithm
based on the signal status faster.</dd>
<p>
<dt><b>Force old status</b></dt>
<dd>Always use the old ioctls to read the linuxdvb status (signal strenght,
SNR, error counters). Some drivers are not matured enough to provide
the correct values using the new v5 linuxdvb API.</dd>
</dl>

<br>
Expand Down
10 changes: 9 additions & 1 deletion src/input/mpegts/linuxdvb/linuxdvb_frontend.c
Expand Up @@ -120,6 +120,13 @@ const idclass_t linuxdvb_frontend_class =
.opts = PO_ADVANCED,
.off = offsetof(linuxdvb_frontend_t, lfe_status_period),
},
{
.type = PT_BOOL,
.id = "old_status",
.name = "Force old status",
.opts = PO_ADVANCED,
.off = offsetof(linuxdvb_frontend_t, lfe_old_status),
},
{}
}
};
Expand Down Expand Up @@ -649,7 +656,8 @@ linuxdvb_frontend_monitor ( void *aux )

logit = tvhlog_limit(&lfe->lfe_status_log, 3600);

if(ioctl_check(lfe, 0) && !ioctl(lfe->lfe_fe_fd, FE_GET_PROPERTY, &dtv_prop)) {
if(ioctl_check(lfe, 0) && !lfe->lfe_old_status &&
!ioctl(lfe->lfe_fe_fd, FE_GET_PROPERTY, &dtv_prop)) {
/* Signal strength */
gotprop = 0;
if(ioctl_check(lfe, 1) && fe_properties[0].u.st.len > 0) {
Expand Down
1 change: 1 addition & 0 deletions src/input/mpegts/linuxdvb/linuxdvb_private.h
Expand Up @@ -118,6 +118,7 @@ struct linuxdvb_frontend
uint32_t lfe_skip_bytes;
uint32_t lfe_ibuf_size;
uint32_t lfe_status_period;
int lfe_old_status;

/*
* Satconf (DVB-S only)
Expand Down

0 comments on commit 995aaf8

Please sign in to comment.