I had a similar issue, solved by doing what others are saying (set digital audio output to PCM) and then setting the output as TV speakers instead of the digital output itself. I then unplugged the cable and plugged it back in. Suddenly I could hear both from the TV and the speakers. When I switched it to just optical out it only came through the speakers.
I think it may have to do with the fact that I plugged the Toslink cable into the TV while it was still configured for Dolby and bitstream. Replugging it in with PCM set as output caused it to work exactly how I wanted it to!
I have a UN65JU7500. The audio out has been spotty for 2 years now since purchasing this. And not just on apps but on HDMI inputs like PS4 pro or AppleTV.
Now as as of three weeks ago, only TV Speaker works. HDMI arc disappeared so receiver no longer available. Even though set properly. Even reset the soundbar and the TV and had Samsung support reset it remotely. They also gave me access to a new firmware build to manually install. All to no avail. I even went out and bought an optical cable. Red light on showing its active. But still no sound on soundbar. Selecting optical now doesn’t resolve anything. Only tv speakers work. And I’ve confirmed that the bar works just fine with another non Samsung tv I have using optical.
This Pcm solution doesn’t work for me. Sound reset also a no. Doesn’t recognize Anynet devices. I can only conclude that there’s some issue with the OneConnect box