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.
/etc/modprobe.d/hda-jack-retask.conf contains:
# 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:
/lib/firmware/hda-jack-retask.fw
[codec]
0x10ec0892 0x1458a002 2
[pincfg]
0x11 0x99430130
0x12 0x4037c540
0x14 0x01014010
0x15 0x01011012
0x16 0x01016011
0x17 0x411111f0
0x18 0x01a19050
0x19 0x02a19060
0x1a 0x0181305f
0x1b 0x43f1413f
0x1c 0x411111f0
0x1d 0x4045e601
0x1e 0x01452140
0x1f 0x411111f0
[hints]
jack_detect=no
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"