So I recently finished my boombox project, but ran into a minor problem. The boombox is powered by a blue wrapped lithium ion battery and using a ta 2021 chip amp from parts express. If I plug the aux cable into my phone BEFORE turning on the power, everything works perfect. If I turn on the power then plug in the aux cable to my phone, the speakers make a pop as it is being pressed into the phone and then the battery goes into protect mode.
My thought is that the pop is essentially a transient signal which exceeds the current limit of the battery and throws it into protect. My thought to fix this is to create a circuit that leaves the mute and ground on the amp connected until a signal is seen at the aux input and THEN unmute the amp. My problem is I'm not sure where to start to come up a circuit to do just that. Any help is appreciated. See the picture to hopefully make things as clear as possible.
Basically I need a way to trigger a switch to disconnect mute to ground using the iphone headphone jack output signal.