So as far as I can tell, your modifications aren't doing anything new beyond the latest version of the patch from my repository. Back up what you've done, start from a clean pull of ALSA, and try again with the patch mentioned in the wiki.
After all this patches I think I used the wrong one, I saw in your patch the codec 0x10de000a is already there.
EDIT: I now used your patch and sound works
but dmesg showed this error messages:
HDA Intel 0000:01:00.1: PCI INT A -> GSI 16 (level, low) -> IRQ 16
HDA Intel 0000:01:00.1: setting latency timer to 64
ALSA hda_intel.c:1971: Invalid PCM device number 8
hda_codec: cannot attach PCM stream 8 for codec #2
ALSA hda_intel.c:1971: Invalid PCM device number 9
hda_codec: cannot attach PCM stream 9 for codec #3
I think I could ignore them?