Audio Compression

Understand 5.1 / 7.1 Surround Sound with a HTPC and KODI

It can be a bit confusing when it is the time to install your 5.1 / 7.1 surround system with your HTPC. First, you need to know what cable will you or can you install with your system. Does your HTPC has an HDMI output? Does it have a Coaxial/Optical audio output? If so, do you have an AV receiver and if yes what does it handle? What compression can you use? There is some basic to understand before jumping and buying the stuff you want for the need you have. With this guide, you will have all the knowledge to install a complete HTPC system with an impressive 5.1 / 7.1 surround sound. Let’s start by understanding the 3 main different cable types.


HDMI / DIGITAL COAXIAL / OPTICAL: The Difference:

HDMI

HDMI

Digital Coaxial Cable

Digital Coaxial Cable

Digital Optical Cable

Digital Optical Cable

Digital Coaxial and Digital Optical (S/PDIF)

First of all, Digital Coaxial and Digital Optical cables have both same ways to transfer data digitally. The only difference is how the data is transfer inside the cable. The optical is via a red blinking light and the Coaxial is using electrical transmission. They both transfer the data via an interface called S/PDIF (Sony/Philips Digital Interface Format). S/PDIF is limited to 2 PCM Channel. It means that it is basically stereo (it can carry only two speakers audio channels uncompressed). In order to have a full 5.1 surround system with these cables: you will have to use compressions known as Dolby Digital, DTS and os on. See below for more details about compressions.

HDMI

Next you will usually read that HDMI is the way to go if you can. Unlike S/PDIF, HDMI is capable of sending more than 2 channels via the cable. It means that you can send directly 6 channels without compressing them within the transfer. Meanwhile, if you need to, you can always use good old Dolby, DTS, etc. HDMI is the most powerful of all, because it can transfer audio and video at higher bandwidth speed.

Notice that HDMI has more than one version. You can find HDMI 1.2, 1.3, 1.4 and now 2.0. The newer the version, the more powerful it is in bandwidth speed. The HDMI cable should make no difference in speed. It is the input/output plug that matter in term of speed. If your output and input plugs are using HDMI 2.0, any good old cable should usually work (as they say).

HDMI Version Chart

HDMI Version Chart

So let say you want to have a full 4K system at 60fps with 5.1 or 7.1 Surround System all in 3D you will have to wait for HDMI 2.0. Be careful,  the connectors on your HTPC and your AV Receiver will also need to support your HDMI version.

In conclusion, if your HTPC, your AV Receiver or TV support HDMI, go with it, otherwise go with S/PDIF it is not much of a big deal.


PCM VERSUS BITSTREAM:

Basically PCM means Uncompressed and Bitstream means Compressed. You will then understand that it is not possible to have a full PCM transfer for 5.1 or 7.1 surround system with an S/PDIF connections.

With an HDMI cable, it is possible to transfer up to 8 channels without any compression, but you will have to be sure your HTPC support it and the receiver too. Otherwise, you will have to send the signal via a lossless compression like AC3 (Dolby digital), DTS and so on. In the case, you will need to check what your receiver is able to decode. Some receiver will decode only AC3 and other only DTS and most of the time both.

Dolby Digital / DTS / DTS-HD, etc:

You have probably already heard of Dolby Digital (a.k.a. AC3) or DTS compressions. These are two algorithms to compress the sound within the transfer of data via weaker cables (i.e.: S/PDIF data transfer). Those compressions allow us to transfer full 6 or 8 channels of audio into a cable that can transfer only 2 channels. First your audio will be encoded. The data will then go through 2 channels cable. At the end, the signal will be uncompressed into 6 (5.1) or 8 (7.1) channels. There are some slight differences between each conversion in term of quality sounds. If you decoder can take it and the cable support if you can use a higher compressor like DTS HD or Dolby Digital PLUS, etc.

Audio Compression

dtsmacomparisonstats

KODI SURROUND SOUND SETTINGS AND WHY:

  1. Kodi 5.1/7.1  surround sound  with HDMI Setup

    -> If you are HDMI all the way to the AV Receiver
    i.e.: Direct HDMI from HTPC to AV receiver

    Since we have access to 8 PCM channels with HDMI. We can tell Kodi to output audio into these number of channels. If you have a 5.1 surround sound system, just put the number 5.1, and 7.1 if you have 7.1 surround system, etc.
    hdmi-output

    1. PCM – HDMI

      For the compression settings, it all depends on the receiver capable compressions specifications. If you A/V receiver support full PCM 5.1 /7.1 Go with it.
      To do so use theses settings:

      compression-HDMI-PCM

    2. AC3 / DTS HDMI

      If your AV Receiver or TV does not support PCM channels with HDMI, we can force Kodi to use any compressions. It can also convert to AC3 Dolby Digital if the format is not supported i.e.:
      compression-HDMI-PCM

  2. Kodi 5.1/7.1  surround sound  with S/PDIF Setup

    -> S/PDIF connector somewhere between the HTPC and the speakers. (Even if one HDMI is plugged somewhere)
    i.e.: your HTPC is plug via HDMI to the TV and TV output a digital optical audio cable to the AV Receiver.

    S/PDIF connector only allow 2 PCM Channels, so to travel 6 or 8 channels of sound via this transfer method, we need to tell Kodi how to do it and here is how:

    spdif-output

    For the compression settings, it all depends on the receiver enabled compressions. If you A/V support only Dolby Digital, just check Dolby Digital. Also, you can use the Kodi Dolby Digital transcoder to transcode any other audios signals into AC3 Dolby Digital.
    To do so use theses settings:
    compression-SPDIF