Archive:Intel Linux Modifications for HD Audio: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(dito below commnet)
mNo edit summary
 
(14 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<center>{{Navigation
 
| nav name =Audio
| link1 =AudioEngine
| link2 =AudioEngine/HOW-TO: Configure audio
| link2 name = HOW-TO: Configure audio
| link3 =Windows Settings for AudioEngine
| link3 name = Windows Settings
| link4 =Intel Linux Modifications for HD Audio
| link5 name = Pulseaudio sink configuration
| link5 =PulseAudio
}}</center>
{{-}}
== Kernel ==
== Kernel ==
 
{{redv|'''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.  
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.  


Line 35: Line 24:


64 bit:
64 bit:
<source lang="bash">
<syntaxhighlight lang="bash" enclose="div">
cd ~/
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-generic_3.10.5-031005.201308040618_amd64.deb  
Line 41: Line 30:
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://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
wget http://mirrors.us.kernel.org/ubuntu//pool/main/l/linux-firmware/linux-firmware_1.113_all.deb
</source>
</syntaxhighlight>


32 bit:
32 bit:
<source lang="bash">
<syntaxhighlight lang="bash" enclose="div">
cd ~/
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-headers-3.10.5-031005-generic_3.10.5-031005.201308040618_i386.deb  
Line 50: Line 39:
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-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
wget http://mirrors.us.kernel.org/ubuntu//pool/main/l/linux-firmware/linux-firmware_1.113_all.deb
</source>
</syntaxhighlight>


=== Kernel Install ===
=== Kernel Install ===
Install the debs with these commands:
Install the debs with these commands:
<source lang="bash">
<syntaxhighlight lang="bash" enclose="div">
cd ~/
cd ~/
sudo dpkg -i *.deb
sudo dpkg -i *.deb
</source>
</syntaxhighlight>


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.
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.


<source lang="bash">
<syntaxhighlight lang="bash" enclose="div">
Audio TV Out - Off
Audio TV Out - Off
TV Control - Off
TV Control - Off
HDMI Control - Off
HDMI Control - Off
Audio Output - AMP
Audio Output - AMP
</source>
</syntaxhighlight>


= Old workarounds (not needed on kernels >= 3.9.x anymore) =
= Old workarounds (not needed on kernels >= 3.9.x anymore) =
Line 79: Line 68:
<br />
<br />
=== Easy - Blacklisting SPDIF - Fix (WIP) ===
=== Easy - Blacklisting SPDIF - Fix (WIP) ===
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml" enclose="div">
aplay -L | grep -i iec958
aplay -L | grep -i iec958
</syntaxhighlight>
</syntaxhighlight>
Line 93: Line 82:
This fix requires modification to:  
This fix requires modification to:  


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml" enclose="div">
/usr/share/alsa/cards/HDA-Intel.conf
/usr/share/alsa/cards/HDA-Intel.conf
</syntaxhighlight>
</syntaxhighlight>
Line 99: Line 88:
Open the '''HDA-Intel.conf''' file with a editor and look for entries containing:
Open the '''HDA-Intel.conf''' file with a editor and look for entries containing:


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml" enclose="div">
"CTLINDEX="
"CTLINDEX="
</syntaxhighlight>
</syntaxhighlight>
Line 107: Line 96:
Example of original '''''/usr/share/alsa/cards/HDA-Intel.conf''''' file  
Example of original '''''/usr/share/alsa/cards/HDA-Intel.conf''''' file  


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml" enclose="div">
@@ -211,7 +211,7 @@ HDA-Intel.pcm.hdmi.0 {
@@ -211,7 +211,7 @@ HDA-Intel.pcm.hdmi.0 {
"cards.HDA-Intel.pcm.hdmi.common:"
"cards.HDA-Intel.pcm.hdmi.common:"
Line 146: Line 135:
Becomes
Becomes


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml" enclose="div">
@@ -211,7 +211,7 @@ HDA-Intel.pcm.hdmi.0 {
@@ -211,7 +211,7 @@ HDA-Intel.pcm.hdmi.0 {
"cards.HDA-Intel.pcm.hdmi.common:"
"cards.HDA-Intel.pcm.hdmi.common:"
Line 180: Line 169:
"AES2=" $AES2 ","
"AES2=" $AES2 ","
</syntaxhighlight>
</syntaxhighlight>
{{forum link2|[[forum:136555|DTS-HD MA forum thread discussion]]}}

Latest revision as of 05:48, 23 July 2020

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).

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!!

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

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

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

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.

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.

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