I have M8 for 3 months now. Previously I had M7 and I have tried headphone output on Galaxy S4, Note3, Nexus5, iPhone 4S. I also listen to music on FiiO X5, E18 and Sansa Clip Zip.
So what can I say? HTC One have very nice output. Better than M7, on par with Note 3 but more powerful. iPhone has nice output but more warmer, fuller sound. HTC is analitical, bit cold and thin but at the same time very clean and precise.
The most important thing is to find the right match for it. I have 12 IEMs, tried most of them with M8 and synergy is the key here.
The best match so far is NuForce NE700 (bassy and warm) and Musical Fidelity EB-50 (totally flat response, neutral). I think it's the impedance - HTC has high output impadance which combine with sound characteristics make it hard to find the right headphones.
It's not that other IEMs sounds bad, but you can't fully enjoy and appreciate this phone with any headphone. But when you find the right synergy it's great.
Here's my impressions with different IEMs:
Philips Fidelio S2 ( too weak output, sounds good when combined with FiiO E02)
Havi B3 Pro-1 ( too weak output, sounds better when combined with FiiO E02 but still not the right IEM for this phone)
T-Peos H200 (good match when it comes to power, average in general, sounds too analitical)
Xiaomi Piston 2 (ok match, nothing special though)
Sony XBA-H3 (good match I think, but I don't use that one on the move, so didn't really try it enough)
Rock-It R50 (average match, wouldn't recommend)
LG Quadbeat 2 (very good match, highly recommended)
Phonak Audeo 112 (nothing special, a bit too weak output, not enough bass quantity)
Klipsch X10 (didn't have enough time before it broke and haven't upacked X11 yet)
VSonic GR01 (I think it should be great but unfortunatelly I broke them)
TDK IE800 (too weak output, sounds good when combined with FiiO E02)
Don't have any any full size headphones to try. There's clipping on 2 highest volume levels, but that levels are too high for most IEMs with the exeptions of headphones with 2 dynamic drivers. Using amp fixes this problem (FiiO E02 for example).
I'm guessing there is always gonna be some problems with all smartphone headphone outputs - whether it's too weak, too distorted or something else. HTC One M8, LG G3, Samsung Galaxy S5, Sony Xperia Z2 and many others have the same DAC and the differences will always be small. Than again it does have more power and it's at least equally clean. I can recommend it without hesitation and I don't think there's anything better in smartphone world.