The SDRplay team have put together a very good technical that describes the gain control and AGC concepts very well:
Reading through this, it became clear to me that the SDR# plugin allows the user to programme gain settings that are not valid settings for the tuner.
The tuner LNA has discrete gain steps, which vary depending upon the band that is selected. For example, in VHF Band II, the step is 24 dB. It appears that the mixer gain can only be reduced AFTER the LNA has already been switched to its low gain state. This means that the maximum 'legal' LNA GR Threshold that can be set is 59 dB, which is the maximum IF gain reduction. Attempting to set the LNA GR Threshold higher than this, say 61 dB for example, means that if you try to set the overall gain reduction to 60 dB, it can only do this by attempting to set the IF gain reduction to 60 dB, which is greater than the maximum possible! Similarly, there is a minimum LNA GR Threshold that you can set. If the LNA gain step is 24 dB, then you cannot have an LNA GR Threshold of less than 24 dB. If you were to try to set the threshold to say 20 dB and then set the total gain reduction to 22 dB, then the S/W will try to set the IF gain reduction to -2dB which is also an 'illegal' value.
I have emailed the SDRplay support team and they have confirmed that what I am saying is correct and that they will implement checks in the next version of the SDR# plugin to ensure that you cannot programme 'illegal' values. It seems to me that this might also explain some of the problems that people have had with S/W instability. I have not seen this myself, but I have not tried experimenting with different LNA GR Thresholds. I simply left it at 59 dB and everything seems to work well
