Switch audio sources (receiver like)

I have a Cubox-i connected to a TV and an analog 2.1 speaker system. Currently, the TV’s analog audio output (for headphones) is being used to output audio to the speakerset.

I would like to install Pi Musicbox on my old Raspberry B and connect a https://www.hifiberry.com/hbdigi to it only to act as a “switch” and connect the Cubox-i and tv seperately and directly to it (no need to turn the tv on to listen to music) and to be able to stream music locally stored on my phone/laptop or use spotify:

Main goal, be able to easily switch between TV and Cubox-i and wireless (=phone):

  • tv --> analog input on Hifiberry or Wolfson addon for RPi
  • Cubox-i --> optical input on Hifiberry or Wolfson addon for RPi.
  • smartphone (via wifi (dlna) or Bluetooth) --> RPi (with BT dongle)

Would this be possible with MusicBox? The main goal is to have this switch like feature. All of MusicBox features would be a welcome addition. I know MusicBox cannot act as a “Bluetooth speaker/receiver” yet.

Perhaps I am misunderstanding your plan, but it reads like you intend to connect your TV headphone output to an analog Hifiberry input and your Cubox (PC?) digital output to an optical Hifiberry input. The hifiberry products do not have these inputs, they have analog and digital outputs. The only input to the hifiberry card is from the raspberry pi itself via the p1 and p5 headers.