Here's my take on this (from personal experience)...
I have an HTC One M7 that the TOP speaker (the one used for phone calls) sounds "blown"... but most likely isn't... read on...
The reason it's usually the TOP speaker that buzzes is that it's the one at the bottom of my pocket when I carry it there (as most of us do). This puts that speaker right where most of the "gunk" sits in my pockets... and therefore that speaker is far more prone to gathering the loose stuff through its speaker grill. Since the speakers use very strong magnets (in order to produce loud sounds), they attract any tiny bits & pieces of ferrous metal... which get stuck to the speaker diaphram, and buzzes. (mine was so bad that I could not understand people at ALL when receiving phone calls... and gave up long ago on listening to music through the internal speakers)
Here's what I did, and it seems to have worked...
1) Download an Audio Signal Generator app - I use "Audio Test Tone Generator". It allows you to output a pure tone through your speakers to determine if this is helping.
2) You need a VERY strong magnet, I use N48 neodymium cylinder 1/2" x 1/2". It needs to be stronger than the speaker magnet. A good size Hard Drive magnet may work well too!
Make sure your magnet is CLEAN... wipe it with a clean cloth, then use an old toothbrush to quickly brush away any remaining 'bits & pieces' it may have on it. GET IT CLEAN!!! ...or else you risk making the problem worse.
Then we need some way to get those pieces on the speaker jumping around, so our magnet can grab them away!
Set the Audio generator to a sine wave, so you don't damage the speakers. I use around 315Hz frequency, as seems to work well at resonating the speaker enough to get plenty of action (buzzing).
Bring your magnet near the speaker, and determine which end of it is in "attraction mode", so it feels like it's pulling towards the speaker (which is right in the center of the speaker grill). It MUST be in attraction, not repulsion.
Turn the volume all the way up, flip the phone face-down, and tap your strong magnet against the grill several times. (Note: it may scratch your paint, but if you use a chrome plated neo magnet, it shouldn't hurt it.)
After you tap the magnet against the speaker gill area a few times, pull it away and closely inspect the face of the magnet... the first time I did this, I was SHOCKED at how much crud came out!
Clean that magnet well, do it again a few times... but be sure to get it CLEAN... otherwise the gunk may go right back in... and you also stand a risk of scratching the phone.
I even stuck the magnet to the speaker area, (phone face down!), and tapped the phone face (near the speaker) with a fairly heavy blunt plastic object... a fairly large screwdriver (plastic) handle. This tends to help shake loose the larger pieces, and help vibrate them through those tiny holes. Pull the magnet away again, see if you got more. (I did)
Although my bottom speaker had been sounding fine, I got lots of gunk out of it as well.
When I got finished, my top speaker now sounds as clean and pure as my bottom speaker. YMMV, but I'm excited about how well it worked!