From e1d2ed8867291f8999789f1d6f28920d2d110817 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Thu, 19 Dec 2019 21:37:19 +0100 Subject: [PATCH] add fifisdr support (no frequency tuning) --- owrx/feature.py | 8 ++++++++ owrx/source.py | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/owrx/feature.py b/owrx/feature.py index a9711d3..89e39b5 100644 --- a/owrx/feature.py +++ b/owrx/feature.py @@ -31,6 +31,7 @@ class FeatureDetector(object): "digital_voice_dsd": ["dsd", "sox", "digiham"], "wsjt-x": ["wsjtx", "sox"], "packet": ["direwolf", "sox"], + "fifi_sdr": ["alsa"], } def feature_availability(self): @@ -262,3 +263,10 @@ class FeatureDetector(object): on how to build from source. """ return reduce(and_, map(self.command_is_runnable, ["jt9", "wsprd"]), True) + + def has_alsa(self): + """ + Some SDR receivers are identifying themselves as a soundcard. In order to read their data, OpenWebRX relies + on the Alsa library. It is available as a package for most Linux distributions. + """ + return self.command_is_runnable("arecord --help") diff --git a/owrx/source.py b/owrx/source.py index dd1b22e..c02ed18 100644 --- a/owrx/source.py +++ b/owrx/source.py @@ -460,6 +460,14 @@ class Resampler(SdrSource): pass +class FifiSdrSource(SdrSource): + def getCommand(self): + return "arecord -D hw:2,0 -f S16_LE -r {samp_rate} -c2 -" + + def getFormatConversion(self): + return "csdr convert_s16_f | csdr gain_ff 30" + + class ConnectorSource(SdrSource): def __init__(self, id, props, port): super().__init__(id, props, port)