If you're watching something with Dolby Digital, by selecting RAW, that will need to be decoded by whatever is on the other end of the SPDIF cable; in this the sound bar. The sound bar can take DD coming in, so selecting RAW shouldn't be a problem.
For PCM (pulse code modulation), any DD audio will be decoded internally and then sent out as stereo PCM. This would need to be selected if the device connected has no DD decoding of it's own. Maybe a TV, for eg. Some don't have DD decoding, so will require a PCM signal.
As for stopping the sound coming from HDMI. Unless there is a setting in the TV options that will stop audio coming in fro HDMI, then it will need to be a setting in the Android box options.