firmware: gain control