Perhaps see this thread..
I personally prefer to use Bitstream, rather then LPCM (gen-2 Beam/eARC only), but that’s a matter for yourself.
The version of Dolby will depend on whether it’s a Beam (gen1) or (gen2). The earlier version supports upto DD5.1 (compressed audio) and the newer Beam supports upto Dolby TrueHD (uncompressed) over an eARC connection. All versions support DTS (not DTS-HQ, and not DTS-X).
Check your TV can pass-through the selected codecs through its ports too. Most modern TV’s have a ‘pass-through’ option on their HDMI/Arc/eARC ports and I would select that. If not, then try ‘Auto’ for the TV sound-out (that’s usually the default option), to begin with.