If we are talking about sound out of the TV, it will be 2 channel PCM for connected sources such as blu-ray, cable or satellite boxes via either connection. For output from the TV tuner, it will be whatever is broadcast, 2-ch or 5-ch. Potential for extra information from the TV as a source. If connecting directly from the source, the output to the soundbar will be whatever the source is passing up to 5.1 for optical and up to 7.1 for HDMI. Therefore, there is a potential for more information being passed to the soundbar via HDMI directly from a source such as a blu-ray player or cable/satellite tuner.
Whether any of this is audible on a 2-channel device, I am not sure.
Also, to take advantage of the additional information, you must make sure that your playback device is set to bit-stream. By default, every blu-ray player I have assisted with comes from the factory set for PCM. This includes new units from Panasonic and Sony in the past three weeks.
Previously, I used a 4.1 channel sound bar from JVC and connected all devices directly to the sound bar and yes, a very audible difference as compared to 2-channel sound.
Hope I got all of this right and understandable.