summaryrefslogtreecommitdiffstats
path: root/binding/radio_impl_rtlsdr.c
diff options
context:
space:
mode:
authorScott Murray <scottm@ghidorah.spiteful.org>2018-05-28 21:16:23 -0400
committerScott Murray <scott.murray@konsulko.com>2018-06-05 21:17:14 -0400
commit9f5ed322b54f12c1055d2a124d687965083d4dee (patch)
tree4d8d115bd3683d3e2ff01379d55e04ff9f9e6579 /binding/radio_impl_rtlsdr.c
parent127da1228b47486de500424e4a2ab3f0f5f0ec4a (diff)
Rework output to directly support 4Aflounder_5.99.1flounder/5.99.15.99.1
When building for 4A, switch to new gstreamer-based ALSA output for the RTL-SDR backend, and the Kingfisher backend now uses a gstreamer pipeline for its loopback to either an ALSA or Pulse sink depending on 4A or not. Using gstreamer instead of direct ALSA output has the benefit of transparently handling resampling to the M3ULCB hardware's required 48 KHz sample rate for the RTL-SDR backend. Change-Id: I2bfbf924927bb461cce88b04aba0e626f8d71215 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'binding/radio_impl_rtlsdr.c')
-rw-r--r--binding/radio_impl_rtlsdr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/binding/radio_impl_rtlsdr.c b/binding/radio_impl_rtlsdr.c
index 7fd4d69..b8b2454 100644
--- a/binding/radio_impl_rtlsdr.c
+++ b/binding/radio_impl_rtlsdr.c
@@ -125,7 +125,7 @@ static pid_t popen2(char *command, int *in_fd, int *out_fd)
return pid;
}
-static int rtlsdr_init(void)
+static int rtlsdr_init(const char *output)
{
GKeyFile *conf_file;
char *value_str;
@@ -183,6 +183,12 @@ static int rtlsdr_init(void)
return -1;
}
+ if(output) {
+ // Indicate desired output to helper
+ AFB_INFO("Setting RADIO_OUTPUT=%s", output);
+ setenv("RADIO_OUTPUT", output, 1);
+ }
+
// Run helper
if(snprintf(helper_path, PATH_MAX, "%s/bin/%s", rootdir, HELPER_NAME) == PATH_MAX) {
AFB_ERROR("Could not create path to %s", HELPER_NAME);