I use my H320 extensively for recording live music. My iriver is modified with CF flash memory to replace the original hard drive. This allows the option of recording with the built-in microphone without picking up the sound of a hard drive spinning up, though I usually use a separate microphone.
I do not get any clicks when adjusting gain levels manually. I hope this doesn't mean the issue is with your particular device, though I suppose it could. I should also note that I am not using the very latest release of Rockbox.
I use AGC, and do not experience any clicks there either.
I use the Safety (clip) setting for the AGC. I worry the others could result in a pumping effect. The drawback I find is that when the safety setting causes the gain to be reduced, I may often have to go back in and raise it again. So I suppose I'm getting something of a pumping effect anyway, along with the occasional aggravation of having to adjust the gain back up.
The safety setting promptly cuts the gain 0.5 dB each time the recording level within the device goes over 0 dB (i.e., experiences clipping). Thus if you experience a series of loud passages, it will drop the gain lower and lower until clipping no longer occurs. Loud passages typically cause my gain to be dropped by about 2 dB, because when I misjudge what loudness to anticipate, I'm often off by about that much. What gain level it ends up at depends on how loud the input signal is, and where your initial gain setting is. For example, if the signal isn't real loud, and you set your makeup gain to +3 dB to compensate, the safety setting may drop your gain level to +1 dB in this scenario. But you could get a signal that's a LOT louder than you expected, and then the setting will drop your gain a LOT more than 2 dB. You will need to experiment with gain settings to find the best starting level. Another strategy is to guess at an initial setting, then just let the AGC find the best level as it cuts the gain with each clipping incident, and then leave it there.
You could also experiment with the different AGC settings to see which performs most to your liking.
Another thing to watch out for is overloading the iriver with an input level that is too hot (i.e., with a voltage level that is too high). You can adjust the makeup gain downward and still get clipping within the device even though the AGC no longer detects it. This is because the iriver does not have a gain attenuation circuit, unlike many recorders. You can tell from listening when you have had clipping from that source, or, more definitively, by looking at the waveform of the file using a program such as Audacity. Clipping looks like the waveform got a haircut at a specific dB level that is actually below 0 dB, and becomes especially obvious when you zoom in to the level where you can see individual waves with their tops and bottoms chopped off. This was a constant problem for me when I was recording concerts off the sound mixing board, until I wired up a double-ganged variable resister (i.e., volume control) into the line entering the iriver. I put it in a little plastic box with RCA jacks for input and output, then ran one RCA line from the mixing board into the box, and another out of it to the iriver. Problem solved.