From e9aa78a9167c1f562789b75db3e32ee3f9eb68cc Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 23 Jul 2017 16:57:13 +0200 Subject: [PATCH] RTLSDR: impemented RTLSDR AGC control --- doc/img/RTLSDR_plugin.png | Bin 24599 -> 25265 bytes plugins/samplesource/rtlsdr/readme.md | 6 ++++-- plugins/samplesource/rtlsdr/rtlsdrgui.cpp | 6 ++++++ plugins/samplesource/rtlsdr/rtlsdrgui.h | 1 + plugins/samplesource/rtlsdr/rtlsdrgui.ui | 10 ++++++++++ plugins/samplesource/rtlsdr/rtlsdrinput.cpp | 12 ++++++++++++ plugins/samplesource/rtlsdr/rtlsdrplugin.cpp | 2 +- .../samplesource/rtlsdr/rtlsdrsettings.cpp | 3 +++ plugins/samplesource/rtlsdr/rtlsdrsettings.h | 1 + 9 files changed, 38 insertions(+), 3 deletions(-) diff --git a/doc/img/RTLSDR_plugin.png b/doc/img/RTLSDR_plugin.png index 17a979ef37f8666f2efe6817931aa5da84b580f6..1a99604de7202aa92a09f1e6de49a9920e22d059 100644 GIT binary patch delta 6907 zcmbW6cRbba`^TNo$(GDxeN;vW8Hq$$g^W|SIQGmQWxj1iM)oc%;~Y8Jn-JNQ5t-R! zuVer2^ZEY9|34o7c|V-{eP7pgU$5)=x=&Iw?8`S;4DX!_0`U8>AwQ0QfPlp5iJmI~ z0ogVDAB-S1oe?~QyD6zEz-QqMq=-y{a?97Kywz8jJf(Gsnf1m|Wd%{r5I=Bv*K3JxyeITdZ!WgNBAU zy;CG{-j!#vDOuzq_0ZE~9U_b7N8_8jQoGF)-u>&YeuwGa8#V5=c3hE)L2+?$N~_Ts z>FFBi;RM_G?R%UUC_ESa(o4y}`$sr8i;sJ)KC;D&hT*5XjIrn8P}8sO_+7L=2E#9k zpb!uch;Fb>P*#wYl^urjM|4@JQAy9;uvxPlPtAUw#=;nHJ$^J?-ZMDCQlW2O8ZlM$ ztT1B5wlB@jx_Nb5eoFR8L&0fnMbTSv#-?5s)be=oH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@8|QA^DGwU<@hc?|&as2Lb04{gd_9l59@*ja;mR;W0|_FlhyWZAqBZUj&}t zK7|WDHUwPKf#2`M-MSgzME;)(xVqr6|9!@P7DWHossG28|K729gN~(FamQb_D(&{) O4RX@TQpJ+SLH`A?T3e9- diff --git a/plugins/samplesource/rtlsdr/readme.md b/plugins/samplesource/rtlsdr/readme.md index 144e2447c..c086f574a 100644 --- a/plugins/samplesource/rtlsdr/readme.md +++ b/plugins/samplesource/rtlsdr/readme.md @@ -76,6 +76,8 @@ The I/Q stream from the RTLSDR ADC is doensampled by a power of two before being Use this checkbox to activate the special RTLSDR direct sampling. This can be used to tune to HF frequencies. -

9: RF gain

+

9: RF gain and AGC

-This is the RF gain setting in dB. The values are defined in the RTLSDR device and generally are: 0.0, 0.9, 1.4, 2.7, 3.7, 7.7, 8.7, 12.5, 14.4, 15.7, 16.6, 19.7, 20.7, 22.9, 25.4, 28.0, 29.7, 32.8, 33.8, 36.4, 37.2, 38.6, 40.2, 42.1, 43.4, 43.9, 44.5, 48.0, 49.6 \ No newline at end of file +The slider sets RF gain in dB. The values are defined in the RTLSDR device and generally are: 0.0, 0.9, 1.4, 2.7, 3.7, 7.7, 8.7, 12.5, 14.4, 15.7, 16.6, 19.7, 20.7, 22.9, 25.4, 28.0, 29.7, 32.8, 33.8, 36.4, 37.2, 38.6, 40.2, 42.1, 43.4, 43.9, 44.5, 48.0, 49.6 + +The AGC checkbox can be used to switch on or off the RTL2838 AGC. This is independent of the gain setting as this AGC acts after the gain block. \ No newline at end of file diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp index e08acaff8..4174444d0 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp @@ -407,6 +407,12 @@ void RTLSDRGui::on_checkBox_stateChanged(int state) sendSettings(); } +void RTLSDRGui::on_agc_stateChanged(int state) +{ + m_settings.m_agc = (state == Qt::Checked); + sendSettings(); +} + void RTLSDRGui::on_sampleRate_changed(quint64 value) { m_settings.m_devSampleRate = value; diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.h b/plugins/samplesource/rtlsdr/rtlsdrgui.h index ca72beff4..1f9139971 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.h +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.h @@ -80,6 +80,7 @@ private slots: void on_gain_valueChanged(int value); void on_sampleRate_currentIndexChanged(int index); void on_checkBox_stateChanged(int state); + void on_agc_stateChanged(int state); void on_startStop_toggled(bool checked); void on_record_toggled(bool checked); void updateHardware(); diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.ui b/plugins/samplesource/rtlsdr/rtlsdrgui.ui index ec8a52775..d56fa26f4 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.ui +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.ui @@ -483,6 +483,16 @@ 3 + + + + Toggles RTLSDR AGC + + + AGC + + + diff --git a/plugins/samplesource/rtlsdr/rtlsdrinput.cpp b/plugins/samplesource/rtlsdr/rtlsdrinput.cpp index 669f678a9..3d04d2c77 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrinput.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrinput.cpp @@ -256,6 +256,18 @@ bool RTLSDRInput::applySettings(const RTLSDRSettings& settings, bool force) { bool forwardChange = false; + if ((m_settings.m_agc != settings.m_agc) || force) + { + if (rtlsdr_set_agc_mode(m_dev, settings.m_agc ? 1 : 0) < 0) + { + qCritical("could not set AGC mode %s", settings.m_agc ? "on" : "off"); + } + else + { + m_settings.m_agc = settings.m_agc; + } + } + if ((m_settings.m_gain != settings.m_gain) || force) { m_settings.m_gain = settings.m_gain; diff --git a/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp b/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp index 915f9ce1d..7b3e734fa 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp @@ -11,7 +11,7 @@ const PluginDescriptor RTLSDRPlugin::m_pluginDescriptor = { QString("RTL-SDR Input"), - QString("3.5.0"), + QString("3.5.2"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/samplesource/rtlsdr/rtlsdrsettings.cpp b/plugins/samplesource/rtlsdr/rtlsdrsettings.cpp index 930218c2c..edf29351d 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrsettings.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrsettings.cpp @@ -34,6 +34,7 @@ void RTLSDRSettings::resetToDefaults() m_fcPos = FC_POS_CENTER; m_dcBlock = false; m_iqImbalance = false; + m_agc = false; } QByteArray RTLSDRSettings::serialize() const @@ -48,6 +49,7 @@ QByteArray RTLSDRSettings::serialize() const s.writeS32(7, (int) m_fcPos); s.writeS32(8, m_devSampleRate); s.writeBool(9, m_lowSampleRate); + s.writeBool(10, m_agc); return s.final(); } @@ -75,6 +77,7 @@ bool RTLSDRSettings::deserialize(const QByteArray& data) m_fcPos = (fcPos_t) intval; d.readS32(8, &m_devSampleRate, 1024*1000); d.readBool(9, &m_lowSampleRate, false); + d.readBool(10, &m_agc, false); return true; } diff --git a/plugins/samplesource/rtlsdr/rtlsdrsettings.h b/plugins/samplesource/rtlsdr/rtlsdrsettings.h index ee8331c00..ff257de71 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrsettings.h +++ b/plugins/samplesource/rtlsdr/rtlsdrsettings.h @@ -33,6 +33,7 @@ struct RTLSDRSettings { fcPos_t m_fcPos; bool m_dcBlock; bool m_iqImbalance; + bool m_agc; RTLSDRSettings(); void resetToDefaults();