Changeset 41510


Ignore:
Timestamp:
12/24/17 12:36:33 (5 years ago)
Author:
gost
Message:

test SIGNAL_STRENGTH for dm900

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/frontenddev.h

    r41509 r41510  
    15931593//#ifdef ARM
    15941594//#ifdef MIPSEL
     1595
     1596#ifdef ARM             
     1597        struct dtv_property prop[1];
     1598        prop[0].cmd = DTV_STAT_SIGNAL_STRENGTH;
     1599        struct dtv_properties props;
     1600        props.props = prop;
     1601        props.num = 1;
     1602        ioctl(node->fd, FE_GET_PROPERTY, &props);
     1603        for(unsigned int i=0; i<prop[0].u.st.len; i++)
     1604        {
     1605                if (prop[0].u.st.stat[i].scale == FE_SCALE_RELATIVE)
     1606                        signal = prop[0].u.st.stat[i].uvalue;
     1607        }
     1608        if (!signal)
     1609        {
     1610                ioctl(node->fd, FE_READ_SIGNAL_STRENGTH, &signal);
     1611                if(ostrstr(node->feinfo->name, "Si2166B") != NULL)
     1612                signal = signal * 1000;
     1613                printf("frontend signal = %02x\n", (signal * 100) / 0xffff);
     1614        }
     1615        return signal;
     1616#else   
     1617
    15951618#if DVB_API_VERSION > 5 || DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR >= 10
    15961619        struct dtv_property prop[1];
     
    16491672        return signal;
    16501673}
     1674#endif
    16511675
    16521676uint32_t fereadber(struct dvbdev* node)
Note: See TracChangeset for help on using the changeset viewer.