If both the TV and the external sound source have a slot for a digital audio cable, it should work. If one of the two only supports coax, it won't.
Compare it with human communication. Sound will work if the sender can speak and the receiver can hear. Light signals will work if the sender has a flashlight and the receiver can see. But if you're not compatible (the receiver of the sound is deaf, the receiver of the flashlight signals is blind) it won't work.
So all I can say: check the specs of both devices.
My 5 year old Phillips flat screen TV says to use a digital audio coaxial cable to connect to an external sound source. Will a digital optical cable work for that?