Changeset 41099
- Timestamp:
- 11/02/17 20:25:14 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/frontenddev.h
r41092 r41099 311 311 else 312 312 dvbnode = dvbdev; 313 314 313 315 314 //suche tuner der die gewuenschte orbitalpos kann und nicht belegt ist … … 407 406 return dvbnode; 408 407 } 409 410 found = 0; 411 while(CharPtrTmp[found] != NULL) 408 if(tmpdvbnode != NULL) 412 409 { 413 CharPtrTmp[found]->feaktband = band; 414 CharPtrTmp[found]->feaktpolarization = tpnode->polarization; 415 found = found + 1; 410 tmpdvbnode->feaktband = band; 411 tmpdvbnode->feaktpolarization = tpnode->polarization; 416 412 } 417 //if(tmpdvbnode != NULL)418 //{419 // tmpdvbnode->feaktband = band;420 // tmpdvbnode->feaktpolarization = tpnode->polarization;421 //}422 413 dvbnode->felasttransponder = dvbnode->feakttransponder; 423 414 dvbnode->feakttransponder = tpnode; … … 562 553 return dvbnode; 563 554 } 564 found = 0; 565 while(CharPtrTmp[found] != NULL) 555 if(tmpdvbnode != NULL) 566 556 { 567 CharPtrTmp[found]->feaktband = band; 568 CharPtrTmp[found]->feaktpolarization = tpnode->polarization; 569 found = found + 1; 557 tmpdvbnode->feaktband = band; 558 tmpdvbnode->feaktpolarization = tpnode->polarization; 570 559 } 571 //if(tmpdvbnode != NULL)572 //{573 // tmpdvbnode->feaktband = band;574 // tmpdvbnode->feaktpolarization = tpnode->polarization;575 //}576 560 dvbnode->felasttransponder = dvbnode->feakttransponder; 577 561 dvbnode->feakttransponder = tpnode; … … 711 695 return 0; 712 696 } 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 }721 697 usleep(1000); 722 698 } 723 699 debug(200, "wait for tuner end"); 700 724 701 //if(ev.status & FE_HAS_LOCK) 725 702 // return 0; … … 1398 1375 //#ifdef ARM 1399 1376 //#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 1405 1379 struct dtv_property prop[1]; 1406 1380 prop[0].cmd = DTV_STAT_CNR; … … 1417 1391 for(unsigned int i=0; i<prop[0].u.st.len; i++) 1418 1392 { 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) 1422 1394 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) 1428 1396 signalquality = prop[0].u.st.stat[i].svalue; 1429 printf("***** new snr signalquality:%d\n", signalquality);1430 }1431 1397 } 1432 1398 } … … 1441 1407 1442 1408 ioctl(node->fd, FE_READ_SNR, &snr); 1443 1444 printf("***** old snr signalquality\n"); 1445 1409 1446 1410 if(ostrstr(node->feinfo->name, "Si2166B") != NULL) 1447 1411 { … … 1452 1416 ret = snr*10; 1453 1417 } 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) 1455 1419 { 1456 1420 ret = (snr * 100) >> 8; … … 1489 1453 } 1490 1454 1491 #if DVB_API_VERSION >= 51455 #ifdef ARM 1492 1456 struct dtv_property prop[1]; 1493 1457 prop[0].cmd = DTV_STAT_SIGNAL_STRENGTH; … … 1495 1459 props.props = prop; 1496 1460 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) 1520 1471 signal = signal * 1000; 1521 1472 debug(200, "frontend signal = %02x", (signal * 100) / 0xffff); 1522 1473 } 1523 1474 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 1524 1480 } 1525 1481 … … 1625 1581 default: fec = FEC_AUTO; break; 1626 1582 } 1583 1627 1584 int pilot = tpnode->pilot; 1628 1585 switch(pilot) … … 1633 1590 default: pilot = PILOT_AUTO; break; 1634 1591 } 1592 1635 1593 int rolloff = tpnode->rolloff; 1636 1594 switch(rolloff) … … 2237 2195 { 2238 2196 err("FE_SET_PROPERTY failed -> use procfs to switch delivery system tuner %d mode %s type %d",tuner->devnr ,value, type); 2239 }2240 2197 hypridtuner = getconfig("hypridtuner", NULL); 2241 2198 if(hypridtuner != NULL) … … 2261 2218 printf("set %s to %s RC:%i\n", buf, value, ret); 2262 2219 } 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); 2265 2221 free(buf); buf = NULL; 2266 2222 return 1; //true 2267 2223 } 2268 2224 return 0; //true 2269 2225
Note: See TracChangeset
for help on using the changeset viewer.