Commit Graph

34 Commits

Author SHA1 Message Date
Denny
be62ae0459 Resolves #249 - removes the state monitor runnable from the channel
state and replaces it with a processing chain heartbeat that is generated
by the sample source.

Previously, the state monitor was running on a separate thread and this
was causing multi-threading issues.  With this update, all channel state
operations (and all module operations) occur on the source's buffer
processing thread.
2017-07-22 05:42:13 -04:00
Denny
1aa85a86ca Resolves issue with channel frequency correction events not being broadcast within the processing chain and rendering in the spectral display. 2017-03-11 10:16:08 -05:00
Denny
6a340050c6 #165 - cleanup of logging and comments in TunerChannelSource 2017-02-10 06:41:45 -05:00
Denny
183eb2f7c7 Resolves #165 - P25 decoding channel stops arbitrarily and never recovers.
Issue identified with Patch Group management and circular dependencies that can develop because of stale patch groups.  Refactored all patch group management into a new PatchGroupManager.  Patch groups are now automatically deleted if we don't receive any update messages within 5 seconds.  The PatchGroupAlias was also updated to not roll-up attributes from subordinate patched group aliases when those aliases are also patch group aliases -- this eliminates the circular dependency chaining.

Added IOverflowListener interface and updated Sources to support overflow listeners.  Updated ChannelState to register as an overflow listener so that it can visually depict to the user when the channel enters/exits source overflow state.  Added new color pattern for OVERFLOW with yellow text on red.
2017-02-10 06:36:57 -05:00
Denny
767b302ed7 Adds additional unresolved address exception handler to metadata updater 2017-02-04 07:32:22 -05:00
Denny
a302d098de 126 - Significant improvement in processor and memory utilization. Refactors all USB tuner sample processing with a new USBTransferProcessor class. LibUSB transfer timeout processing is now consolidated under the TunerManager and tuners register with this singleton to auto-start or auto-stop USB bulk transfer processing. Resolves long-standing issue impacting multi-tuner use where the second and subsequent tuners may have been routinely starved for LibUSB processing time under heavy-loading. All tuner buffer threaded processing is now handled as runnables in the scheduled thread pool, eliminating tuner-dedicated processing threads. Added tuner buffer size management to prevent memory blow-out when down-stream processing is either lagging or impacted by java garbage collection operations. Both tuners and individual DDC channels now have bounded sample buffer queues that automatically enter and exit overflow mode when predefined max/reset thresholds are met. When any queue goes into overflow mode, sample buffers are simply dropped in favor of preserving program/memory stability. 2017-01-28 09:08:11 -05:00
Denny
6e94d9ce51 #108 [WIP] Created new ThreadPool class with a static ScheduledThreadExecutor that is now shared by all components. Removed ThreadPoolManager from all classes. Consolidating into 1 pool seems to have reduced CPU usage by ~15-20%. Overall memory usage is also reduced. 2017-01-22 09:33:47 -05:00
Denny
078a6fddce Closes #71 - frequency controller throws exception when exceeding min/max tuning limits of a tuner.
Updated code to show dialog to user whenever the tuning limit has been exceeded.  Added new InvalidFrequencyException that includes the requested invalid frequency and the valid frequency limit that was exceeded
2016-06-04 08:21:28 -04:00
denny
c3d52ff86e Merges #34 Major redesign of Tuner, Channel and Alias management.
Changes to model, view and controller components and updates all gui
editors.  Removes the configuration panel and tree and replaces with 3
new panels.  Updates playlist.xml to a new playlist_v2.xml format.
2016-04-01 08:23:49 -04:00
denny
64fee2c718 wip #34 - testing and validating changes and testing decoding. 2016-03-29 20:00:23 -04:00
denny
0605760fcd wip #34 - removed some wrapper methods from tuner since the tuner
controller is now exposed (frequency, sample rate, channel count, etc)
2016-03-13 07:38:29 -04:00
denny
415f95ec89 wip #34: refactored tuners to take a tuner controller as an argument.
Removed frequency change listener framework from tuner so that the tuner
controller handles all frequency change interaction.

Updated tuner view to allow selecting tuners for main spectral display
and/or launching a new spectral display by clicking in the tuner table
cell.
2016-03-13 07:09:26 -04:00
denny
cdcc487095 Resolves potential threading issue in tuner channel source. 2016-02-20 10:21:47 -05:00
denny
f7f6c2fc3e Merges changes from master branch to resolve issue with CPU and memory
and constraints on scheduled thread pool saturation.  Adds a new
scheduled thread pool for each processing chain that the components in
the chain can share, versus the single shared pool exposed by the
threadpoolmanager class.
2016-02-15 15:47:14 -05:00
denny
dd22397f75 Resolves issue with application memory growth and thread pool
saturation.

Each tunerchannelsource was sharing a thread pool and as the processing
load increased, the thread pool was not expanding and the processing
tasks were backing up, causing the buffers to grow with unprocessed
data.

Changed so that each tuner channel source is handed a thread pool to use
for processing incoming sample data.  Processing chain maintains the
thread pool and starts the channel source.  This allows traffic channels
to reuse the thread pool across multiple iterations.
2016-02-15 09:46:33 -05:00
denny
e2a0451bfb Resolves issue with scheduled thread pool overtasking. Removes tuner
channel source decimation processing over to its own thread pool.
2016-02-15 08:42:29 -05:00
denny
4be63d4b95 Work in progress.
-Started work on new channel editor channel viewer/controller
-Removed a number of unused buffer package classes
-Moved automatic frequency control to be a module and removed special
handling
-Added IUnfilteredRealBufferListener & Provider interfaces
-Completely removed the ResourceManager class
2016-02-13 14:57:12 -05:00
denny
2e56b4a27f Removed extra logging 2015-12-31 09:30:17 -05:00
denny
9c305b0732 Resolves issue with AFC and frequency change event handling,
specifically for P25 C4FM frequency tracking.

-Clarifies frequency change event naming and adds request/notitification
events for channel frequency correction type events

-Removes DC offset filter from P25 C4FM demodulator which was operating
independently of the AFC tracking component within the C4FM symbol
filter.

-Changed FCD tuner center DC spike buffer size after detecting that the
DC center spike was influencing the P25 C4FM filter frequency tracker
whenever the tuner's center frequency was changed to bring the channel
boundary within 3 kHz of the center spike -- set it to 5 kHz to provide
a better buffer.

-Updated spectral channel display to provide better indication of
automatic frequency control (yellow line) versus channel frequency
2015-12-31 09:08:26 -05:00
denny
d9fe979ccf Resolves issue with residual buffer decimation processing after dispose
is invoked on call teardown.
2015-12-02 19:10:38 -05:00
denny
70e62ebb35 Adds airspy USB tuner support and updates the spectral display
component.

-Airspy supported with 10 and 2.5 MSps sample rates.  Additional
decimation may be added later.

-Spectral display updated to include smoothing and filtering options.

Note: the decimated output of a tuner channel from the airspy is
48,076.9 samples per second, versus the normal 48 kHz decimated rate.
This is 1.0015 times the normal rate and doesn't appear to impact the
decoders or audio processing.  Therefore, no fractional resampling has
been added.
2015-11-07 08:18:41 -05:00
denny
f4d8ea281d Initial commit of redesigned internal processing and audio management.
Note: Several of the decoders are currently non-functioning in this
commit.  If you want the latest functioning codebase, please checkout
the commit prior to this one.  All decoders will eventually be updated
with this new architecture.

Currently broken:
- Logging and recording
- Aux decoders (Fleetsync/MDC/LoJack/Tait)
- LTR/Passport decoders

Changes in this commit:
- Module architecture for decoders and components with central
provisioning by the DecoderFactory
- Transition from Complex sample stream processing to float buffer
processing for improved memory management
- Redesigned filter structures - to support buffers and streams
- Resolved several memory leak issues
- Universal sharing of the thread pool manager
- Added centralized audio management with call/user prioritization and
new gui with mute/volume controls
- Embedded audio metadata for eventual streaming support
- Redesigned ProcessingChain to support independent re-use
- Added new TrafficChannelManager to handle traffic channel allocations
- Traffic Channel pool size and Call timeout available in P25 and
MPT1327 configs
- Redesigned channel and decoder gui components
2015-09-01 07:10:26 -04:00
dennis.sheirer
fccde3d112 Build 0.1.3 - adds support for 48 kHz audio output from JMBE library for P25 audio. Resolves issue with Automatic Frequency Control on P25 C4FM channels where the channel was not tracking changes in tuner frequency. 2015-05-11 09:37:50 +00:00
dennis.sheirer
bc5080aa4a P25 - updated automatic and direct frequency control to cleanup the code and allow P25 to better track frequency and PPM changes in the tuner and provide a cleaner implementation of the AFC component in the processing chain of all of the other decoders.
Changed C4FM symbol filter to reset frequency tracking values when the tuner's frequency or PPM values change.

Moved all frequency control pieces into the source.tuner.frequency package.
2015-05-04 00:55:04 +00:00
dennis.sheirer
c12123a81b P25 - work in progress to improve CQPSK LSM audio output. Audio output is still choppy but greatly improved over the previous test release. 2015-04-25 23:21:20 +00:00
dennis.sheirer
d55d7609cb Tuner Channel - uses new CIC prime decimation filter for decimating channel to 48k sample rate. 2015-04-07 01:10:10 +00:00
dennis.sheirer
1d77f28958 P25 work in progress - final check-in of channel state and activity summary processing of TSBK and PDU messages and event generation. 2014-12-21 14:30:06 +00:00
dennis.sheirer
ba053457bd Out of memory fixes and updates to the P25 decoder.
Memory Fixes
Decreased the decimation process repeat timing so that it runs smaller work chunks more often
Decreased scheduled thread pool to 2 hot threads
Wrapped all scheduled thread pool runnables in try/catch blocks so that an exception doesn't kill the sample buffer processing thread and cause the buffer to grow unbounded.

P25 updates
Moved TSBK crc checks into the message framer so that message corrections don't occur after the message is constructed.
Added more functionality to the channel state for handling registrations and call events.
2014-12-19 23:59:38 +00:00
dennis.sheirer
e61c3a891c Memory/CPU performance improvement and Audio/Mixer source restructuring
Converted to use float primitives and to keep samples in buffer format until the sample rate is decimated to 48kHz.  
Added new non-recursive, CIC decimation filter -- untested

Updated sound card/mixer input source management.  Now testing for mono/stereo support for each card and limiting channel choices accordingly.  Separated the mixersource into a ComplexMixer and and SimplexMixerSource.  The ComplexMixer is used for sound card based tuners like the funcube.  The SimplexMixerSource is used for demodulated sound card inputs.

Interfaces for sample handling - standardized on using 'Complex' to indicate I/Q samples and 'Simplex' to indicate demodulated float samples.  The processing chain now accepts either a decimated (48k) list of complex samples from a tuner channel source, or a 48k simplex buffer (array of demodulated float samples).

Resolved issue with HackRF tuner not applying tuner configuration information.
2014-10-26 10:11:30 +00:00
dennis.sheirer
550aed79d4 Changed FrequencyChangeListener interface to an event so that I could describe what event was causing the frequency change and to broadcast frequency and sample rate error values.
R820T - added a couple more sample rate settings to the enum and modified the periodic sample rate info logger.
2014-09-27 09:46:18 +00:00
dennis.sheirer
ad456d81a3 Updated Call Event handling/display for all decoders and updated channel display values for all decoders.
- Call events now show start-stop timestamps.  (or START-In Progress if call is ongoing )
 - Call start/stop events are now on the same event line.
 - Channel panels now display site and/or channel info
 - LTR call events are limited to CALLs on the current LCN, in order to cut down on false call events resulting from noise.
 - Passport display channels now show site/channel.
 - Changed default window used by the DFTProcessor to Cosine, which doesn't have as much FFT bin leakage.
2014-09-15 00:42:20 +00:00
dennis.sheirer
0f43c7ed22 Automatic Frequency Control enhancement. Provides default AFC and ability to disable in the Decoder tab of each channel. Spectral display includes visual indicators of frequency center (grey) and current AFC offset (yellow). 2014-09-11 22:46:05 +00:00
dennis.sheirer
35a2cebe03 Converted frequency to long primitive type (from integer) in anticipation of HackRF support which requires frequencies greater than 2.147 GHz, which is the max hertz value that can be represented by an integer primitive. 2014-07-08 14:40:11 +00:00
dennis.sheirer
3dfedcf8d1 Initial code check in continued 2014-04-26 19:48:24 +00:00