1. Connect the Bluray and Cable box to the inputs of the HDMI switcher. Cable to input 1, bluray to input 2
2. Feed the HDMI output of the switcher to the soundbar HDMI input.
3. Connect the HDMI output of the soundbar to the TV.
The HDMI switcher will automatically go to the Cable box except when the Bluray is turned on.
You will need to use two remotes for cable and three for bluray unless you get a universal programmable remote. A Logitech Harmony remote might work for you.