Kodi Community Forum
[WIP] AUDIO - 5.1 issue - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: [WIP] AUDIO - 5.1 issue (/showthread.php?tid=345351)



[WIP] AUDIO - 5.1 issue - bibi - 2019-07-13

Hi,

My system :
- archlinux
- pulseaudio set on 5.1 HDMI (works with other players)
- latest kodi
- kodi set on PA device, 5.1 speakers,  no passthrough
- a yamaha receiver

So the issue :
When i play AAC 5.1, i get 5.1 sounds (  21:31:07.714 in the log)
When i play DTS/AC3, i get 3.0 sounds (21:32:18.879)

From what i see in the log, it switches from "Channel Layout: FL, FR, FC, LFE, SL, SR" to "Channel Layout: FL, FR" ?

Log : https://pastebin.com/uAYRdbLP

Bibi

Can someone help me ?


RE: [WIP] AUDIO - 5.1 issue - fritsch - 2019-07-13

Why don't you read the wiki?  https://kodi.wiki/view/PulseAudio#Passthrough_Mode


RE: [WIP] AUDIO - 5.1 issue - bibi - 2019-07-13

Lol, why dont you read my post ^^.
I dont want passtrough, i want 5.1 pcm. And everything is configured according the wiki


RE: [WIP] AUDIO - 5.1 issue - fritsch - 2019-07-13

I misread your "," in the above sentence, sorry for that.

Turn off adjust refreshrate and try again
Quote:2019-07-12 21:31:11.367 T:140602121381632   DEBUG: CRenderManager::Configure - change configuration. 800x600. display: 800x600. framerate: 8.00.
Is bogus.

From kodi's log all fine:

Quote:019-07-12 21:32:19.220 T:140605790590720   DEBUG:   Output Device : Raven/Raven2/Fenghuang HDMI/DP Audio Controller Digital Surround 5.1 (HDMI 2)
2019-07-12 21:32:19.220 T:140605790590720   DEBUG:   Sample Rate   : 48000
2019-07-12 21:32:19.220 T:140605790590720   DEBUG:   Sample Format : AE_FMT_FLOAT
2019-07-12 21:32:19.220 T:140605790590720   DEBUG:   Channel Count : 6
2019-07-12 21:32:19.220 T:140605790590720   DEBUG:   Channel Layout: FL, FR, FC, LFE, SL, SR
2019-07-12 21:32:19.220 T:140605790590720   DEBUG:   Frames        : 2400
2019-07-12 21:32:19.220 T:140605790590720   DEBUG:   Frame Size    : 24
2019-07-12 21:32:19.222 T:140605782198016   DEBUG: Sink changed

Sink does what it should. start pulseaudio with debugging -vvv and see what you get. Other player for sure don't refreshrate switching - I think that while switching PA reconfigures the device and routes your stuff somewhere else.


RE: [WIP] AUDIO - 5.1 issue - bibi - 2019-07-16

It seems that enabling enable-remixing in pulseaudio settings made it works again (which is strange behavior)

Bibi


RE: [WIP] AUDIO - 5.1 issue - fritsch - 2019-07-16

Could you please check your pulseaudio log? If you need remixing then it means that it finds a very odd layout or something, so that it does not cope with kodi's standard mapping. This can be fixed by changing your PA config to include the channel configuration.


RE: [WIP] AUDIO - 5.1 issue - bibi - 2019-07-17

Ok, will try and report back.
Currently familly uses the system.


RE: [WIP] AUDIO - 5.1 issue - bibi - 2019-07-24

Hi,

I didnt had time to test further, but i find out that if i set output to "Fixe", it works, where "best match" or "optimised" doesnt work (with enable-remixing=no)

Bibi


RE: [WIP] AUDIO - 5.1 issue - fritsch - 2019-07-24

I cannot help you without a pulse log. If you don't allow PA to remix then make sure it has a proper speaker mapping.


RE: [WIP] AUDIO - 5.1 issue - bibi - 2019-07-24

With fixe :
 kodi log : https://pastebin.com/7dUVirQ2
pulse log : https://pastebin.com/8VKKm6Sg

With optimised :
 kodi log : https://pastebin.com/ceJvKZf5
pulse log : https://pastebin.com/ESE234ye


RE: [WIP] AUDIO - 5.1 issue - fritsch - 2019-07-25

Quote:juil. 24 13:57:56 bibi-server pulseaudio[1114]: I: [pulseaudio] sink-input.c: Created input 3 "kodi audio stream" on alsa_output.pci-0000_0b_00.1.hdmi-surround-extra1 with sample spec float32le 6ch 48000Hz and channel map front-left,front-right,front-center,lfe,side-left,side-right

vs

Quote:juil. 24 13:45:21 bibi-server pulseaudio[1165]: I: [pulseaudio] sink-input.c: Created input 3 "kodi audio stream" on alsa_output.pci-0000_0b_00.1.hdmi-surround-extra1 with sample spec float32le 6ch 48000Hz and channel map front-left,front-right,front-center,lfe,rear-left,rear-right

The problem is: The original mapping has SL SR but your sink in pulse has RL, RR only. This is why the remapping ight only output 4 channels.

Check this out:

Upmixing can now be disabled without bad side effects
By default, PulseAudio will play a stereo stream to all speakers (except subwoofer) of a surround system. Many people don't like this. It has been possible to disable all remixing by setting "enable-remixing = no" in daemon.conf, but that breaks other use cases where remixing is useful (perhaps the most silly breakage is that mono streams don't play at all, because the system doesn't have a dedicated "mono speaker").
Now it's possible to leave remixing enabled, and only disable (most) upmixing by setting "remixing-use-all-sink-channels = no" in daemon.conf. Mono streams will still be upmixed to front-left, front-right and center channels.

See also: https://github.com/xbmc/xbmc/blob/master/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp#L634

In short, don't turn remix off, but turn off remixing-use-all-sink-channels


RE: [WIP] AUDIO - 5.1 issue - fritsch - 2019-07-25

You could also look into channel-map in your pulseaudio config to fixate it to e.g. channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe take care with the order.


RE: [WIP] AUDIO - 5.1 issue - bibi - 2019-07-26

Turning off remixing-use-all-sink-channels did the trick, even if i dont understand what it does ^^.

Thanks

Bibi