Analysis of the RT5640 part of things:
>diff -Nur playback-notworking2/tegra-rt5640/rt5640.4-001c/codec_reg playback-working2/tegra-rt5640/rt5640.4-001c/codec_reg
>--- playback-notworking2/tegra-rt5640/rt5640.4-001c/codec_reg 2012-11-07 16:59:10.000000000 +0100
>+++ playback-working2/tegra-rt5640/rt5640.4-001c/codec_reg 2012-11-07 17:02:23.000000000 +0100
>@@ -64,9 +64,9 @@
These two registers seem to be involved with headphone plug-unplug. But we have no sound from speaker either, so...?
This register is never set in code, nor is its individual bits documented.
"The DSP can be controlled through DSP command format (0xfc), addr (0xc4), data (0xc5) and cmd (0xc6) register.". As far as I know, we don't use the DSP. But I might be wrong.
Despite its name, this register seems also related to the DSP.