lib: actually handle the value returned by the fw when setting the gains