Linux Ubuntu Simultaneus Audio Output
#1
Hi People, I have successfully installed, tested and above all enjoyed my experience with xbmc (now called kodi).
My current OS upon which xbmc is installed on is xubuntu, and I ran into some difficulties in which I need the assistance of the community.
During my experience, I wondered if I could turn down the volume of my TV (connected to xbmc via HDMI cable), and connect my headphones on my onboard soundcard via 3.5mm audio jack. So my first try was to search the forums of ubuntu and debian since ubuntu is a derivative of debian, but nothing that really cleared things up. In fact it brought up some more questions. Huh
So I started to ask in the IRC of ubuntu and debian because during my search i stumbled upon 2 terms "alsa" and "pulseaudio", and some favour the one of them more than the other by saying of how horrible the other is.
Now it could be possible that one solution is better than the other in some cases.

My intention with this thread is to elaborate this aspect here in how to set up these 2 solutions according to my setup as an example in order to see where strengths are in my case and where other users who are new to xbmc or are running into the same or similar problem can use this thread to get an orientation about how to solve their sound problems.

My audio requirements are simultaneous audio output on:
  1. HDMI
  2. 3.5mm Audio Jack
  3. Bluetooth headset devices

Now, I was able to output the audio onto my bluetooth headset by installing the following package: pulseaudio-module-bluetooth
After that I was able to pair and receive the audio onto my bluetooth headset.
Since I started with pulseaudio I wonder if we could continue with it and then look how alsa would work and I would post my impression about each one of the solution.

So I hope to receive tips, recommendations and solutions to try out in which I will give my feedback on.
As for that I thank the community in advance.

Cheers...
Reply
#2
For your usecase pulseaudio is needed, as a drawback, you cannot bitstream/passthrough audio anymore.
check PulseAudio (wiki)
Reply
#3
Thx for the fast reply.
I have read your link, and I'am planning to use my system mainly for xbmc, and I use the word mainly because I will run some emulators on it. In the section "6.1 When would I want PulseAudio? ", it says that PulseAudio should be used when I plan to use other programs aside from xbmc. Is that to be seen that way since I would run an emulator from the xbmc add-on?
Then there is a term that I'm curious to know, and that is "Sink". It is mentioned couple times in the wiki.
For someone who jumps straight in the material could be walking away with that unanswered question mind.
Maybe you could add this in your FAQ?

Thx in advance.
Reply
#4
Ok, apparently a sink prepresents an audio output.. but I could be wrong at this.
Reply
#5
Sink: Software implementation of AESink interface. or less correct: the last point in a chain that xbmc uses to output sound. Alsa, pulse, directsound, wasapi, audiotrack are some concrete technologies we use via that interface in encapsulated Form.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#6
And the interesting thing is that when executing in the terminal of my xbmc the following: pactl list sinks|grep device.description
I get this:
Code:
device.description = "Built-in Audio Digital Stereo (HDMI)"
device.description = "Simultaneous output to Built-in Audio Digital Stereo (HDMI)"

Should there be also something like "Onboard Audio Digital stereo"?
In the configuration tab I have various profiles in the dropdown menu.
Reply
#7
Post your xbmc.log and I explain them.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#8
Also post complete output of: pactl list sinks and additionally aplay -l
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#9
Here is the log of my xbmc: http://pastebin.com/5mFzkHaT
I have also made some screenshots of pulseaudio thought it would help: http://imgur.com/a/E66MB

This is what I got at "aplay -l":
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
Reply
#10
All pretty standard.

We see 3 devices in xbmc. Default is something special. This represents the default pa device. So if that is chosen pa routes xbmc output to whatever the user has set his default device. If you hotplug an USB soundcard while xbmc is running or switch devices in your desktop xbmc just continues seamlessly.

Next is your HDMI out in 2 channel config. And finally your simultaneous output which does not make much sense as your Intel analog device is not managed by pa. You can usw pavucontrol to add that device by changing the outpu profile vor activating that specific HW device.

If you have some custom pa config, e.g. no udev detection you need to manually add that hw device.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#11
Edit: the image is not displayed for me and pactl was missing.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#12
Sry here is the pastebin link of my log: http://pastebin.com/5mFzkHaT

in case you haven't seen my screenshots, how do I do the custom pa config?
Reply
#13
Use pavucontrol to change output profile. It's in the last tab. I have no Computer near me.

I still miss: pactl list sinks | pastebinit
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#14
Yep, there you go: http://pastebin.com/eWker2B4
Reply
#15
Also standard besides hw:0,0 missing. Check pavucontrol again. If that does not help manually add that device to pulse.

Ubuntu wiki and also arch wiki has some snippets about that. Normally they should appear without user interaction after boot if not Blockes otherwise. You can also use pacmd to manually load that alsa device.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply

Logout Mark Read Team Forum Stats Members Help
Ubuntu Simultaneus Audio Output0