Long story short:
MI Box S (S/PDIF setting) <HDMI> Samsung TV <HDMI/ARC> Samsung Home Theatre > Dolby Digital working
CCwATV HD (no matter what setting) <HDMI> Samsung TV <HDMI/ARC> Samsung Home Theatre > Dolby Digital not working
Short story long:
I know, there have been quite a few postings about this topic, but i wanna share my experience and disappointment here too!
After all the mess with Google audio devices, speaker groups and multi room casting lately i wanted to give Google another chance by lifting my Android TV experience with the "latest and greatest" CCwADT, choosing the HD version, as my setup (Samsung TV + Samsung Home Theatre linked via HDMI/ARC) was one of the better ones back in the HD days and so it should fit quite perfectly and raise it's software capabilities into 2022! It didn't take too long after setting up everything and doing the usual update routines, that i got grounded hardly once more... no Dolby Digital sound at all, using the usual suspects (e.g. Netflix, Prime, Youtube) and no matter if connected to TV (trying passthrough or whatever via HDMI/ARC) or to home theatre directly using HDMI.
Also trying every single sound setting in Android 12 didn't fix anything. Setting ouput to Dolby Digital+ at least managed to get 5.1 option in Netflix / Prime but didn't play anything at all - i know, those apps only output Dolby Digital+ and so my setup doesn't seem to decode the streams... but here comes the big BUT!
Same setup, same connections but Mi Box S with Android 9 sends the expected stream to my setup and everything works as promised! So i did cross check.
When using custom sound output settings, nothing works in Dolby Digital - no matter if Mi Box S (Android 9) or CCwADT HD (Android 12), but when setting Mi Box S (Android 9) sound output to S/PDIF my tv recognises Dolby Digital stream and passes it on to home theatre! Besides i'm not using optical out but HDMI/ARC, i'm wondering what kind of stream (bitstream? dolby digital? dolby digital+?) is forwarded to tv / home theatre? At least this setup is capable of perfect Dolby Digital audio! I also know Mi Box S has optical out (S/PDIF), maybe that's why this setting exists in Android 9 at all?
CCwADTV HD doesn't have optical out and the option (setting output to S/PDIF) is missing (not sure it's cause is missing S/PDIF or if Android 12 doesn't have this option at all).
Google get your things together and add Dolby Digital support for older higher class HD devices to your "high class" HD device. That it's possible and not related or limited by my setup i clearly cross checked now and it's really embarassing that a 4 year old Android 9 device outperforms your latest streaming experience when it comes to surround sound! :(
I didn't read the whole post but the CCWGTV doesn't have the DD+ to DD conversion because the Amlogic SoC inside won't allow it but if your TV was built after 2017 it should have DD+ decoding by HDMI otherwise you're doomed.
The Mi Box and other Android TV boxes with an optical port and Android 9 are able to convert DD+ to DD when selecting the SPDIF option in audio settings but I think the conversion is gone in Android 10 and beyond.