Changeset 41099


Ignore:
Timestamp:
11/02/17 20:25:14 (6 years ago)
Author:
andyjetset
Message:

delete frontend.h Version 41098 and add Version 41075

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/frontenddev.h

    r41092 r41099  
    311311        else
    312312                dvbnode = dvbdev;
    313 
    314313
    315314        //suche tuner der die gewuenschte orbitalpos kann und nicht belegt ist
     
    407406                                                return dvbnode;
    408407                                        }
    409                                        
    410                                         found = 0;
    411                                         while(CharPtrTmp[found] != NULL)
     408                                        if(tmpdvbnode != NULL)
    412409                                        {
    413                                                 CharPtrTmp[found]->feaktband = band;
    414                                                 CharPtrTmp[found]->feaktpolarization = tpnode->polarization;
    415                                                 found = found + 1;
     410                                                tmpdvbnode->feaktband = band;
     411                                                tmpdvbnode->feaktpolarization = tpnode->polarization;
    416412                                        }
    417                                         //if(tmpdvbnode != NULL)
    418                                         //{
    419                                         //      tmpdvbnode->feaktband = band;
    420                                         //      tmpdvbnode->feaktpolarization = tpnode->polarization;
    421                                         //}
    422413                                        dvbnode->felasttransponder = dvbnode->feakttransponder;
    423414                                        dvbnode->feakttransponder = tpnode;
     
    562553                                                return dvbnode;
    563554                                        }
    564                                         found = 0;
    565                                         while(CharPtrTmp[found] != NULL)
     555                                        if(tmpdvbnode != NULL)
    566556                                        {
    567                                                 CharPtrTmp[found]->feaktband = band;
    568                                                 CharPtrTmp[found]->feaktpolarization = tpnode->polarization;
    569                                                 found = found + 1;
     557                                                tmpdvbnode->feaktband = band;
     558                                                tmpdvbnode->feaktpolarization = tpnode->polarization;
    570559                                        }
    571                                         //if(tmpdvbnode != NULL)
    572                                         //{
    573                                         //      tmpdvbnode->feaktband = band;
    574                                         //      tmpdvbnode->feaktpolarization = tpnode->polarization;
    575                                         //}
    576560                                        dvbnode->felasttransponder = dvbnode->feakttransponder;
    577561                                        dvbnode->feakttransponder = tpnode;
     
    711695                        return 0;
    712696                }
    713                 if(node != NULL && ostrstr(node->feinfo->name, "BCM45208") != NULL)
    714                 {
    715                         if(status & FE_TIMEDOUT)
    716                         {
    717                                 debug(200, "wait for tuner end with FE_TIMEDOUT");
    718                                 return 1;
    719                         }
    720                 }
    721697                usleep(1000);
    722698        }
    723699        debug(200, "wait for tuner end");
     700
    724701        //if(ev.status & FE_HAS_LOCK)
    725702        //      return 0;
     
    13981375//#ifdef ARM
    13991376//#ifdef MIPSEL
    1400 #if DVB_API_VERSION >= 5
    1401 //#if DVB_API_VERSION > 5 || DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR >= 10
    1402 
    1403         int test1 = 0;
    1404         int test2 = 0;
     1377#if DVB_API_VERSION > 5 || DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR >= 10
     1378
    14051379        struct dtv_property prop[1];
    14061380        prop[0].cmd = DTV_STAT_CNR;
     
    14171391                for(unsigned int i=0; i<prop[0].u.st.len; i++)
    14181392                {
    1419                         if (prop[0].u.st.stat[i].scale == FE_SCALE_DECIBEL && test1 == 0)
    1420                         {
    1421                                 test1 = 1;
     1393                        if (prop[0].u.st.stat[i].scale == FE_SCALE_DECIBEL)
    14221394                                signalqualitydb = prop[0].u.st.stat[i].svalue / 10;
    1423                                 printf("***** new snr signalqualitydb:%d\n", signalqualitydb);
    1424                         }
    1425                         else if (prop[0].u.st.stat[i].scale == FE_SCALE_RELATIVE && test2 == 0)
    1426                         {
    1427                                 test2 = 1;
     1395                        else if (prop[0].u.st.stat[i].scale == FE_SCALE_RELATIVE)
    14281396                                signalquality = prop[0].u.st.stat[i].svalue;
    1429                                 printf("***** new snr signalquality:%d\n", signalquality);
    1430                         }
    14311397                }
    14321398        }
     
    14411407               
    14421408                ioctl(node->fd, FE_READ_SNR, &snr);
    1443                
    1444                 printf("***** old snr signalquality\n");               
    1445                
     1409                               
    14461410                if(ostrstr(node->feinfo->name, "Si2166B") != NULL)
    14471411                {
     
    14521416                        ret = snr*10;
    14531417                }
    1454                 else if(ostrstr(node->feinfo->name, "BCM4506") != NULL || ostrstr(node->feinfo->name, "BCM4506 (internal)") != NULL || ostrstr(node->feinfo->name, "BCM4505") != NULL || ostrstr(node->feinfo->name, "BCM73625 (G3)") != NULL || ostrstr(node->feinfo->name, "BCM45208") != NULL)
     1418                else if(ostrstr(node->feinfo->name, "BCM4506") != NULL || ostrstr(node->feinfo->name, "BCM4506 (internal)") != NULL || ostrstr(node->feinfo->name, "BCM4505") != NULL || ostrstr(node->feinfo->name, "BCM73625 (G3)") != NULL)
    14551419                {
    14561420                        ret = (snr * 100) >> 8;
     
    14891453        }
    14901454       
    1491 #if DVB_API_VERSION >= 5
     1455#ifdef ARM             
    14921456        struct dtv_property prop[1];
    14931457        prop[0].cmd = DTV_STAT_SIGNAL_STRENGTH;
     
    14951459        props.props = prop;
    14961460        props.num = 1;
    1497         if (ioctl(node->fd, FE_GET_PROPERTY, &props) < 0 && errno != ERANGE)
    1498         {
    1499                 debug(200, "DTV_STAT_SIGNAL_STRENGTH failed");
    1500         }
    1501         else
    1502         {
    1503                 for(unsigned int i=0; i<prop[0].u.st.len; i++)
    1504                 {
    1505                         if (prop[0].u.st.stat[i].scale == FE_SCALE_RELATIVE)
    1506                                 signal = prop[0].u.st.stat[i].uvalue;
    1507                 }
    1508         }
    1509         if (signal)
    1510                 return signal;
    1511         // fallback to old DVB API
    1512 #endif 
    1513         if(ioctl(node->fd, FE_READ_SIGNAL_STRENGTH, &signal) < 0 && errno != ERANGE)
    1514         {
    1515                 debug(200, "FE_READ_SIGNAL_STRENGTH failed");
    1516         }
    1517         else
    1518         {
    1519                 if(ostrstr(node->feinfo->name, "Si2166B") != NULL || ostrstr(node->feinfo->name, "BCM45208") != NULL)
     1461        ioctl(node->fd, FE_GET_PROPERTY, &props);
     1462        for(unsigned int i=0; i<prop[0].u.st.len; i++)
     1463        {
     1464                if (prop[0].u.st.stat[i].scale == FE_SCALE_RELATIVE)
     1465                        signal = prop[0].u.st.stat[i].uvalue;
     1466        }
     1467        if (!signal)
     1468        {
     1469                ioctl(node->fd, FE_READ_SIGNAL_STRENGTH, &signal);
     1470                if(ostrstr(node->feinfo->name, "Si2166B") != NULL)
    15201471                        signal = signal * 1000;
    15211472                debug(200, "frontend signal = %02x", (signal * 100) / 0xffff);
    15221473        }
    15231474        return signal;
     1475#else   
     1476        ioctl(node->fd, FE_READ_SIGNAL_STRENGTH, &signal);
     1477        debug(200, "frontend signal = %02x", (signal * 100) / 0xffff);
     1478        return signal;
     1479#endif
    15241480}
    15251481
     
    16251581                default: fec = FEC_AUTO; break;
    16261582        }
     1583       
    16271584        int pilot = tpnode->pilot;
    16281585        switch(pilot)
     
    16331590                default: pilot = PILOT_AUTO; break;
    16341591        }
     1592
    16351593        int rolloff = tpnode->rolloff;
    16361594        switch(rolloff)
     
    22372195        {
    22382196                err("FE_SET_PROPERTY failed -> use procfs to switch delivery system tuner %d mode %s type %d",tuner->devnr ,value, type);
    2239         }
    22402197                hypridtuner = getconfig("hypridtuner", NULL);
    22412198                if(hypridtuner != NULL)
     
    22612218                        printf("set %s to %s RC:%i\n", buf, value, ret);
    22622219                }
    2263                 else
    2264                         err("set system tuner to %d ... file not found -> %s", value, buf);
     2220                err("set system tuner to %d ... file not found -> %s", value, buf);
    22652221                free(buf); buf = NULL;
    22662222                return 1; //true
    2267        
     2223        }
    22682224        return 0; //true
    22692225
Note: See TracChangeset for help on using the changeset viewer.