My issue is jacksense on the front port switching to "headphones" constantly (even when front panel header is not connected) and a faulty MSI motherboard they refused me RMA on. Even when jack sense is disabled in config by commenting it out in default.pa. A terrible work around was to use the front panel and just get constant crackling. I tried all the work-arounds listed here and everywhere in google.
I tried hdajackretask which did not work on Debian Stretch, However all it needed was /lib/firmware to be created. When thats done the boot override install script it creates under /tmp correctly copies the .fw file there.
# This file was added by the program 'hda-jack-retask'.
# If you want to revert the changes made by this program, you can simply erase this file and reboot your computer.
options snd-hda-intel patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw
(which expects the file under /lib/firmware, )
I'm not sure if other options snd-hda-intel overrides it or interferes so try disabling those if it fails.
My firmware file looks like this, not sure if I could of just used the [hint] stanza as I'm just happy to nuke the thing:
0x10ec0892 0x1458a002 2
I cant upvote those answers or comment on them, If your reading this and you tried every other listed solution as I have, Try to retask jack to "not connected". On my hdajackretask it was called "Green headphone Front Side"