Selecting only 1 audio output

I’ve got a little noob problem/question. I’ve searched but for the life of me I can’t find a solution (or can’t understand it….).

I’ve got a tv top box with libreelec and kodi on it. It connected with a HDMI cable to the TV and I’ve got it connected to the aux in from my surround system (audio jack). It works fine but the system plays the audio on both devices wich creates an echo.
Is there a way to select the audio output to only my surround system? I’ve tried all the options but either there is no sound or ut’s on both devices…