Project

General

Profile

Bug #3927

Losing SNR display on DVB-T/S adapters in 4.1 (was working in 4.0.9)

Added by Oliver O about 8 years ago. Updated about 8 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
DVB
Target version:
-
Start date:
2016-08-11
Due date:
% Done:

100%

Estimated time:
Found in version:
4.1-2150~gfd72688~xenial
Affected Versions:

Description

When starting up Tvheadend, initial SNR display for DVB-T/S adapters looks correct (dB values, see first screenshot), then it gradually fails on each input (shows as 0% SNR) and will finally never return to normal.

The attached screenshots were created during Tvheadend startup, showing in this order:
- normal SNR display (values in dB)
- SNR display on 2 inputs changing to 0%
- SNR display on 3 inputs changing to 0%
- SNR display on 1 input returning to normal (dB)
- SNR display on 2 inputs lost permanently during error-free viewing

All inputs were configured with 'Force old status' disabled.

This installation is running on Ubuntu Xenial and was just upgraded from version 4.0.9-4~gac9e47d~wily to version 4.1-2150~gfd72688~xenial. With version 4.0.9 the switch to 0% SNR could be observed in times of complete signal loss, but it always returned to normal dB values when the signal recovered. In version 4.1, the loss of proper SNR display seems to be permanent.


Files

Screenshot from 2016-08-11 18-43-41 (initial EPG grab, SNR OK).png (84.3 KB) Screenshot from 2016-08-11 18-43-41 (initial EPG grab, SNR OK).png normal SNR display (values in dB) Oliver O, 2016-08-11 19:14
Screenshot from 2016-08-11 18-43-46 (initial EPG grab, losing SNR on 2 inputs).png (88.5 KB) Screenshot from 2016-08-11 18-43-46 (initial EPG grab, losing SNR on 2 inputs).png SNR display on 2 inputs changing to 0% Oliver O, 2016-08-11 19:14
Screenshot from 2016-08-11 18-44-07 (initial EPG grab, losing SNR on 3 inputs).png (87 KB) Screenshot from 2016-08-11 18-44-07 (initial EPG grab, losing SNR on 3 inputs).png SNR display on 3 inputs changing to 0% Oliver O, 2016-08-11 19:15
Screenshot from 2016-08-11 18-44-23 (initial EPG grab, SNR back on 1 input).png (85.8 KB) Screenshot from 2016-08-11 18-44-23 (initial EPG grab, SNR back on 1 input).png SNR display on 1 input returning to normal (dB) Oliver O, 2016-08-11 19:15
Screenshot from 2016-08-11 18-48-07 (normal viewing on 2 inputs, SNR lost).png (84.3 KB) Screenshot from 2016-08-11 18-48-07 (normal viewing on 2 inputs, SNR lost).png SNR display on 2 inputs lost permanently during error-free viewing Oliver O, 2016-08-11 19:15
Screenshot from 2016-08-11 22-10-17.png (81.2 KB) Screenshot from 2016-08-11 22-10-17.png SNR failure using 'Force old status' during error-free viewing Oliver O, 2016-08-11 22:14
tvheadend.log (444 KB) tvheadend.log Oliver O, 2016-08-12 13:24
Screenshot from 2016-08-12 12-51-31.png (83 KB) Screenshot from 2016-08-12 12-51-31.png Oliver O, 2016-08-12 13:33
Screenshot from 2016-08-12 12-51-38.png (87.3 KB) Screenshot from 2016-08-12 12-51-38.png Oliver O, 2016-08-12 13:33
Screenshot from 2016-08-12 12-51-48.png (86.2 KB) Screenshot from 2016-08-12 12-51-48.png Oliver O, 2016-08-12 13:33
Screenshot from 2016-08-12 12-51-58.png (86.2 KB) Screenshot from 2016-08-12 12-51-58.png Oliver O, 2016-08-12 13:33
Screenshot from 2016-08-12 12-52-18.png (81.6 KB) Screenshot from 2016-08-12 12-52-18.png Oliver O, 2016-08-12 13:33
Screenshot from 2016-08-12 12-54-45.png (80.8 KB) Screenshot from 2016-08-12 12-54-45.png Oliver O, 2016-08-12 13:33
Screenshot from 2016-08-12 13-18-41.png (90.6 KB) Screenshot from 2016-08-12 13-18-41.png Oliver O, 2016-08-12 13:33
snr.c (2.77 KB) snr.c Oliver O, 2016-08-18 18:47
patch (1005 Bytes) patch Oliver O, 2016-08-18 18:47
Status (fix applied).png (61.1 KB) Status (fix applied).png Oliver O, 2016-08-19 18:22

History

#1

Updated by Mark Clarkstone about 8 years ago

Enable Force old status - Always use the old ioctls to read the linuxdvb status (signal strength, SNR, error counters). Some drivers are not mature enough to provide the correct values using the new v5 linuxdvb API.

You can find it under the frontend params.

#2

Updated by Oliver O about 8 years ago

Mark Clarkstone wrote:

Enable Force old status - Always use the old ioctls to read the linuxdvb status (signal strength, SNR, error counters).

Have tried this. Results are even worse. Only one input provides a reasonable SNR value, the others seem to fail right from the start (see screenshot attached).

Some drivers are not mature enough to provide the correct values using the new v5 linuxdvb API.

Yes, I've read about this before. Does not seem to apply here, since everything worked with TVH 4.0.9 using the same drivers.

#4

Updated by Oliver O about 8 years ago

Here is the requested trace along with some screenshots to show the status display.

Devices used as identified in the system journal:

adapter 0 (DVB-T #0): Afatech AF9033
adapter 1 (DVB-T #1): DiBcom 7000PC - Hauppauge Nova-TD Stick (52009) [tuner #1 (dual tuner stick)]
adapter 2 (DVB-T #2): DiBcom 7000PC - Hauppauge Nova-TD Stick (52009) [tuner #2 (dual tuner stick)]
adapter 3 (DVB-S #0): Montage Technology M88DS3103 - TechnoTrend TT-connect S2-4600

I've started Tvheadend in its normal configuration, let it scan all DVB-T and DVB-S muxes for EPG data, then selected some channels for live watching (up to 2 simultaneously). Interestingly, the last screenshot shows that I had lost SNR display on only one of the two DiBcom 7000PC DVB-T inputs sitting on the same dual tuner stick (with error-free live video on both).

Hope this helps. If you'd like a trace from a reduced configuration, please let me know.

#5

Updated by Oliver O about 8 years ago

Here is further analysis and a suggested fix:

The attached C program gathers current SNR readings using the old and new DVB APIs. When invoked during a TVH epggrab run, it looks like this:

# ~/Test/DVB/snr /dev/dvb/adapter3/frontend0

18:08:09 SNR: new=12.041 dB, old=120
18:08:10 SNR: new=12.041 dB, old=120
18:08:11 SNR: new=12.041 dB, old=120
18:08:12 SNR: new=12.041 dB, old=120
18:08:13 SNR: new=N/A, old=0
18:08:14 SNR: new=13.222 dB, old=132
18:08:15 SNR: new=12.787 dB, old=127
18:08:16 SNR: new=13.222 dB, old=132
18:08:17 SNR: new=13.010 dB, old=130
18:08:18 SNR: new=13.424 dB, old=134
18:08:19 SNR: new=13.222 dB, old=132
18:08:20 SNR: new=13.617 dB, old=136
18:08:21 SNR: new=13.010 dB, old=130
18:08:22 SNR: new=13.010 dB, old=130
18:08:23 SNR: new=13.617 dB, old=136
18:08:24 SNR: new=13.222 dB, old=132
18:08:25 SNR: new=13.617 dB, old=136
18:08:26 SNR: new=N/A, old=0
18:08:27 SNR: new=12.787 dB, old=127
18:08:28 SNR: new=12.552 dB, old=125
18:08:29 SNR: new=12.552 dB, old=125
18:08:30 SNR: new=12.787 dB, old=127
18:08:31 SNR: new=12.787 dB, old=127

Conclusions:

  1. The new API call sometimes returns an intermediate result of FE_SCALE_NOT_AVAILABLE (presumably if the tuner is not ready yet). According to https://linuxtv.org/downloads/v4l-dvb-apis/frontend-properties.html#DTV-STAT-CNR, this is proper behavior.
  2. For the Hauppauge Nova-TD and TechnoTrend TT-connect S2-4600 inputs, the old API call apparently returns a decibel value multiplied by 10 (which does not conform to the API spec and thus constitutes a bug in the driver).

To fix TVH with respect to the new API, I suggest to try the patch attached (untested).

#6

Updated by Jaroslav Kysela about 8 years ago

Could you test your proposed change (patch)?

#7

Updated by Oliver O about 8 years ago

Change improved to avoid switching between dB and relative (%) displays in the UI.

Tested: fixes the bug as intended (see screenshot).

Fix provided as pull request #887 ยท https://github.com/tvheadend/tvheadend/pull/887

#8

Updated by Oliver O about 8 years ago

Fix committed: https://github.com/tvheadend/tvheadend/commit/fb99e1adee13b86cbb5690198daaa7f60e141270

Tested successfully in version 4.1-2189~g3de3244~xenial.

Please close.

#9

Updated by Mark Clarkstone about 8 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Oliver O wrote:

Fix committed: https://github.com/tvheadend/tvheadend/commit/fb99e1adee13b86cbb5690198daaa7f60e141270

Tested successfully in version 4.1-2189~g3de3244~xenial.

Please close.

commit:fb99e1ad

Also available in: Atom PDF