Use the optical audio output of the TV to connect to the soundbar.
Yes it would product 5.1 is you set the TV to output 5.1
so would It be best to use the optical connection between sound bar and tv then ? my tv, Samsung un65h6203 only has 2 hdmi connections and 1 optical out. no arc. I also need to connect direct tv dvr and blue ray player up to the soundbar too. what would be the best way to do all of this ? thanks