diff --git a/lib/rtl_tcp/rtl_tcp_source_c.cc b/lib/rtl_tcp/rtl_tcp_source_c.cc index 264ee08..eae5a13 100644 --- a/lib/rtl_tcp/rtl_tcp_source_c.cc +++ b/lib/rtl_tcp/rtl_tcp_source_c.cc @@ -318,6 +318,7 @@ osmosdr::gain_range_t rtl_tcp_source_c::get_gain_range( const std::string & name bool rtl_tcp_source_c::set_gain_mode( bool automatic, size_t chan ) { _src->set_gain_mode(int(!automatic)); + _src->set_agc_mode(automatic); _auto_gain = automatic; diff --git a/lib/rtl_tcp/rtl_tcp_source_f.cc b/lib/rtl_tcp/rtl_tcp_source_f.cc index 929ed6c..0388647 100644 --- a/lib/rtl_tcp/rtl_tcp_source_f.cc +++ b/lib/rtl_tcp/rtl_tcp_source_f.cc @@ -308,3 +308,9 @@ void rtl_tcp_source_f::set_if_gain(int stage, int gain) struct command cmd = { 0x06, htonl(params) }; send(d_socket, (const char*)&cmd, sizeof(cmd), 0); } + +void rtl_tcp_source_f::set_agc_mode(int on) +{ + struct command cmd = { 0x08, htonl(on) }; + send(d_socket, (const char*)&cmd, sizeof(cmd), 0); +} diff --git a/lib/rtl_tcp/rtl_tcp_source_f.h b/lib/rtl_tcp/rtl_tcp_source_f.h index d48eaf4..e3dc3f6 100644 --- a/lib/rtl_tcp/rtl_tcp_source_f.h +++ b/lib/rtl_tcp/rtl_tcp_source_f.h @@ -112,6 +112,7 @@ public: void set_gain(int gain); void set_freq_corr(int ppm); void set_if_gain(int stage, int gain); + void set_agc_mode(int on); };