When HDMI connections are made, there is a handshaking procedure that involves the exchange of EDIDs in which each device identifies itself and its capabilities. It is used for many things like copy-protection but also to insure that the video and audio formats are acceptable to the receiver. That includes the number of channels. As an example, if you connect a player that can output DSD (from an SACD) to a receiver or processor that cannot decode DSD, the player will decode it and send as PCM. Pretty neat.
Kal