[mythtv-commits] Ticket #13386: No Signal/Noise and Signal Strength with MyGica T230 DVB tuner

MythTV noreply at mythtv.org
Sat Jan 26 16:12:45 UTC 2019

#13386: No Signal/Noise and Signal Strength with MyGica T230 DVB tuner
     Reporter:  Klaas de Waal    |      Owner:  (none)
         Type:  Patch - Bug Fix  |     Status:  new
     Priority:  minor            |  Milestone:  needs_triage
    Component:  MythTV - DVB     |    Version:  Master Head
     Severity:  medium           |   Keywords:  DVBv5 channelscan
Ticket locked:  0                |
 A channelscan with mythtv-setup of the DVB-T signal with a new
 Geniatech/Mygica T230 tuner does work, but the "Scanning" screen only
 shows the "Scan Progress"; the "Signal/Noise" and the "Signal Strength"
 are zero.\\

 The mythtv-setup log shows that also the bit error rate and the
 uncorrected block count are missing:

 2019-01-22 16:19:21.192483 W  DVBSigMon[15](/dev/dvb/adapter2/frontend0):
 Cannot measure Signal Strength
                         eno: Unknown error 524 (524)
 2019-01-22 16:19:21.192514 E  DVBChan[15](/dev/dvb/adapter2/frontend0):
 Getting Frontend signal/noise ratio failed.
                         eno: Unknown error 524 (524)
 2019-01-22 16:19:21.192530 W  DVBSigMon[15](/dev/dvb/adapter2/frontend0):
 Cannot measure S/N
                         eno: Unknown error 524 (524)
 2019-01-22 16:19:21.192550 E  DVBChan[15](/dev/dvb/adapter2/frontend0):
 Getting Frontend signal error rate failed.
                         eno: Unknown error 524 (524)
 2019-01-22 16:19:21.192564 W  DVBSigMon[15](/dev/dvb/adapter2/frontend0):
 Cannot measure Bit Error Rate
                         eno: Unknown error 524 (524)
 2019-01-22 16:19:21.192584 E  DVBChan[15](/dev/dvb/adapter2/frontend0):
 Getting Frontend uncorrected block count failed.
                         eno: Unknown error 524 (524)
 2019-01-22 16:19:21.192599 W  DVBSigMon[15](/dev/dvb/adapter2/frontend0):
 Cannot count Uncorrected Blocks
                         eno: Unknown error 524 (524)


 The code in dvbchannel.cpp tries to retrieve the values for signal
 strength etc. first with a DVBv3 ioctl call (DVBv3) and if that fails with
 the EOPNOTSUPP error code then a DVBv5 call is used.\\

 This is implemented in MythTV by mspieth on October 7, 2017 as part of
 ticket #12638:

 However, on December 12, 2017 the EOPNOTSUPP error code is changed into
 ENOTSUPP as found in the Linux kernel:\\

 The solution is to add a test on the ENOTSUPP error code; the test on
 EOPNOTSUPP must stay there for users who run older Linux kernels.\\
 N.B. A complication is that the ENOTSUPP error code is not defined in any
 include file in "userland".
 Therefore, the attached patch locally defines ENOTSUPP to 524.

 An alternative fix could be to remove the test on ioctl error code
 completely and always try the DVBv5 call if the DVBv3 call fails, not only
 if the specific error code is given.

 The patch contains two additional minor fixes:
 - initialization of "fe_status_t status" variable in function
 wait_for_backend; this is already done like this in function HasLock.
 - millisecond to seconds+microseconds conversion in function
 wait_for_backend around line 1500. The original code is correct for time
 values up to 999 milliseconds but not for larger values.

 Test configuration:
 - Linux Fedora 29, kernel 4.20.3-200.fc29.x86_64
 - Tuner MyGica DVB-T2 HDTV USB Stick T230
 - MythTV master.
 - Scan of DVB-T signal Digitenne in Europe/The Netherlands

Ticket URL: <https://code.mythtv.org/trac/ticket/13386>
MythTV <http://www.mythtv.org>
MythTV Media Center

More information about the mythtv-commits mailing list