Kodi Community Forum

Full Version: Stereo always upmixes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I'm giving KODI another try - my media center is currently an ancient MythTV and it's getting... ugh.

Anyway, I'm having a bit of an audio issue - stereo seems to always upmix to multichannel. Stuff that's actually encoded with multichannel works perfectly, but stereo is always upmixed. The upmix option IS disabled. I have also tried enabling it. And redisabling it.

This happens with music (I've tried both FLAC and MP3, both from files I created) and video (which I've also created myself over the years, so there's AVI containers and MKV containers, anything from reencoding mono to MP3, to stereo reencoded as AAC). No matter what I do, stereo gets upmixed to multichannel.

This is the very same system I run MythTV on, using the same audio device (using ALSA, not Pulse). Any other player (MythTV, mpg123, mplayer, vlc) stereo is plain stereo.

I am running Ubuntu 14.04.3 and Kodi 15.2 (Git: 02r7013) which I installed using the PPA. Using HDMI output.

Anyone have any ideas?

EDIT: Forgot to add debug log. it is at http://pastebin.com/SUR7nhi0
No Debug Log no problem.

If you run pulseaudio with multi channel profile then pulseaudio is doing that by default, no matter what we do, see the kodi wiki for howto setup pulseaudio correctly. I am interested in your ALSA log as this does not do this.
(2015-10-30, 08:39)fritsch Wrote: [ -> ]No Debug Log no problem.

If you run pulseaudio with multi channel profile then pulseaudio is doing that by default, no matter what we do, see the kodi wiki for howto setup pulseaudio correctly. I am interested in your ALSA log as this does not do this.

Ugh, I forgot to hit submit on the debug log and then forgot about it. Anyway, I added it to the main post, it's at http://pastebin.com/SUR7nhi0

I've never used pulseaudio. It is not installed on this system. I know ALSA works. It works with everything else...

The output name is "HDA NVidia(), HDMI 0". This is the same output MythTV uses (though the syntax is different) as well as mplayer. No other output works - they either make kodi crash instantly, produce no sound, or sound like there are bees in my speakers.

The debug log shows it setting up two channels:

02:39:38 T:2926574400 DEBUG: Channel Count : 2
02:39:38 T:2926574400 DEBUG: Channel Layout: FL,FR

So I still have no idea why it's upmixing.
(2015-10-30, 09:58)sterlingphoenix Wrote: [ -> ]So I still have no idea why it's upmixing.

I would start by dropping asoundrc and friends:

02:39:38 T:2926574400 INFO: CAESinkALSA::Initialize - Attempting to open device "ch51dup"
02:39:38 T:2926574400 INFO: CAESinkALSA::Initialize - Opened device "ch51dup"
I've noticed something a bit odd about Kopi, in that with certain types of source material it will indicate it as being 2 channels on the OSD, but your receiver will play it as 5.1, because it really IS 5.1 - it's just that Kodi isn't aware of it because you're using audio passthru and the 5.1 is in a format your receiver recognizes, but Kodi doesn't. I most typically see this with recorded TV shows - Kodi doesn't always seem to pick up on the fact that they are Dolby encoded, but since it's passing the audio stream to your receiver (via HDMI or optical cable) your receiver finds the encoded extra channels and plays them correctly.

I actually have a couple of audio channel test recordings that were recorded from satellite TV channels, where each channel is specifically identified by voice or tone, and they are 5.1 (and all channels play correctly), yet Kodi's OSD claims they are 2-channel.
(2015-10-30, 10:30)FernetMenta Wrote: [ -> ]
(2015-10-30, 09:58)sterlingphoenix Wrote: [ -> ]So I still have no idea why it's upmixing.

I would start by dropping asoundrc and friends:

02:39:38 T:2926574400 INFO: CAESinkALSA::Initialize - Attempting to open device "ch51dup"
02:39:38 T:2926574400 INFO: CAESinkALSA::Initialize - Opened device "ch51dup"

The ch51dup section in .asoundrc is what makes actual multichannel work; it's basically a routing table. Without that, surround sounds go to the wrong speakers.

Also, that part comes way before the bit where the log shows it is only using 2 channels.
(2015-10-30, 17:09)xbmclinuxuser Wrote: [ -> ]I've noticed something a bit odd about Kopi, in that with certain types of source material it will indicate it as being 2 channels on the OSD, but your receiver will play it as 5.1, because it really IS 5.1

Not the case here. It does it with audio files that are very much 2 channels - the vast majority are FLAC files that I personally ripped from my CD collection, and some are MP3s which I don't think even support multichannel. Also, like I said, I've played the same files with other players. They are pure stereo.I do have some multichannel audio, and that /does/ go to the passthrough device and work fantastically.

It's weird, this is the opposite problem to what I usually have (most players just toss everything to the 2-channel and you have to beat them up to use multichannel).
You problem is the asoundrc, as you force dmixer as default device and we pick up this default device. Remove the asoundrc, don't overwrite the default device, disable dmixing and it will work.
(2015-10-30, 18:34)fritsch Wrote: [ -> ]You problem is the asoundrc, as you force dmixer as default device and we pick up this default device. Remove the asoundrc, don't overwrite the default device, disable dmixing and it will work.

I can't completely disable .asoundrc, as without it multichannel doesn't work (it either reverses or is like 90 degrees wrong). I will try messing with it later on, though.
Disable it completely and see the "auto upmix" gone. The ION table can be incorporated without upmixing. Even changing your dmixer device to not be the "full range" speaker set is enough to make it work.

Kodi alsa autoamtically chooses dmix, if there exists a device for default output.
(2015-10-30, 19:48)fritsch Wrote: [ -> ]Disable it completely and see the "auto upmix" gone. The ION table can be incorporated without upmixing. Even changing your dmixer device to not be the "full range" speaker set is enough to make it work.

Kodi alsa autoamtically chooses dmix, if there exists a device for default output.

Without .asoundrc, I just get bees. When I go to audio settings I have time to see that it's the same device as it was before (HDA NVIDIA(), HDMI0) before kodi segfaults. So I can't even get in there to change anything.

Actually now kodi segfaults when I run it, even with the .asoundrc restored...

EDIT: Even with no .asoundrc.
Seems you have much bigger issues ... No segfault without a crashlog ...
(2015-10-31, 08:59)fritsch Wrote: [ -> ]Seems you have much bigger issues ... No segfault without a crashlog ...

The forum seems to not let me post anymore... I've tried 3 times, lets try again.

I switched to pulse, and beat THAT up till it worked, so... all good now. Except for having to manually create audio playlists but I can deal with THAT.