From 6be53e16ae994e20857ec92568f9ad125c73c18f Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 17 Dec 2018 14:47:07 +0100 Subject: Soapy: do not set master clock rate if it is 0 --- src/output/Soapy.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/output') diff --git a/src/output/Soapy.cpp b/src/output/Soapy.cpp index 86ed3e0..8c84b84 100644 --- a/src/output/Soapy.cpp +++ b/src/output/Soapy.cpp @@ -71,8 +71,10 @@ Soapy::Soapy(SDRDeviceConfig& config) : throw std::runtime_error("Cannot create SoapySDR output"); } - m_device->setMasterClockRate(m_conf.masterClockRate); - etiLog.level(info) << "SoapySDR master clock rate set to " << + if (m_conf.masterClockRate != 0) { + m_device->setMasterClockRate(m_conf.masterClockRate); + } + etiLog.level(info) << "SoapySDR:Actual master clock rate: " << std::fixed << std::setprecision(4) << m_device->getMasterClockRate()/1000.0 << " kHz"; -- cgit v1.2.3 From 154234871e06d6943d7e79a05ba10b37eb7e9198 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 17 Dec 2018 15:13:41 +0100 Subject: Only start DPD feedback if port is set --- src/output/SDR.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/output') diff --git a/src/output/SDR.cpp b/src/output/SDR.cpp index 068b5af..23a947b 100644 --- a/src/output/SDR.cpp +++ b/src/output/SDR.cpp @@ -66,10 +66,12 @@ SDR::SDR(SDRDeviceConfig& config, std::shared_ptr device) : m_device_thread = std::thread(&SDR::process_thread_entry, this); - m_dpd_feedback_server = make_shared( - m_device, - m_config.dpdFeedbackServerPort, - m_config.sampleRate); + if (m_config.dpdFeedbackServerPort > 0) { + m_dpd_feedback_server = make_shared( + m_device, + m_config.dpdFeedbackServerPort, + m_config.sampleRate); + } RC_ADD_PARAMETER(txgain, "TX gain"); RC_ADD_PARAMETER(rxgain, "RX gain for DPD feedback"); -- cgit v1.2.3