1. Tip - Left audio
2. Ring 1 - Right audio
3. Ring 2 - Ground
4. Sleeve - Microphone
The measurements on a computer show that Pin 4 is +3.6V relative to Pin 3 and can supply 1.86mA (equivalently about 2KOhm pullup), Pin 1 to Pin 3 and Pin 2 to Pin 3 are 32 Ohms (this is surprisingly low). When the common earphone is plugged, the sleeve is shorted to the ground, and the earphone works normally. But a normal microphone usually has only two connection, the tip and the sleeve, so it would not work. A 4-ring splitter is needed. Only one audio input channel (mono) is possible. The voltage on the sleeve is to supply the FET amplifier in an electret condenser microphone.
The audio input and output are sometimes useful as a signal generator and a data acquisition channel. The frequency response is usually 20Hz - 20KHz. The output can be up to 24 bits at 192KHz and the input up to 24 bits at 96KHz. They usually have excellent noise characteristics.
Here is a 1000Hz sine wave generated by the PC headphone output with 48KHz sample rate and captured in by a NI DAQ module at 100KHz sample rate. All this can be done in Python, using the sounddevice and PyDAQmx modules. The volume control affects the amplitude; +/-2V seems to be the range for my computer.
And 0.2Vpp 1KHz sine wave captured by the microphone at 48000 samples per second,
The microphone input seems to saturate around 0.4Vpp. And the input should be AC coupled.