HDMI is pretty much the standard these days for connections to a receiver. Optical only handles compressed 5.1 audio and is more of a legacy connection. Most modern receivers are going to have several HDMI inputs and all you have to do is plug your box into one and have your HDMI output from the receiver going to the TV. If you don't want to always have the receiver on for audio usually there is a pass-thru setting where the receiver will just pass your audio and video stream straight to the TV and you can use the speakers off the TV.
On the box itself you want to hit the Xfinity button then go over to the gear symbol to get into the settings menu. Under devices settings, then audio you will want to set the output to expert to let the receiver handle the audio.
Actually I am interested in only putting the audio through the A/V (Yamaha) just for the sound on cetrain things I watch (movies). I was wondering if I could use the audio out from theTV Box into the receiver and just choose that imput on the receiver when I want. I am currently doing that with my Blu-ray DVD connection. (There are several audio only inputs on the Yamaha including optical and digital). I find the HDMI overrated and somewhat annoying at times ..but I am "of that age".
Not to mention I also have an Onkyou really old unit which still works ... I won't mention what I have it connected to!