you should check if your tv and receiver both support 5.1 over optical. in the case of many cheaper products they might only support 2.0.
besides optical, if your tv supports hdmi(ARC) and your home theater does as well this is another option for getting 5.1
if you bought a home theater in a box set (htib) you are often far more limited on what you can get 5.1 from. some only support 5.1 from the included dvd/br player and stereo from all other sources while others only have one or two connections and support 5.1 from other sources. it can be hit or miss on what models include proper connectivity.