Question do not know how to connect

Feb 14, 2021
1
0
10
TV older: (3) HDMI, AV connection, YPbPr component connection
Dish hopper: hdmi, optical, red-white-yellow connection
Lg sound bar: optical in, portable in, hdmi in, hdmi out (tv arc), usb
Blu-ray: hdmi
Apple TV (3rd gen): hdmi, optical audio port, Ethernet port
Chrome cast: hdmi

How do I connect all above where:
  1. I don’t lose audio from sound bar when using other devices (not using original tv remote volume)?
  2. Press any of remotes(Blu-ray or apple) ...the tv will change to source?
also have hdmi switch (to give extra hdmi ports)

any help would be appreciated.

thanks
not-tech savy