Pi Aware 6, with auto gain

This one you have already built and installed on Debian Bullseye arm64 on RPI Model 4:

It already has adaptive gain control:

pi@rpi2-20210823:~$ sudo systemctl status dump1090-fa  

● dump1090-fa.service - dump1090 ADS-B receiver (FlightAware customization)
     Loaded: loaded (/lib/systemd/system/dump1090-fa.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2021-08-29 17:51:03 EDT; 2h 36min ago
       Docs: https://flightaware.com/adsb/piaware/
   Main PID: 4302 (dump1090-fa)
      Tasks: 3 (limit: 2001)
     Memory: 10.6M
        CPU: 1h 31min 52.974s
     CGroup: /system.slice/dump1090-fa.service
             └─4302 /usr/bin/dump1090-fa --quiet --device-type rtlsdr --device-index 00001090 --gain 60 --adaptive-range --fix --lat 43.5xxx --lon -79.6xxx>

Aug 29 18:51:34 rpi2-20210823 dump1090-fa[4302]: adaptive: changing gain from 58.6dB (step 29) to 49.6dB (step 28) because: probing dynamic range gain lower>
Aug 29 18:51:34 rpi2-20210823 dump1090-fa[4302]: rtlsdr: tuner gain set to 49.6 dB (gain step 28)
Aug 29 18:51:44 rpi2-20210823 dump1090-fa[4302]: adaptive: available dynamic range (38.2dB) >= required dynamic range (30.0dB), stopping downwards scan here
Aug 29 19:51:44 rpi2-20210823 dump1090-fa[4302]: adaptive: start periodic scan for acceptable dynamic range at increased gain
Aug 29 19:51:44 rpi2-20210823 dump1090-fa[4302]: adaptive: changing gain from 49.6dB (step 28) to 58.6dB (step 29) because: periodic re-probing of dynamic r>
Aug 29 19:51:44 rpi2-20210823 dump1090-fa[4302]: rtlsdr: tuner gain set to about 58.6 dB (gain step 29) (tuner AGC enabled)
Aug 29 19:51:54 rpi2-20210823 dump1090-fa[4302]: adaptive: available dynamic range (28.8dB) < required dynamic range (30.0dB), switching to downward scan
Aug 29 19:51:54 rpi2-20210823 dump1090-fa[4302]: adaptive: changing gain from 58.6dB (step 29) to 49.6dB (step 28) because: probing dynamic range gain lower>
Aug 29 19:51:54 rpi2-20210823 dump1090-fa[4302]: rtlsdr: tuner gain set to 49.6 dB (gain step 28)
Aug 29 19:52:04 rpi2-20210823 dump1090-fa[4302]: adaptive: available dynamic range (38.2dB) >= required dynamic range (30.0dB), stopping downwards scan here