PulseAudio: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
Line 219: Line 219:
== '''FAQ''' ==
== '''FAQ''' ==


;When would I want Pulseaudio:
;When would I want Pulseaudio?


* You use your xbmc computer mainly as your Desktop when you don't run xbmc
* You use your XBMC computer mainly as your Desktop when you don't run XBMC.
* You want other sounds like Skype, youtube, browser mail notification in parallel
* You want other applications audio like Skype, youtube, browser mail notification in parallel with XBMC.
* You use xbmc windowed as Desktop player
* You use xbmc in windowed mode as Desktop player
* You use Pulseaudio as a network sink to stream Audio to other devices in your living room
* You use Pulseaudio as a network sink to stream Audio to other devices in your living room.
* Passthrough is nice to have for you, but to be honest - you don't really need it.
* Passthrough is nice to have for you, but to be honest - you don't really need it.
* Whenever you plugin your BT headset, xbmc audio will continue over this new device (when Default (PULSE) device is chosen)
* Whenever you plugin your Bluetooth headset, xbmc audio will continue over this new device (when Default 'PULSE' device is chosen)


;When would I want ALSA:
;When would I want ALSA:


* You use xbmc as your standalone media center
* You use XBMC as your standalone media center.
* You are highly interested in bitperfect exclusive audio output
* You are highly interested in bitperfect exclusive audio output.
* DTS-HD, TrueHD is something you use daily and is of high importance
* DTS-HD, TrueHD is something you use daily and is of high importance.
* You don't need other applications that would access audio in parallel
* You don't need other applications that would access audio in parallel.


Why can't I have both:
Why can't I have both?
* PA might hogg your Audio device and you cannot open the ALSA device exclusively, therefore we decided for one or the other.
* Pulseaudio might hogg your Audio device and you cannot open the ALSA device exclusively, therefore we decided for one or the other.


Placeholder for content from http://forum.xbmc.org/showthread.php?tid=183436
Can I force ALSA, though I have pulseaudio installed and running and know that it will cause problems?
* Yes, you can - start xbmc from terminal with:
<pre>AE_SINK=ALSA xbmc</pre>
- Be warned as this might interfere with your Desktop sounds and pulseaudio!


DO NOT Remove page, DO NOT Delete or rename this page
{{forum link2|[[forum:183436|Linux - Pulseaudio Sink]] Discussion and further information.}}<br />


{{forum link2|[[forum:183436|Linux - PulseAudio Sink]] Discussion and further information.}}<br />
=== '''References''' ===
 
P;aceholder for related references.
Welcome to add information to it.

Revision as of 07:00, 21 January 2014

Template:Gotham

90% Completed


Template:Audionav

Outline

In the past XBMC had immense problems with users not getting Audio, because they had a full blown Ubuntu Desktop environment with PulseAudio installed. PulseAudio blocked the specific device required, and Audio Playback only worked reliably when using the virtual pulse device. Our workaround for those users was to uninstall pulseaudio. This of course broke complete Desktop Audio for these users.

We wanted this situation to change with XBMC Gotham releases.

Changes in Gotham: Users that run a normal Ubuntu Desktop and just use xbmc for normal video / audio playback while also wanting Audio in parallel in their browser or pause xbmc, run a game or rhythmbox / skype or whatever, they can now use our new PulseAudio Sink when using nightly and newer XBMC Gotham builds..

Introduction

This Sink automatically detects if PulseAudio is running and so assumes that the user, which installed PA and uses PA, also wants to use it.

This pulseaudio sink is also able to do AC3, DTS and EAC3 passthrough. Alternatively it can be configured to be a 7.1 or 5.1 output device. This is an exclusive OR. pulseaudio only provides AC3, DTS, EAC3 when it is configured to run with 2 channels (which is the default on every Desktop).


      • Cleanup

Further references to Pulseaudio in this page also as PA or Pulse

      • Cleanup


Pulseaudio Format support

Passthrough Support
Audio formats Supported Limitations
AC3 Yes No
DTS Yes No
DD+/E-AC3 Yes No
DTS-HD No Yes
TrueHD No Yes

Setup

Passthrough

IMPORTANT: Passthrough is always exclusive mode. If you have another application hogging the device, e.g. google chrome or skype or something else, Passthrough won't work.
REMEMBER: To use passthrough you need to be using 2.0 channel configuration via pavucontrol (e.g. Digital Stereo (HDMI)


In order to activate Passthrough Codecs, just setup pavucontrol, as in the following:

Note: Ubuntu 13.10 has a bug and passthrough might sound like noise, if you are affected only disabling passthrough helps. This is a distribution bug (OpenELEC, Arch, Debian, OpenSUSE works with the same code)

Multichannel

To alternatively configure Multi channel, do the following:

Example setup in xbmc for Pulseaudio

GOOD TO KNOW: Limit smaple rate can be set to Fixed - between 48kHz ~ 192kHz or just Optimized or Best batch.



DEVICE ENUMERATION: XBMC Enumerates Pulseaudio devices as SPDIF when you have Passthrough set. Otherwise its PCM Device.


XBMC Settings PC Speakers
(2.0)
PC Speakers
(5.1)
TV AVR SPDIF AVR HDMI
AVR HDMI
★★
SPDIF
AC3 support
Audio Output Analog Analog Analog Optical/Coaxial HDMI HDMI SPDIF
Speaker configuration 2.0 5.1 2.0 2.0 5.1 7.1 2.0
Boost volume level on downmix Enabled Enabled Enabled Enabled Enabled Enabled Enabled
Stereo upmix Disabled Disabled Disabled Disabled Enabled Enabled Enabled
Dolby Digital (AC3) capable receiver N/A N/A N/A Enabled Disabled Disabled Enabled
Dolby Digital Plus (E-AC3) capable receiver N/A N/A N/A Enabled Disabled Disabled Enabled
DTS capable receiver N/A N/A N/A Enabled Disabled Disabled Enabled
TrueHD capable receiver N/A N/A N/A Disabled Disabled Disabled Disabled
DTS-HD capable receiver N/A N/A N/A Disabled Disabled Disabled Disabled
Linux / OSX - Output Device Settings
Audio output device Speakers Speakers SPDIF/HDMI SPDIF HDMI HDMI SPDIF
Passthrough output device N/A N/A N/A SPDIF HDMI HDMI SPDIF

Where AVR has HDMI inputs. No Passthrough can be selected when Multichannel is enabled...

★★ Where AVR has HDMI inputs. No Passthrough can be selected when Multichannel is enabled...

Note: spdif has 2 pcm channels but can do virtual 5.1 formats like dts, ac3, eac3

FAQ

When would I want Pulseaudio?
  • You use your XBMC computer mainly as your Desktop when you don't run XBMC.
  • You want other applications audio like Skype, youtube, browser mail notification in parallel with XBMC.
  • You use xbmc in windowed mode as Desktop player
  • You use Pulseaudio as a network sink to stream Audio to other devices in your living room.
  • Passthrough is nice to have for you, but to be honest - you don't really need it.
  • Whenever you plugin your Bluetooth headset, xbmc audio will continue over this new device (when Default 'PULSE' device is chosen)
When would I want ALSA
  • You use XBMC as your standalone media center.
  • You are highly interested in bitperfect exclusive audio output.
  • DTS-HD, TrueHD is something you use daily and is of high importance.
  • You don't need other applications that would access audio in parallel.

Why can't I have both?

  • Pulseaudio might hogg your Audio device and you cannot open the ALSA device exclusively, therefore we decided for one or the other.

Can I force ALSA, though I have pulseaudio installed and running and know that it will cause problems?

  • Yes, you can - start xbmc from terminal with:
AE_SINK=ALSA xbmc

- Be warned as this might interfere with your Desktop sounds and pulseaudio!

Attention talk.png Linux - Pulseaudio Sink Discussion and further information.


References

P;aceholder for related references.