Hi, theoretically the "default" (after boot) audio output you can change in the kodi settings (system/audio...). About the Audio Profiles Addon... it's well documented here: https://kodi.wiki/view/Add-on:Audio_Profiles and https://forum.kodi.tv/showthread.php?tid=353852.
First you need to link in the addon settings the "phisical" audio port to an addon "profile" (it's 10 profiles are available). Each profile can be labeled with a name (like the "digital" or "analog"), I'm using as the label "HDMI" for profile 1 linked to the HDMI output (ALSA:Default...hdmi), and "HIFI" linked to the I2S (ALSA:...Hifiberry-DAC). To link... prepair the profiles (add/change name, enable....etc), go to the settings/system/audio, change the output (verify if working - have sound at that output), then go to settings/addons... Audio Profiles, select "Run" and assign one enabled profile to the active sound output. It's not an "plug and play" addon, need some work in the settings, but isn't a "rocket science" to make it to work.
Thanks a lot VLouis for your help. I found the time to do as you described and can report that Audio Profiles in principle appear to perform as intended/describe with one *major* exception:
AudioProfiles are loaded upon LibreElec start (I see notification and certain distinct settings change, eg how i preset volume levels etc). However, the audio output is nevertheless always !!! the Default setting (ALSA HDMI default, top of list); and yes, I changed settings and then saved AudioProfiles, as suggested by you and as described in documentation.
I had a few instances (around 4-5 out of about 30 starts and 15 hot-starts/reboots) where i felt right after AudioProfile notification appeared I heard the white noise on from the RPi's analog audio port, just to instantaneously go silent and upon checkingin system settings, end up in ALSA/default. Hence, I thought maybe the AudioProfiles actions get overturned later in the boot process, but I have no solid data evidence, just this observation.
[Btw i also got myself the UGreen USB-to-jack in/put sound card (from suggestion above) and while it shows up upon start as described above, it does not change anything in regards of AudioProfiles...not that i expected it, just for completeness]
In essence, it doesn't work as intended because the goal was to change audio output automatically depending on the chosen medium to play.
Could someone pls help?
M thx in advance!