Thank you @MaLd0n, but I've already done that. Tried every single layout (and cleared NVRAM in the process for some of them). I can see the changes, but each layout doesn't match my motherboard audio setup (3 jacks on rear: pink, green, blue). I can get only two to work.
I see that the guide you've wrote is very easy to understand. Thank you for it! Isn't there any guide on patching audio (AppleALC)?