@mitu So sorry for the delay...busy week and didn't have much time to play. Just tried my ps3 controller and yep, you're right it's simply the controller itself.
The audio crackling is caused by the audio resample method in the mupen64plus.cfg. This issue was fixed a while ago but looks like it is broken in latest Dev builds of retropie. There is a pull request that should fix this issue it just hasn't been merged yet.