From 6425b7e0009d1a62ed7c0cc0684a657e67a6caaa Mon Sep 17 00:00:00 2001 From: Martin Murray Date: Fri, 12 Jan 2024 22:35:10 -0500 Subject: [PATCH 1/2] Always try to enable packed airspy sample transfers. --- multifm/airspy_if.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/multifm/airspy_if.c b/multifm/airspy_if.c index cd964b6..4a764cc 100644 --- a/multifm/airspy_if.c +++ b/multifm/airspy_if.c @@ -190,6 +190,11 @@ aresult_t airspy_worker_thread_new(struct receiver **pthr, struct config *cfg) } } + /* Enable packed sample transfers. */ + if (0 != airspy_set_packing(dev, 1)) { + MFM_MSG(SEV_WARNING, "FAILED-BIT-PACKING", "Request for packed sample transfers failed, continuing."); + } + /* Set the sample rate, as requested */ if (0 != airspy_set_samplerate(dev, sample_rate)) { MFM_MSG(SEV_FATAL, "BAD-SAMPLE-RATE", "Unable to set sampling rate to %d Hz, aborting.", From 47a879352e8a72c2a16c177bbc774b00af12a148 Mon Sep 17 00:00:00 2001 From: Martin Murray Date: Fri, 12 Jan 2024 22:37:44 -0500 Subject: [PATCH 2/2] Cosmetic changes. Clarified bias-tee and mixer error log messages. --- multifm/airspy_if.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/multifm/airspy_if.c b/multifm/airspy_if.c index 4a764cc..bd861da 100644 --- a/multifm/airspy_if.c +++ b/multifm/airspy_if.c @@ -213,28 +213,29 @@ aresult_t airspy_worker_thread_new(struct receiver **pthr, struct config *cfg) /* Set the LNA gain */ if (0 != airspy_set_lna_gain(dev, lna_gain)) { - MFM_MSG(SEV_FATAL, "BAD-LNA-GAIN", "LNA gain value of %d dB is invalid, aborting", lna_gain); + MFM_MSG(SEV_FATAL, "BAD-LNA-GAIN", "LNA gain setting %d is invalid, aborting", lna_gain); ret = A_E_INVAL; goto done; } /* Set the VGA gain */ if (0 != airspy_set_vga_gain(dev, vga_gain)) { - MFM_MSG(SEV_FATAL, "BAD-VGA-GAIN", "VGA gain value of %d dB is invalid, aborting", vga_gain); + MFM_MSG(SEV_FATAL, "BAD-VGA-GAIN", "VGA gain setting %d is invalid, aborting", vga_gain); ret = A_E_INVAL; goto done; } /* Set the Mixer gain */ if (0 != airspy_set_mixer_gain(dev, mixer_gain)) { - MFM_MSG(SEV_FATAL, "BAD-MIXER-GAIN", "Mixer gain value of %d dB is invalid, aborting", mixer_gain); + MFM_MSG(SEV_FATAL, "BAD-MIXER-GAIN", "Mixer gain setting %d is invalid, aborting", mixer_gain); ret = A_E_INVAL; goto done; } /* Enable the Bias Tee if we were asked to do so */ if (0 != airspy_set_rf_bias(dev, (true == bias_t) ? 1 : 0)) { - MFM_MSG(SEV_WARNING, "FAILED-ENABLE-BIAS", "Failed to enable Bias Tee for powering an outside device."); + MFM_MSG(SEV_WARNING, "FAILED-ENABLE-BIAS", "Failed to %sable Bias Tee for powering an outside device.", + (true == bias_t) ? "en" : "dis"); } /* Create the device object */