No, your conflating two completely separate things. CEC is like a really fancy two way remote control. All communication for CEC happens on one singular wire that is connected on all the devices and there is no other data that is sent or received on this line other than a bunch of control type communication. There is no audio being sent via CEC, there is no communication about protocols or anything else. It is just a bunch of this is who I am, can I take this identification, can everybody switch to me please, etc. It is just like a smart remote control pushing the buttons for you.
It does. Anything that isn’t set as a passthrough format get decoded to LPCM. Kodi’s internal volume control affects any of this audio.
If you enable DD and transcode and have channels set to 2.0 (I’m pretty sure I’m repeating myself here) and you play a mp3 file then that file get decompressed at which point any of Kodi’s normal processing happens and then that modified audio then gets recompressed into an AC3 file that gets sent out.
It really seems like you have this idea that the whole process is more complicated than it really is. It is really not much different than the optical connection than your already familiar with. With toslink you have two uncompressed channels of audio that have the ability to transmit up to a certain data rate. You can encode compressed multichannel audio into these channels and send them along which is what regular AC3 and DTS is. With HDMI it is still basically the same thing, but with newer versions you have a lot more channels of audio and more bandwidth, but it is still the same thing. You still can only send the uncompressed audio or compressed formats that have been encoded onto that signal which still is (outside of niche) just DTS and Dolby formats.