I was reading a similar question when I brought this one up. We all know that you can output audio through the 3.5mm jack, but there are headsets out there that can both receive and transmit audio through the same jack (take the iPhone's earbuds, for example). Can the PS4 capture that microphone signal and recognize that what I have plugged in is a headset, not headphones?
As per the FAQ,
Will the DUALSHOCK 4 controller’s 3.5mm headset jack support other headsets or headphones?
The PS Vita system’s headset is fully supported. Some other third-party headsets may support basic audio and chat functionality on PS4, but Sony Computer Entertainment cannot guarantee it.
So maybe. It depends on your headset. If it works in a Vita, it should work in a Dualshock 4 as well. As per this, the buds for the iPhone will likely work, but the best way to find out is to try. The compatibility concern is largely with Bluetooth and USB headsets.
It's not so much "capturing and recognizing" as that 3.5mm jacks with mic output (TRRS)(3 rings) are physically different than those without (TRS)(2 rings). If it has the ring to connect a mic signal, it will have a signal and if it doesn't, it won't. Signal v. no signal is pretty simple electrical engineering to sort out so that's nothing to be concerned about - headphones are already known to work. As per the vita headset working and the above information, so too should most 3.5mm headsets.
The concern with the mic is recognizing different implementations of TRRS because there are two standards (OMTP and CTIA) which have two rings flipped, but most devices nowadays have that fairly sorted. I'll test with an iphone's earbuds(with mic) at my earliest convenience and update the answer with results.