Smart battery management for audio power supply