You need to either check the datasheet for your jack to see which pin is attached to Tip, Ring, Sleeve and Switched Tip. Alternatively you can use a multimeter on continuity mode to figure this out:
Connect a TRS cable (aka. a stereo cable) to the jack. Using the multimeter find out which pin on...