Archive:Linux audio: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
mNo edit summary
 
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Gotham updated}}
{{DISPLAYTITLE:<span style="display: none">{{FULLPAGENAME}}</span>}}
{{Audionav}}
<br />
<div style="font-size: 150%;"><big>Linux Audio</big></div>
----
<br />
__TOC__


=PulseAudio vs ALSA=
<section begin="intro" />This page describes how to set up audio for Linux-based systems. Primarily, it covers how to setup Kodi when using either ALSA or PulseAudio.<section end="intro" />
 
= PulseAudio vs ALSA =


Linux has two different audio systems, these are PulseAudio and Advanced Linux Sound Architecture (ALSA).
Linux has two different audio systems, these are '''[[w:PulseAudio|PulseAudio]]''' and '''[[w:Advanced Linux Sound Architecture|Advanced Linux Sound Architecture (ALSA)]]'''.


If you have a PC that is exclusively used for XBMC then using ALSA maybe the best solution, for more background refer to '''<big>[http://en.wikipedia.org/wiki/Advanced_Linux_Sound_Architecture Advanced Linux Sound Architecture]</big>'''
If you have a PC that is exclusively used for Kodi then using ALSA maybe the best solution.


If you have a PC runs many applications other than XBMC then using PulseAudio maybe the the best solution, for more background refer to '''<big>[http://en.wikipedia.org/wiki/PulseAudio PulseAudio]</big>'''
If you have a PC runs many applications other than Kodi then using PulseAudio maybe the the best solution.
<br />
<br />


Line 33: Line 27:
For AMD GPU's there are two sets of drivers available, the AMD supplied binary fglrx drivers or the newer Radeon OSS drivers.
For AMD GPU's there are two sets of drivers available, the AMD supplied binary fglrx drivers or the newer Radeon OSS drivers.


===fglrx Drivers===
=== fglrx Drivers ===


The AMD fglrx drivers on Linux limit the number of real audio channels to 2.0, this only provides enough bandwidth for LPCM 2.0, DTS (5.1) and AC3 (5.1) and so HD audio (DTS-HD, TrueHD) is '''NOT''' possible on Linux for AMD GPU's using the fglrx drivers, further to this the fglrx drivers limit HDMI audio to a 48Khz sample rate however 96KHz is possible on SPDIF.
The AMD fglrx drivers on Linux support TrueHD, LPCM 7.1 and DTS-HD starting with kernel 3.13.


The AMD developers responsible for the fglrx drivers have failed to provide any updates or improvements to the XvBA hardware acceleration API that the drivers use for more than 2 years, meaning no AMD fglrx driver since 12.10 has been usable.
The AMD developers responsible for the fglrx drivers have failed to provide any updates or improvements to the XvBA hardware acceleration API which is for example used in the infamous xvba-va-driver. We suggest you disable hw decoding support and choose multithreaded Software Decoding in the Video -> Acceleration settings.


===Radeon OSS Drivers===
=== Radeon OSS Drivers ===


As a consequence of the lack of XvBA updates, XBMC's developers got in contact with the AMD OSS developers to see what could be done to improve AMD graphics in Linux, the result was the Radeon OSS drivers which have been developed to use the open source VDPAU API.  
As a consequence of the lack of XvBA updates, XBMC's developers got in contact with the AMD OSS developers to see what could be done to improve AMD graphics in Linux, the result was the Radeon OSS drivers which have been developed to use the open source VDPAU API.  
Line 50: Line 44:


== Intel GPU HD Audio ==
== Intel GPU HD Audio ==
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. In addition modification to system files maybe required in order to get the HDMI audio working.
Ubuntu 14.04 and therefore Xbmcbuntu v13 support HD Audio with intel hardware (IVB, SNB, HSW) out of the box you don't have to do any modifications to your system configuration. If and only if you are running a very old distribution, e.g. Ubuntu 12.04 that is shipped with an old kernel, those changes will break and harm your audio on a recent distributions, don't change your config files.
 
For more detail on the required Linux modifications:


{{See|Intel Linux Modifications for HD Audio}}
== nVidia ION ==
See HOW-TO:Remap HDMI audio on Gen 1 ION - Linux for help on remapping HDMI audio channels.

Latest revision as of 06:02, 23 July 2020

This page describes how to set up audio for Linux-based systems. Primarily, it covers how to setup Kodi when using either ALSA or PulseAudio.

PulseAudio vs ALSA

Linux has two different audio systems, these are PulseAudio and Advanced Linux Sound Architecture (ALSA).

If you have a PC that is exclusively used for Kodi then using ALSA maybe the best solution.

If you have a PC runs many applications other than Kodi then using PulseAudio maybe the the best solution.

PulseAudio FAQ

To help you decide which is best for you:

See: PulseAudio#FAQ

Configuring PulseAudio

When using PulseAudio some configuration at the OS level maybe necessary to get audio from XBMC.

For how to do this

See: PulseAudio

Hardware Vendor Specifics

AMD

For AMD GPU's there are two sets of drivers available, the AMD supplied binary fglrx drivers or the newer Radeon OSS drivers.

fglrx Drivers

The AMD fglrx drivers on Linux support TrueHD, LPCM 7.1 and DTS-HD starting with kernel 3.13.

The AMD developers responsible for the fglrx drivers have failed to provide any updates or improvements to the XvBA hardware acceleration API which is for example used in the infamous xvba-va-driver. We suggest you disable hw decoding support and choose multithreaded Software Decoding in the Video -> Acceleration settings.

Radeon OSS Drivers

As a consequence of the lack of XvBA updates, XBMC's developers got in contact with the AMD OSS developers to see what could be done to improve AMD graphics in Linux, the result was the Radeon OSS drivers which have been developed to use the open source VDPAU API.

The Radeon OSS driver are now more feature rich and better performing than the fglrx ever were, amongst other things they are capable of allowing HD audio (DTS-HD, TrueHD) to be bitstreamed.

For more detail see forum thread:

Attention talk.png Linux - Radeon OSS with vdpau (howto) Discussion and further information.


Intel GPU HD Audio

Ubuntu 14.04 and therefore Xbmcbuntu v13 support HD Audio with intel hardware (IVB, SNB, HSW) out of the box you don't have to do any modifications to your system configuration. If and only if you are running a very old distribution, e.g. Ubuntu 12.04 that is shipped with an old kernel, those changes will break and harm your audio on a recent distributions, don't change your config files.

nVidia ION

See HOW-TO:Remap HDMI audio on Gen 1 ION - Linux for help on remapping HDMI audio channels.