Merge branch 'experimental' into vuplus_experimental
[vuplus_dvbapp] / lib / dvb / frontend.cpp
index cf36eb0..843a518 100755 (executable)
@@ -924,6 +924,19 @@ int eDVBFrontend::readFrontendData(int type)
                        }
                        else if (strstr(m_description, "BCM4506") || strstr(m_description, "BCM4505"))
                                ret = (snr * 100) >> 8;
+                       else if (!strcmp(m_description, "CXD1981"))
+                       {
+                               int mse = (~snr) & 0xFF;
+                               switch (parm_u_qam_modulation) {
+                                       case QAM_16:
+                                       case QAM_64:
+                                       case QAM_256: ret = (int)(-950 * log(((double)mse) / 760)); break;
+                                       case QAM_32:
+                                       case QAM_128: ret = (int)(-875 * log(((double)mse) / 650)); break;
+
+                                       default: break;
+                               }
+                       }
 
                        if (type == signalQuality)
                        {