How to connect samsung ps-cx40 digital sound to samsung smart tv

Solution
Seeing as how the ps-cx40 is the center channel 3ohm speaker I don't think you will be since you apparently don't have the rest of the ht-x40 system.
Your speaker needs to be amplified so none of your devices will do that. You can connect your devices to an integrated amplifier or receiver with a mono switch. An old used one would make sense. Or you could use one of these:
http://www.parts-express.com/dayton-audio-dta-1-class-t-digital-ac-dc-mini-amplifier-15-wpc--300-380
to power the speaker. If you don't have analog audio out from the TV you would need one of these too:
http://www.parts-express.com/digital-to-analog-converter-%2851-compatible%29--180-999
This would only give you left OR right since you only have one speaker.