Back to HP for warranty. Of just pack and return as HP seems to drop the ball on such issues. I have personal experience here and my last HP was my last HP.
Problem:
My HP laptop's audio crackles/pops through HDMI output only when it is plugged into the AC
adapter. Audio must be playing to hear the crackling. If sound is not being output there is no
crackling. Audio through the in-built speakers and headphone jack are clear from the crackling,
It is not a static sound, it is a crackling and popping sound. As CPU usage/power draw
increases so does the frequency of the crackling and popping.
Failed fixes:
-Updating all audio related drivers and tried older versions
-Reinstalled the OS and set the computer completely back to factory settings. With no additional apps installed and no updates the problem still existed
-Sent it in to HP to get repaired and received a new motherboard and AC adapter
-Tried different apps, anything outputting audio crackles
-Tried different HDMI cables
-Tried different TV's
-Tried different wall outlets.
-Tried all possible audio formats
-Tried changing power plan
Interesting note:
When outputting 5.1 audio to a Yamaha receiver the audio does not crackle or pop. Instead it
completely drops out for a second or two. When I change the PC audio output to Stereo the
drop outs cease and I get the familiar crackling and popping. I have no idea why this occurs.
My TVs only crackle and pop when connected to my laptop.
Please help, I would appreciate any thoughts or ideas that I can test thank you for any help.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic