TOSLink/Optical output splitting/switching

I already have a TV and AV receiver linked via HDMI as well as TOSLink cable. How can i patch WD TV Live Hub’s optical output go to either TV or to my AV reciever.

Do i need a splitter or a switch? can this be done?

You might be able to use an switch, but I honestly don’t know if this will work.

The WDTV Live Hub has both HDMI and digital out available.  The WDTV Live Hub can be connected to the AVR via HDMI and/or Digital out.  The AVR can then (remain) connected to the TV via HDMI and TOSLink.

The WDTV Live Hub can utilize the HDMI to transport both video and audio streams.

No need for a splitter or switch.

What kind of AV receiver are you using? What kind of TV