It’s possible to connect an s/pdif socket to two devices, if the connection is optical you’ll need an s/pdif splitter box, they can be got cheaply from Amazon or Ebay.
One thing to watch is that the sample rate is the same on all connected devices.
Not sure how well this would work though.