Merge "Init gain config to prevent uninit leak." into pi-dev