add fifisdr support (no frequency tuning)

This commit is contained in:
Jakob Ketterl 2019-12-19 21:37:19 +01:00
parent 8ee0d7c0e8
commit e1d2ed8867
2 changed files with 16 additions and 0 deletions

View File

@ -31,6 +31,7 @@ class FeatureDetector(object):
"digital_voice_dsd": ["dsd", "sox", "digiham"], "digital_voice_dsd": ["dsd", "sox", "digiham"],
"wsjt-x": ["wsjtx", "sox"], "wsjt-x": ["wsjtx", "sox"],
"packet": ["direwolf", "sox"], "packet": ["direwolf", "sox"],
"fifi_sdr": ["alsa"],
} }
def feature_availability(self): def feature_availability(self):
@ -262,3 +263,10 @@ class FeatureDetector(object):
on how to build from source. on how to build from source.
""" """
return reduce(and_, map(self.command_is_runnable, ["jt9", "wsprd"]), True) 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")

View File

@ -460,6 +460,14 @@ class Resampler(SdrSource):
pass 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): class ConnectorSource(SdrSource):
def __init__(self, id, props, port): def __init__(self, id, props, port):
super().__init__(id, props, port) super().__init__(id, props, port)