Bug #3081 » 0001-Added-frequency-calculation-for-early-tuning-EN50494.patch
src/input/mpegts/linuxdvb/linuxdvb_satconf.c | ||
---|---|---|
843 | 843 |
// the en50494 have to skip this test |
844 | 844 |
if (!lse->lse_lnb) |
845 | 845 |
return SM_CODE_TUNING_FAILED; |
846 |
f = lse->lse_lnb->lnb_freq(lse->lse_lnb, lm); |
|
847 |
if (f == (uint32_t)-1) |
|
848 |
return SM_CODE_TUNING_FAILED; |
|
849 | 846 | |
850 |
if (ls->ls_early_tune && !lse->lse_en50494) { |
|
847 |
if (ls->ls_early_tune) { |
|
848 |
f = lse->lse_lnb->lnb_freq(lse->lse_lnb, lm); |
|
849 |
if (f == (uint32_t)-1) |
|
850 |
return SM_CODE_TUNING_FAILED; |
|
851 |
|
|
852 |
if (lse->lse_en50494) { |
|
853 |
/* transponder value - t*/ |
|
854 |
uint16_t t = round((( (f / 1000) + 2 + (((linuxdvb_en50494_t*)lse->lse_en50494)->le_frequency)) / 4) - 350); |
|
855 |
if ( t > 1024) { |
|
856 |
tvherror("en50494", "transponder value bigger then 1024"); |
|
857 |
return -1; |
|
858 |
} |
|
859 |
/* tune frequency for the frontend */ |
|
860 |
f = (t + 350) * 4000 - f; |
|
861 |
} |
|
851 | 862 |
r = linuxdvb_frontend_tune0(lfe, mmi, f); |
852 | 863 |
if (r) return r; |
853 | 864 |
} else { |
854 |
- |