what is the theory behind connecting microcontroller to 3.5mm headset socket? I have seen DAC and amplifier used between microcontroller and 3.5mm headset but I haven't understood is what and how does one know the amplitude level at the output of microcontroller and what is the amplitude required to be delivered to headset/headphone?
Headphones have a sensitivity specification. The loudness is the number of DB's you need as the maximum level. Then simply calculate how much power you need.
You will probably find an opamp that can provide the amplitude level (voltage level) but not the power (voltage level times current level).