[linux-dvb] DVB tuning in JNI does not work (solved)

Ben Bucksch news at bucksch.org
Thu Nov 8 00:29:51 CET 2007


Duh. 2 days of hunting, and I find the problem right after I post - typical.

I used the wrong order of magnitude for the frequencies (incl. LNB) and
symbol rate.

And that although I in the beginning tried to make extra sure they are
correct, remembering that it was a major problem a few years ago when I
implemented the original DVB support for MythTV. The MHz vs. KHz vs. Hz
is a mess, same for symbolrate.

Correct is, for 12817 MHz and Universal LNB, to tune to 1587000, LNB
hiband true, in my case with pol H and symbolrate 27500000.


      // LNB
      boolean hiband = false;
      int frequency = c.frequency;
      final int lnb_low_val = 9750000; // Universal LNB
      final int lnb_high_val = 10600000;
      final int lnb_switch_val = 11700000;
      if (frequency >= lnb_switch_val)
        hiband = true;
      if (hiband)
        frequency = frequency - lnb_high_val;
      else
      {
        if (frequency < lnb_low_val)
          frequency = lnb_low_val - frequency;
        else
          frequency = frequency - lnb_low_val;
      }
      int satNo = 0;

      CoreServer.me.debug("Tuning to " + c.frequency + " (" + frequency
+ " considering LNB), LNB hiband " + hiband
              + ", pol " + (polarity_v ? "V" : "H") + ", symbolrate " +
symbolrate);

      myFrontendFD = tuneToNative(myFrontendFilename, frequency,
symbolrate, polarity_v, hiband, satNo, false);

tuneToNative:
...
  p.frequency = frequency;
  p.u.qpsk.symbol_rate = symbolrate;
...

says: Tuning to 12187000 (1587000 considering LNB), LNB hiband true, pol
H, symbolrate 27500000




More information about the linux-dvb mailing list