Tuner Controller update to better handle automatic center frequency

calculation when additional channels are allocated.

Incorporates tuner specific definition of overall usable bandwidth, so
that tuners like airspy can specify 90% of 10 MHz (ie 9 MHz) is truly
usable and the fringe 10% is unusable rolloff.

Also includes tuner-specific defining of the width of the central spike,
or a value of 0 indicates that the entire range is usable (ie airspy).
This commit is contained in:
denny
2015-12-12 14:08:32 -05:00
parent 87e70ae0e4
commit 0951277915
10 changed files with 224 additions and 197 deletions

View File

@@ -46,6 +46,9 @@ public abstract class FCDTunerController extends TunerController
private final static Logger mLog =
LoggerFactory.getLogger( FCDTunerController.class );
public static final double USABLE_BANDWIDTH_PERCENT = 1.0;
public static final int DC_SPIKE_AVOID_BUFFER = 2000;
public final static byte FCD_INTERFACE = (byte)0x2;
public final static byte FCD_ENDPOINT_IN = (byte)0x82;
public final static byte FCD_ENDPOINT_OUT = (byte)0x2;
@@ -70,7 +73,10 @@ public abstract class FCDTunerController extends TunerController
int minTunableFrequency,
int maxTunableFrequency )
{
super( minTunableFrequency, maxTunableFrequency );
super( minTunableFrequency,
maxTunableFrequency,
DC_SPIKE_AVOID_BUFFER,
USABLE_BANDWIDTH_PERCENT );
mDevice = device;
mDeviceDescriptor = descriptor;