The first set appears to have NO OPTICAL or MiniJack so no to that model.
http://translate.google.com/translate?hl=en&sl=es&u=http://www.samsung.com/cl/consumer/tv-audio-video/television/led-tv/UN40FH5005GXZS&prev=search
http://translate.google.com/translate?hl=en&sl=es&u=http://www.samsung.com/cl/consumer/tv-audio-video/television/led-tv/UN40FH6203GXZS&prev=search shows a minijack so that should be fine.
HOWEVER some folk want both the speakers and the headset to work at the same time. NO to that.
Some folk want the headset volume to be controlled with the remote. NO to that as well.
Hope this helps,
Bob

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic