Here's another solution to fix Samsung X510 buzzer and earpiece speaker problems. The solution below provides the connection line paths of the speaker.
You may first check and or try to replace the speaker, then trace the connection line paths as shown on the solution below.
If the said connection is open or cut, just check the highlighted components, and then managed to apply a jumper wire on it. You may first check and or try to replace the speaker, then trace the connection line paths as shown on the solution below.