I've been trying to understand how the RTL-SDR drivers adjust gain values for R82xx/R860 chips based on user input. I saw that a user input is set to one of 29 possible values using the "nearest_gain" function in "convenience.c". These values are listed in "librtlsdr.c" in the "r82xx_gains", with the last two gain values being 480 and 496. As I was going through the code, I looked up the gain values for the LNA and mixers in "tuner_r82xx.c", and then created a spreadsheet to understand the method of how these are used together to set the overall gain. The method is to add gain to the LNA and mixer in alternating fashion (LNA-mixer-LNA-mixer), as listed in the function "r82xx_set_gain", using the gain values for each amp listed in "tuner_r82xx.c". And I think that there's a value missing in "r82xx_gains". According to my spreadsheet, there should also be a value of 483 between these last, two values. That means the last three values of this array would be "..., 480, 483, 496]".
Mind you, this is a minor 0.3 dB of gain. This is also my OCD kicking in.
I'm not a programmer, so I don't know if I'm understanding this correctly. If I am, I don't know if the correction is to just add this value to the array.
Regards,
Gary