Most sets output analog at a fixed and very high volume level. Why? To avoid noise from outside sources.
Optical being immune from this doesn't have to do this so the volume is set by the receiver or sound bar.
I too see no attempt to normalize the two sources. So when you switch my bet is one or the other won't match in amplitude.
First off, I am new to using digital optical audio (DOA) cables. I have a client who has a Samsung UN75JU6500 HDTV, connected to an Insignia NS-SB314 sound bar, via a 3.5 mm stereo cable, via HDTV's audio out port, and two external devices (DirecTV receiver & Samsung Blu-Ray player). Everything works very well (including Smart TV apps) and the sound from the Insignia sound bar is quite good. Recently, the client asked about getting that slightly better sound, via a digital optical audio cable; so, we purchased one. I hooked it up, leaving the 3.5 mm analog stereo cable hooked up, temporarily, until I could confirm the DOA cable works, perfectly. Well, the 3.5 mm cable still sounds great, but, the digital optical audio cable's volume output is quite low. I would appreciate anyone's thoughts and would like to get others' opinions on why this may be happening.
I have changed the HDTV's audio IN and OUT settings to match what Insignia requires, namely all external devices outputting audio, via PCM; so, everything is expecting and using PCM, not Bitstream. Again, everything and all devices sound very good (via the 3.5 mm analog cable), as before, with both the DOA and the 3.5 mm analog cable connected to the Insignia sound bar. Before I start unplugging cables that have worked well for a few years, I wanted to ask others what they know and what their thoughts may be on why the digital optical audio cable is outputting low-volume audio, when the 3.5 mm analog stereo cable is still outputting great audio.
While I cannot find specific information, via Samsung, that says one should not connect both the 3.5 mm analog audio out port and the digital optical audio out port to the same sound bar, simultaneously, I am speculating that perhaps the two audio out ports share some underlying hardware on the HDTV and having both connected may be pulling the digital optical audio port/cable's output down. Again, I am hesitant to "mess" with hardware that has been working well and still is, but, the client is interested in making the sound that much better. Which brings me to another question...just how much better can we expect the digital optical audio port to deliver, verses the 3.5 mm analog stereo port? I'm sure it's "better," but, how much "better" is "better?" I am curious to know how others have experienced the difference between the two ports. And, if there are any Samsung techs around, should I only have one audio cable connected, at a time? Of course, I would welcome others' experiences with these cables, since, as I stated, I am new to digital optical audio (DOA) cables.
I look forward to hearing from others; thank you for any assistance you may be able to provide.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic