Kodi Community Forum

Full Version: sound problem on linux
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi all -

i've been experimenting with Ubuntu 14.04 LTS and Kodi.

i have integrated audio on the motherboard capable of supporting audio over HDMI, 8 channels, 192k.

while I can configure ubuntu via pulseaudio to use 7.1 channels, unlike the great experience on my mac mini, kodi always outputs 7.1 48k audio regardless of what the source is.

on the mac, i decode to LPCM and output the proper audio channels and sample rate based on source.

is this a limitation of Kodi on Ubuntu? would prefer decoding my flac/dts-hd/true-hd to LPCM but with same # of channels and sample rate as the source.

any suggestions welcome. cheers
Please read the pulseaudio wiki: http://kodi.wiki/view/PulseAudio

All is said there.
(2015-01-27, 21:19)fritsch Wrote: [ -> ]Please read the pulseaudio wiki: http://kodi.wiki/view/PulseAudio

All is said there.

well, did that and came to the conclusion that best i could do is set a sample rate of e.g. 96 khz and if source was such, it would not re-sample. but anything other than 96 would be resampled.

after playing around with settings form that page, i am stuck at kodi always outputting 7.1 channels @ some default sample rate even if the source is say 2.0/192k, 5.1/96k, etc...

i'll re-read through it. perhaps i missed something.

note that your response doesn't tell me if what I want to do is even possible; from reading the wiki i'm interpreting that it is not, but it's a long page with a lot of info.

to reiterate:

- want output to match source. 2.0/192 is output 2.0/192; 7.1/48 is output 7.1/48. i always need to output LPCM as well.

- koid/mac works rather well in this regard - kodi takes exclusive control of the audio configuration and as reported by my Oppo 105, it receives channels and sample rate same as source from kodi over HDMI.

cheers!
I added that in the FAQ, you can stop PA to upmix, it's most bottom on that page. This will only stop upmixing, your AVR still shows 7.1 though, but only 2 channels will have data.

If you want more features, you have to use ALSA.
Can we specifically tell Kodi to use ALSA if PulseAudio is running? If not, what can be done short of uninstalling PulseAudio? E.g. is there a quick way to stop PulseAudio before starting Kodi for example? PulseAudio typically auto-restarts when it's killed.
?? did you read the wiki or did you not read it?

It's mentioned how to do so.

AE_SINK=ALSA kodi
@fritsch, I didn't think of seeking info about using ALSA on the PulseAudio page; there seemed to be very little information about ALSA on the Linux Audio page.

Anyway thanks for the help, I'll try that tonight. The problems mentionened on the Wiki are because Kodi then locks the audio device right? Or are there other problems?
I have no idea how I can write that clearer as I already did.

PA will lock the device the very moment xbmc shortly leaves it ... race after race after race ...
Oh it is very clear indeed, don't worry -- sometimes finding the information is the bottleneck, and thanks for clearing that up for me.

I think the solution you provided will work great for me (I just want to be able to bitstream TrueHD and DTS MA codecs to my receiver through HDMI) so Kodi locking up the device is expected. If PA regains the lock right after I leave Kodi, then everything is perfect on my end.
Not sure it is - if you are running Unity for example Adjust Refreshrate to match video won't work and your dts-hd experience will suck, as video / audio will go out of sync every now and then and you will hear a drop.