I bought the Sonos Soundbar, the Sonos Subwoofer, and two Play:3 speakers as surround sound speakers. As others posting reviews here and elsewhere have pointed out, Sonos wants you to use your TV as a hub, with all the inputs from your devices (Apple TV, Cable, etc.) going to the TV and then the optical audio out from the TV to the Playbar. However, most TV's won't pass Dolby Digital (DD) 5.1 surround from HDMI to the digital/optical audio (i.e., the Playbar), so what you get in most cases is stereo with muted simulated surround sound that is NOT surround sound from your surround speakers. After reading numerous reviews and comment boards on many websites, I tried (and was successful) with the following solution:
I purchased a Shin Kin 4x2 Remote Control Digital Optical TOSlink Audio Fiber Optic Selector Switch Switcher Splitter (currently sold on Amazon for approximately $69.95).
I connected each of my devices (I have Apple TV and DirectTV) to the "Optical Input" switches (called Input 1 and Input 2) on the Splitter via a Digital Optical Audio Toslink Cable (i.e., same type of cable that came with your Sonos). This will take care of sound (and you will leave your HDMI cables connected to the TV for purposes of transmitting the video signal from your devices).
I connected the Sonos Soundbar to the output (called the "Output 1") on the Splitter.
Important - Make sure the sound settings on apple TV/your cable box/other devices are set to Dolby Digital (I had to make this change before I was able to get 5.1)
You can confirm that you have properly set things up in Sonos - go to "About My Sonos System" in the "Settings" menu, and if you look at the Playbar detail, it should read "Dolby Digital 5.1" - if it does not (i.e., if it shows "Stereo"), either the show you are watching is not Dolby Digital or you have not connected things properly.
Also - I have a Harmony Logitec remote. I was able to add the switch I to the commands for my remote so I now can switch between channels on the switch using my remote and turn it off and on via my Harmony remote. Someone had posted the manufacturer name and model number in the reviews for the switch I bought but so everyone has all the information in one place to implement this solution, the manufacturer of the switch that I bought on Amazon is Shin Kin and the model is AOS-42TR-B - if you use a different switch you will need to get the manufacturer and model number for your switch and program it in the Harmony settings. You can also add your Sonos Playbar to the devices your Harmony Logitec remote recognizes and control the sound through your Harmony remote.
Now that I have the system set up, it sounds great and the 5.1 sounds awesome for movies/shows/etc. that are in Dolby 5.1.