Correct audio settings

I´m running KODI on a Nvidia Shield. Recently I changed my audio setup, by purchasing a Monitor Audio ASB-2 soundbar.

The Monitor Audio soundbar only has HDMI 1.4a so I´m running optical:

Nvidia Shield -> HDMI -> Panasonic CX725 -> Optical -> Monitor Audio ASB-2

Audio generally confuses me and I have no idea how the audio signal behaves/changes through my system. So I´m completely lost as to the correct settings.

If anyone could guide me through the most important settings I would greatly appreciate it.