frontend: adjust SNR value for Si216x in DVB_T_T2 mode.
authorErik Slagter <erik@openpli.org>
Sat, 28 Nov 2015 08:18:03 +0000 (09:18 +0100)
committerErik Slagter <erik@openpli.org>
Sat, 28 Nov 2015 08:18:03 +0000 (09:18 +0100)
A combined effort by athoik and dimitrij.

lib/dvb/frontend.cpp

index d37817a..f163b8b 100644 (file)
@@ -979,6 +979,20 @@ void eDVBFrontend::calculateSignalQuality(int snr, int &signalquality, int &sign
                default: break;
                }
        }
+       else if (!strcmp(m_description, "Si216x"))
+       {
+               eDVBFrontendParametersTerrestrial parm;
+
+               oparm.getDVBT(parm);
+
+               switch (parm.system)
+               {
+                       case eDVBFrontendParametersTerrestrial::System_DVB_T:
+                       case eDVBFrontendParametersTerrestrial::System_DVB_T2: 
+                       case eDVBFrontendParametersTerrestrial::System_DVB_T_T2: ret = (int)((snr * 10) / 15); break;
+                       default: break;
+               }
+       }
 
        signalqualitydb = ret;
        if (ret == 0x12345678) // no snr db calculation avail.. return untouched snr value..