Audio Issues

I have been running Ubuntu for a couple of years, starting with 14, I think. I was running Ubuntu 14.04, and I recently upgraded to Ubuntu 16.04 and installed the Krypton beta. Ever since then, I have been having weird audio problems. TV and movie playback is fine, but if I navigate within Kodi for more than 10 seconds before playing a video, then there is no audio until I power my TV off and on, or switch inputs and switch back. Then it’s fine. Sometimes I hear the clicks when navigating, but it cuts out a lot and is mostly silent.

Music cuts out constantly (not buffering or stuttering, just cutting out and back in) regardless of format. The same happens with streaming video like YouTube. I have a Roku on another input and it never has audio issues. Same with my PS4 and also normal OTA TV. No problems.

What I want to know is: how can I diagnose the problem? Kodi logs look OK.

Here’s my setup:
Homemade HTPC
ASRock H77M
Core i3 3225
No video card, just the onboard HD4000 graphics
HDMI is connected to Vizio M60-C3 TV
Optical connection from TV to Vizio soundbar as passthrough

As for software, I set it up exactly like the pinned VAAPI thread, since I’m using Intel graphics. No issues with setup other than the audio problems.

As a side note, Kodi is now really dark, both the UI and videos. Even messing with the TV settings I can’t get any details out of really dark areas of a scene, just really light dark blobs. This is a secondary concern to the audio problems, though.