One BIG problem with HDMI Interfaces is that the Destination Device (i.e. the HDTV) must REQUEST/Negotiate which type of Audio (& Video) it will accept from the SOURCE Device (i.e. your Cable Box). Since HDTV's only have 2 built-in Speakers, it will invariably request STEREO. So if you connect HDTV Optical OUT to AVR, you will only hear STEREO.
Since the HDMI SOURCE can only Output STEREO or DD5.1, we need to FOOL it into outputting DD5.1 to Optical, while providing STEREO to the HDTV. Although I have never had the need to try it, this apparently can be done with the fol. HDMI Optical Extractor):