Default [Q] digital noise cancellation in xperia z2

how the digital noise cancellation works in xperia z2?
Is just software and the headphones with mic?
or is hardware inside the phone?