Intel Linux Modifications for HD Audio

From Official Kodi Wiki
Jump to: navigation, search
Home icon grey.png   ▶ Audio ▶ Linux audio ▶ Intel Linux Modifications for HD Audio

1 Kernel

WARNING: All those changes are not needed when you run a current linux distribution (e.g. xbmcbuntu v13)! Don't make those changes.

HD Audio on Intel SandyBridge & IvyBridge systems require a patch from Intel to be included within the kernel, Linux 3.7 and higher include this patch as standard.

For more on this patch refer to Intel HDMI HBR patches for HD Audio

If you install a kernel >= 3.10.x you are on the safe side and no additional changes are needed (not matter if you have a spdif or not).

1.1 Kernel upgrades

To upgrade the kernel you need to obtain 3 files either x86 or x86_64 depending on your architecture.

Download 3 debs to a directory from this site http://kernel.ubuntu.com/~kernel-ppa/mainline/ (at time of writing 3.10.5 is/was the stable version) or greater. We also update the linux-firmware as we are at it.

  1. linux-headers-<version numbers>-all.deb
  2. linux-headers-<version numbers>-amd64.deb
  3. linux-image-<version number>-amd64.deb

Note: The examples above needs you to choose the correct architecture for your installation or else you render your system unbootable!!

1.2 Kernel Download

Choose 32 bit if your system is running i686 kernel or choose 64 bit if your system is x86_64.

64 bit:

cd ~/
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10.5-saucy/linux-headers-3.10.5-031005-generic_3.10.5-031005.201308040618_amd64.deb 
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10.5-saucy/linux-headers-3.10.5-031005_3.10.5-031005.201308040618_all.deb 
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10.5-saucy/linux-image-3.10.5-031005-generic_3.10.5-031005.201308040618_amd64.deb 
wget http://mirrors.us.kernel.org/ubuntu//pool/main/l/linux-firmware/linux-firmware_1.113_all.deb

32 bit:

cd ~/
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10.5-saucy/linux-headers-3.10.5-031005-generic_3.10.5-031005.201308040618_i386.deb 
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10.5-saucy/linux-image-3.10.5-031005-generic_3.10.5-031005.201308040618_i386.deb 
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10.5-saucy/linux-headers-3.10.5-031005_3.10.5-031005.201308040618_all.deb 
wget http://mirrors.us.kernel.org/ubuntu//pool/main/l/linux-firmware/linux-firmware_1.113_all.deb

1.3 Kernel Install

Install the debs with these commands:

cd ~/
sudo dpkg -i *.deb

After a reboot bitstream passthrough should be working. You can check the xbmc.log if your AVR capabilities are correctly identified. If the correct codecs / speaker numbers are not found, check the following settings with your AVR. We are aware that intel is currently really picky with AVRs - on really rare cases we could not get a single sound out of the AVR.

Audio TV Out - Off
TV Control - Off
HDMI Control - Off
Audio Output - AMP

2 Old workarounds (not needed on kernels >= 3.9.x anymore)

2.1 Intel Systems with both SPDIF & HDMI

On old kernel versions (prior to 3.9.x) systems which have a Intel GPU feeding a HDMI out but also have a motherboard SPDIF out require a patched Linux 3.7 or higher kernel and additional system modification to get sound on the HDMI out. In these circumstances both SPDIF & HDMI share certain system file settings which cause a conflict resulting in the HDMI sound being blocked, to fix this there are two options available:

1. Easy - Blacklist the SPDIF so only HDMI is available for audio, this also has the advantage of surviving system upgrades.

2. Difficult - If both SPDIF & HDMI are required to be active then editing then HDA-Intel.conf is required so there is no conflict in the device settings, however this might have to be reapplied after a system upgrade.

2.1.1 Easy - Blacklisting SPDIF - Fix (WIP)

aplay -L | grep -i iec958

If you find S/PDIF on the same card as your intel hdmi rmmod the module that drives your S/PDIF.

2.1.2 Difficult - HDA-Intel.conf - Fix

WARNING: Only carry this out if you 100% know what you are doing as a wrong step can totally break audio.


This is not needed if you run a kernel >= 3.10.x as this already increases the index internally

This fix requires modification to:

/usr/share/alsa/cards/HDA-Intel.conf

Open the HDA-Intel.conf file with a editor and look for entries containing:

"CTLINDEX="

The numerical value after the = sign need to be increased by 1 so for example "CTLINDEX=1" becomes "CTLINDEX=2"

Example of original /usr/share/alsa/cards/HDA-Intel.conf file

@@ -211,7 +211,7 @@ HDA-Intel.pcm.hdmi.0 {
"cards.HDA-Intel.pcm.hdmi.common:"
"CARD=" $CARD ","
"DEVICE=3,"
"CTLINDEX=0,"

"AES0=" $AES0 ","
"AES1=" $AES1 ","
"AES2=" $AES2 ","
@@ -234,7 +234,7 @@ HDA-Intel.pcm.hdmi.1 {
"cards.HDA-Intel.pcm.hdmi.common:"
"CARD=" $CARD ","
"DEVICE=7,"
"CTLINDEX=1,"

"AES0=" $AES0 ","
"AES1=" $AES1 ","
"AES2=" $AES2 ","
@@ -257,7 +257,7 @@ HDA-Intel.pcm.hdmi.2 {
"cards.HDA-Intel.pcm.hdmi.common:"
"CARD=" $CARD ","
"DEVICE=8,"
"CTLINDEX=2,"
"AES0=" $AES0 ","
"AES1=" $AES1 ","
"AES2=" $AES2 ","
@@ -280,7 +280,7 @@ HDA-Intel.pcm.hdmi.3 {
"cards.HDA-Intel.pcm.hdmi.common:"
"CARD=" $CARD ","
"DEVICE=9,"
"CTLINDEX=3,"
"AES0=" $AES0 ","
"AES1=" $AES1 ","
"AES2=" $AES2 ","

Becomes

@@ -211,7 +211,7 @@ HDA-Intel.pcm.hdmi.0 {
"cards.HDA-Intel.pcm.hdmi.common:"
"CARD=" $CARD ","
"DEVICE=3,"
"CTLINDEX=1,"
"AES0=" $AES0 ","
"AES1=" $AES1 ","
"AES2=" $AES2 ","
@@ -234,7 +234,7 @@ HDA-Intel.pcm.hdmi.1 {
"cards.HDA-Intel.pcm.hdmi.common:"
"CARD=" $CARD ","
"DEVICE=7,"
"CTLINDEX=2,"
"AES0=" $AES0 ","
"AES1=" $AES1 ","
"AES2=" $AES2 ","
@@ -257,7 +257,7 @@ HDA-Intel.pcm.hdmi.2 {
"cards.HDA-Intel.pcm.hdmi.common:"
"CARD=" $CARD ","
"DEVICE=8,"
"CTLINDEX=3,"
"AES0=" $AES0 ","
"AES1=" $AES1 ","
"AES2=" $AES2 ","
@@ -280,7 +280,7 @@ HDA-Intel.pcm.hdmi.3 {
"cards.HDA-Intel.pcm.hdmi.common:"
"CARD=" $CARD ","
"DEVICE=9,"
"CTLINDEX=4,"
"AES0=" $AES0 ","
"AES1=" $AES1 ","
"AES2=" $AES2 ","
Attention talk.png DTS-HD MA forum thread discussion