Kodi Community Forum

Full Version: [WIP] AUDIO - 5.1 issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 ?
Lol, why dont you read my post ^^.
I dont want passtrough, i want 5.1 pcm. And everything is configured according the wiki
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.
It seems that enabling enable-remixing in pulseaudio settings made it works again (which is strange behavior)

Bibi
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.
Ok, will try and report back.
Currently familly uses the system.
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
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.
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
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...E.cpp#L634

In short, don't turn remix off, but turn off remixing-use-all-sink-channels
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.
Turning off remixing-use-all-sink-channels did the trick, even if i dont understand what it does ^^.

Thanks

Bibi