Hi,
If it does work fine with a headphone that could mean that the built in speaker is causing the clicking sound. Do check for any update for the sound driver or a BIOS update that may help. Since you've already tried uninstalling/reinstalling the Sound driver which didn't worked, I would suggest reinstalling Windows itself. If reinstalling Windows will result to the same problem, that could mean it's the built in speaker that is faulty already.