Introduction: Create a Video Player With Dolby Digital/DTS Output

You have an older home theater receiver with an S/PDIF input (optical or RCA) and want to play movies with DTS or Dolby Digital soundtracks? This guide shows how you can get 5.1 sound output from a Raspberry Pi even if your AV receiver does not feature an DTS/AC3 capable HDMI input.

Step 1: What You Need

  • A home theater receiver or amplifier with an SPDIF input.
  • A Raspberry Pi 2 including a power supply
  • A HiFiBerry Digi+ add-on card
  • optional: enclosure

Note that you can also use an older Raspberry Pi 1. The GUI performance is not as good as on the RPI2, but it might be ok for many people. However module configuration for the Raspberry Pi 1 is a bit different as the current version of OpenElec for the Raspberry Pi 1 does not support device tree overlays.

Step 2: Connect the Hardware

First you need to put the HiFiBerry Digi board onto the Raspberry Pi. This is easy, no soldering is needed. Then connect the optical or electrical output to the SPDIF input of your home theater system.

Step 3: Download and Install OpenElec

Download and install the latest version of OpenElec from the OpenElec web site. Note that there are different versions for the Raspberry Pi 1 and 2. You need to download the Raspberry Pi 2 version!

Step 4: Configure the HiFiBerry Drivers

Firs you need to activate the drivers for the HiFiBerry Digi+ sound card.

Login to your OpenElec system using ssh
On first boot you should enable SSH, otherwise you can still do it later in the OpenElec settings. Find the IP address in

ssh -l root 192.168.x.x

Default password is openelec.

Make /flash writable

Type the following command:

mount -o remount,rw /flash

Edit config.txt

Use your favourite editor (nano and vi should be available) and add the lines

dtoverlay=hifiberry-digi<br>dtdebug=1

to /flash/config.txt. If you do not want to use an editor, you can also use the following code:

cat <<EOT >>/flash/config.txt<br>dtoverlay=hifiberry-digi<br>dtdebug=1
EOT

Alternatively you can also edit the config.txt file directly on your PC or Mac with an editor of your choice.

Reboot and check driver

If you login after the reboot, the HiFiBerry Digi+ should be listed as a sound card:

<p># aplay -l<br>**** List of PLAYBACK Hardware Devices ****<br>card 0: sndrpihifiberry [snd_rpi_hifiberry_digi], device 0: HifiBerry Digi HiFi wm8804-spdif-0 []<br>  Subdevices: 1/1<br>  Subdevice #0: subdevice #0</p>

Step 5: Enable HiFiBerry Digi Sound Output

Now you should be able to select the HiFiBerry Digi as audio output. To do this, go to Settings/System/Audio output and select the HiFiBerry Digi as the audio output device.

Step 6: Enable Dolby Digital/DTS Passthrough

With the standard settings Kodi will only output stereo sound. You need to enable AC3/DTS passthrough now. To do this, enable the Expert settings first. After switching to expert mode you have much more options that you can configure. You now need to enable passthrough and also enable "Dolby Digital capable receiver " and "DTS capable receiver".

Step 7: Put It in a Nice Enclosure

While it is not needed for the operation, putting your Raspberry Pi and HiFiBerry Digi+ is a nice enclosure protects the boards. It will also look more attractive. There are many different cases available on the market from different supplier. Choose whatever you like.

Comments

author
Louis1246 made it!(author)2016-03-14

I'm using the HiFiBerry-Digi the one without the transformer with Openelec 5.0.2. I set everything up exactly like you said. Looking at aplay to check the driver I get exactly what you show in this instructable. When I play back a movie I only get PCM. DTS works fine using my DVD player. I have checked your website, forums etc. to try and figure out how to get DTS without any luck. Any help will be greatly appreciated.

I have been

author
J%C3%B6rgB7 made it!(author)2016-02-06

On Openelec or OSMC DTS is working but 5.1 isn't. My receiver shows me that it receives 5.1 but I get no sound. Any solutions?

author
Raspberry2016 made it!(author)2016-01-03

How it looks with DTS HD and TrueHD. Is there a way to play only DTS Core and AC3 Core.

author
hifiberry made it!(author)2016-01-04

AFAIK with DTS HD the player software should automatically extract the DTS core track and play it. However, I never tested this.

author
tomatoskins made it!(author)2015-04-26

Great idea! Thanks for sharing!

About This Instructable

27,798views

56favorites

License:

Bio: We're a small firm that brings high-quality audio to small devices.
More by hifiberry:Create a video player with Dolby Digital/DTS output
Add instructable to: