Thanks for the patch alex.
I appear to have a slightly different chip than most other MBP 5.2 owners but your mb5 model works quite well. Except for the background noise on the headphones, which some other guy also complained about earlier. In Windows the PINs are totally different from the alsa configuration and there is no noise. I tried to replicate this configuration in alsa but got no sound at all. Surround/LFE/Center are also dead.
Anyways, when pushing this upstream maybe you can also merge the attached patch to recognise my chip.
Its from a 17" MBP from about July 2009.