I am designing a circuit for the CHIP Microcomputer and I want to enable audio output using headphones OR a speaker. For clarification, when the user plugs in headphones, I want the speakers to be disabled. The CHIP has a headphone jack and provides access to the HPL, HPR and HPCOM signals, but doesn't appear to give me access to the Headphone detect signal from the headphone jack's detect switch.
How should I go about doing this? Can I use the HPL and HPR signals with an external amplifier for the speaker? If so, how do I set the SHUTDOWN signal to disable the speaker when headphones are inserted? Should I use an external audio codec? How do I know if an audio codec mutes the LINEOUT signals when the HPOUT signals are in use or how do I use the detect switch of a headphone jack to accomplish this?