Can't you just send audio and if the thing that's on the other end of the HDMI cable ignores it or there is nothing connected then so be it?
Honest answer: I'm just not sure.
In an ideal specification there would be a set of base capabilities / channels / sample rates that all devices are required to support.
If such a definition exists for HDAudio over HDMI then I have missed it somehow (quite possible)
Since "HDAudio over HDMI" _IS_ by definition HDAudio, perhaps the last detail does not matter.
When adding support for "optical audio out" to a working X1000 audio driver, I bought a simple optical to analog adapter to test my work.
It had a much narrower list of available sample rates, which complicated the options GUI, since AHI never considered that changing option
"A" might affect the choices available in options "B".
After release, the optical out was found to fail with certain devices that assume certain levels of compression would be required, and that was just another "gotcha" I had not considered.
Dolby is another issue there, I assume it requires some sort of licensing.
So making the driver smarter.. I started by something fool-proof. On startup, search for all available outputs. On my X1000 it responded with the (static) list I expected. On Radeon it failed.
But now I am back to the beginning of the topic.

Nothing is insurmountable. But every advance in technology takes us further from the simpler PCI based sound cards of the past, which AHI was tailored around.