Changeset 41330 for titan/titan/frontenddev.h
- Timestamp:
- 12/01/17 18:16:49 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/frontenddev.h
r41319 r41330 1492 1492 int test2 = 0; 1493 1493 struct dtv_property prop[1]; 1494 memset(prop, 0, sizeof(prop)); 1494 1495 prop[0].cmd = DTV_STAT_CNR; 1495 1496 struct dtv_properties props; … … 1497 1498 props.num = 1; 1498 1499 1500 int wasopen = 0; 1501 1502 if(node->fd == -1) 1503 node->fd = feopen(node, NULL); 1504 else 1505 wasopen = 1; 1506 1499 1507 if(ioctl(node->fd, FE_GET_PROPERTY, &props) < 0 && errno != ERANGE) 1500 1508 { … … 1519 1527 } 1520 1528 } 1529 if(wasopen != 1) 1530 feclose(node, -1); 1521 1531 #endif 1522 1532 if(!signalquality && !signalqualitydb) … … 1585 1595 #if DVB_API_VERSION > 5 || DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR >= 10 1586 1596 struct dtv_property prop[1]; 1597 memset(prop, 0, sizeof(prop)); 1587 1598 prop[0].cmd = DTV_STAT_SIGNAL_STRENGTH; 1588 1599 struct dtv_properties props; 1589 1600 props.props = prop; 1590 1601 props.num = 1; 1602 1603 int wasopen = 0; 1604 1605 if(node->fd == -1) 1606 node->fd = feopen(node, NULL); 1607 else 1608 wasopen = 1; 1609 1591 1610 if (ioctl(node->fd, FE_GET_PROPERTY, &props) < 0 && errno != ERANGE) 1592 1611 { … … 1602 1621 } 1603 1622 if (signal) 1623 { 1624 if(wasopen != 1) 1625 feclose(node, -1); 1604 1626 return signal; 1627 } 1605 1628 // fallback to old DVB API 1606 1629 //#endif … … 1619 1642 { 1620 1643 fe_status_t status = fereadstatus(node); 1621 if(status & FE_HAS_LOCK) signal = 65535;1644 if(status & FE_HAS_LOCK) signal = 1; 1622 1645 } 1623 1646 return signal; … … 2170 2193 if(getconfig(tmpstr, NULL) != NULL) 2171 2194 sethypridtuner(y, getconfig(tmpstr, NULL)); 2172 //free(tmpstr), tmpstr = NULL;2195 free(tmpstr), tmpstr = NULL; 2173 2196 #endif 2174 2197 } … … 2181 2204 #ifdef MIPSEL 2182 2205 if(fehyprid != NULL && getconfig(tmpstr, NULL) != NULL) 2206 { 2183 2207 sethypridtunernew(dvbnode, getconfig(tmpstr, NULL)); 2208 feinfo = fegetinfo(NULL, fd); 2209 dvbnode->feinfo = feinfo; 2210 } 2184 2211 free(tmpstr), tmpstr = NULL; 2185 2212 #endif … … 2280 2307 int type = 0; 2281 2308 int ret = 0; 2309 int wasopen = 0; 2282 2310 char* realname = gethypridtunerchoicesvaluename(tuner->devnr, value); 2283 2311 2312 if(tuner->fd == -1) 2313 tuner->fd = feopen(tuner, NULL); 2314 else 2315 wasopen = 1; 2284 2316 2285 2317 printf("**** > realname: %s\n", realname); … … 2336 2368 if (ioctl(tuner->fd, FE_SET_PROPERTY, &cmdseq) == -1) 2337 2369 { 2370 perr("FE_SET_PROPERTY"); 2338 2371 err("FE_SET_PROPERTY failed -> use procfs to switch delivery system tuner %d mode %s type %d",tuner->devnr ,value, type); 2339 2372 } 2373 if(wasopen != 1) 2374 feclose(tuner, -1); 2340 2375 hypridtuner = getconfig("hypridtuner", NULL); 2341 2376 if(hypridtuner != NULL)
Note: See TracChangeset
for help on using the changeset viewer.