Ratman, thanks for your help. I was thinking about the same thing, testing what happens with OTA. But my concern is that when I scan OTA channels, my settings (deleted channels, channel names, etc.) will be cleared and I have to reprogram everything when I switch back to cable. But again, this is probably the best way to determine the cause of the problem.
I noticed that for specifications of some other Sony TV's e.g., W5100, Z5199, Sony explicitly state that "Connects to the optical audio input of digital audio equipment that is PCM/Dolby Digital compatible." and also 5.1-channel audio out. These are not stated for my TV.
I saw 5.1 channels on my receiver when I connect my blu-ray player to TV and pass the audio to the receiver through optical cord, but I do not recall whether it was Dolby Digital (this may be a stupid sentence). I don't know whether you can have 5.1 channels without Dolby digital. I'll check it this evening whether the Dolby sign was also on.
Given that specifications for other Sony TV models explicitly state 5.1-channel audio out, but my TV's specifications don't makes me suspicious that the problem might be the TV.
Only if there's somebody who has Time Warner cable without the box and getting 5.1-channel audio out, then I know for sure the problem is the TV
Or only if there's somebody who has the same TV but getting 5.1-channel audio over the air, then I know the problem is Time Warner.