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

From Official Kodi Wiki
Jump to navigation Jump to search
>Jjd-uk
No edit summary
mNo edit summary
 
(46 intermediate revisions by 9 users not shown)
Line 1: Line 1:
< [[AudioEngine]] < [[AudioEngine/HOW-TO: Configure audio|HOW-TO: Configure audio]]
<br>
==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.  


For more on this patch refer to [http://comments.gmane.org/gmane.linux.alsa.devel/100746 Intel HDMI HBR patches for HD Audio]
For more on this patch refer to [http://comments.gmane.org/gmane.linux.alsa.devel/100746 Intel HDMI HBR patches for HD Audio]


==Intel Systems with HDMI only==
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).


If the Intel system only has an HDMI out then only a patched Linux 3.7 or higher kernel is required to get HDMI audio working.
=== Kernel upgrades ===
To upgrade the kernel you need to obtain 3 files either x86 or x86_64 depending on your architecture.


==Intel Systems with both SPDIF & HDMI==
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.


Systems which have a Intel GPU feeding a HDMI out but also have a motherboard SPDIF out also require a patched Linux 3.7 or higher kernel, however further system modification is also required 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:
# linux-headers-<version numbers>-all.deb
# linux-headers-<version numbers>-amd64.deb
# 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:
<syntaxhighlight lang="bash" enclose="div">
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
</syntaxhighlight>
 
32 bit:
<syntaxhighlight lang="bash" enclose="div">
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
</syntaxhighlight>
 
=== Kernel Install ===
Install the debs with these commands:
<syntaxhighlight lang="bash" enclose="div">
cd ~/
sudo dpkg -i *.deb
</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.
 
<syntaxhighlight lang="bash" enclose="div">
Audio TV Out - Off
TV Control - Off
HDMI Control - Off
Audio Output - AMP
</syntaxhighlight>
 
= 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.
'''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.
'''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.
<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>
If you find S/PDIF on the same card as your intel hdmi rmmod the module that drives your S/PDIF.
If you find S/PDIF on the same card as your intel hdmi rmmod the module that drives your S/PDIF.
<br>
<br />
 
=== Difficult - HDA-Intel.conf - Fix ===


===Difficult - HDA-Intel.conf - Fix===
{{redv|'''WARNING:'''|Only carry this out if you 100% know what you are doing as a wrong step can totally break audio.}}


'''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:  
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 38: 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 46: 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 85: 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 119: 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