Looking more into when my TV listens to audio over HDMI versus the RCA jacks:
- Configure X for nvidia driver.
- When I first boot the system, while the system is running in console mode, the TV ignores the audio signal over the RCA jacks. (presumably it's playing audio over the HMDI audio port but there's no way to test at this point)
- As soon at X starts and I see the nVidia logo, the TV starts playing audio signal from the RCA jacks. HDMI audio doesn't work.
- If I stop X (sudo /etc/init.d/gdm stop) the TV continues to play audio form the RCS jacks.
- Configure X for nv driver and boot. No audio over RCA. HMDI audio works after X starts
- Restart X with nvidia driver. As soon as nVidia logo appears, TV starts playing audio over RCA. HDMI audio stops working.
- Stop X. TV still playing audio over RCA
- Reload alsa (alsa reload) and then examine /proc/asound/card0/codec#1, it has returned to the state I thought was supposed to be good:
Amp-Out vals: [0x00 0x00]
Pin-ctls: 0x40: OUT
but the TV is still playing audio from the RCA jacks and HDMI audio still doesn't work. Apparently the TV still remembers the last commanded state - playing audio over RCA. The codec#1 configuration doesn't seem to matter.
I think the solution may be to prevent the nvidia driver from telling the TV to play audio over the RCA jacks. By default the TV should play HDMI audio. I think this can be done using the nVidia UseEDID option in xorg.conf and then providing a custom EDID file for the driver.