I've been running Ubuntu 18.10 on my media center since January. It's been working fine until recently where it keeps changing the audio device from the Optical/SPDIF Output (to my sound bar) to the HDMI audio from the onboard graphics. I have no idea why, and changing it back within the settings menu works fine.
I've tried using pavucontrol to force using the correct audio device, and it seemed to work for a couple hours. But it switched back again.
I'm completely at a loss, I haven't had this happen before. Any help would be appreciated.