The diagram below shows a basic setup of a media device/soundbar audio distributed over <300m CAT5e/6 using a Matchmaster digital audio extender receiver and transmitter.
Setup is useful for transmitting digital sound beyond the Toslink limit of ~20m. An excellent alternative if the prewire did not include the ARC (Audio Return Channel). Both coaxial or Toslink outputs become active with either coaxial or Toslink input you choose.
Suggested links for products in the diagram: