Input jack power switch with daisy?

Does anyone know how to make daisy power on only when the input jack is connected? I’m using daisy on a portable device so it needs to be powered by a battery.

The usual solution is to use a stereo jack and connect the negative end of battery to the ring, similar to this

battery power switch

but this configuration forces audio and power to share the same ground.

Apparently daisy does not like the power source ground connected to AGND. Only DGND works. When the power connected to AGND, it’s drawing more than double the current and producing the noise mentioned in https://forum.electro-smith.com/t/questions-about-digital-noise-and-grounding/432.

Is there other ways to hook up the battery and jack to prevent connecting AGND and DGND? Or is there a way to filter out the noise? I’m using a switched stereo jack, i.e. TRS each has a pair of pins that are connected to each other by default, but the pairs became open circuit if jack is connected, so there should be more possibilities, but I can’t find any examples of using this mechanism for battery switch.

Hey stm!

Are you going to use any sensors for your project? If so, the AGND and DGND need to be bridged together regardless.
And are you getting noise when you connect the battery to the VIN pin and ground?