PDA

View Full Version : Analog 5.1 working but with problems


LinarSavion
2008-12-04, 18:48
Now that i finally got the analog 5.1 working, there is a problem.. the center channel is swapped with the rear-right channel.

can anyone direct me to where in the code i can change the channel's order?

alanwww1
2008-12-04, 23:54
I have the same issue !

I enabled it in the advancedsettings.xml but now the channels are mixed. I think there is a matrix file in the source code where these are set but i am not sure which and how to change it. I don't even know how to compile it :confused2: Only in Linux.

In linux by default XBMC checks the audio format 5.1 4.0 etc and outrut it to the rigth vrtual sound device surround51 surround40 etc.

I think in win it would be great if at least we could set this matrix in the advancedsettings.xml so that we can tell which channels should work on which speaker.

Help needed from experts !

WiSo
2008-12-05, 00:03
I'm no expert in the sound system but you could play with the channel_mask in Win32DirectSound.cpp

const int channel_mask[] =
{
SPEAKER_FRONT_CENTER,
SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT,
SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_LOW_FREQUENCY,
SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT,
SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_LOW_FREQUENCY,
SPEAKER_FRONT_LEFT | SPEAKER_FRONT_CENTER | SPEAKER_FRONT_RIGHT | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_LOW_FREQUENCY
};

alanwww1
2008-12-05, 00:17
I'm no expert in the sound system but you could play with the channel_mask in Win32DirectSound.cpp


Thanks for help. Where can this file be found in Vista32 ?

Anyway i don't think it is a good solution to adjust the channel order to a wrong mapped source, i think it would be good to change it inside xbmc to the right mapping.

WiSo
2008-12-05, 00:20
This file is XBMC source code and can be found in our svn. Afterwards you have to compile a new binary of course. Since I don't have any equipment to test the channel order I can't help here.

alanwww1
2008-12-05, 00:24
Can anyone help us out with checking this issue, who can test the order and make the compile ?

Is there a guide for windows compile like for Linux ? Cause in this case i could do the testing.

I think it will be for more and more peaople an issue because if you use HDMI multichannel audio watching Hi def DTS-HD audio rips, or multichannle flac rips, or AAC multichannel audio this is THE only way passing to the ampliyer without quality loss.

WiSo
2008-12-05, 01:03
afaik this is an old problem but nobody took care.
Here is the compile guideline -> http://xbmc.org/wiki/?title=HOW-TO_compile_XBMC_for_Windows_from_source_code#Compi ling_XBMC_using_Visual_C.2B.2B_2008_Express_Editio n

Update: but note, I dunno if this is the right place to fix it. If it works it might be not the root cause of the problem which needs to be fixed as well.

ashlar
2008-12-05, 01:24
Yup, I can confirm. Channel mapping is all wrong. Latest SVN for today.

elupus
2008-12-05, 04:57
No that is not the right place to fix it.. Those flags only specify WHAT channels the source have, not the order they are in.. There need to be specific code that reorder the channels to the correct order. (or modify the decoders to output windows standard as default which i just realised made quite alot sence cause then atleast dts/ac3 could be made correct for alsa and windows)

alanwww1
2008-12-05, 10:12
No that is not the right place to fix it.. Those flags only specify WHAT channels the source have, not the order they are in.. There need to be specific code that reorder the channels to the correct order. (or modify the decoders to output windows standard as default which i just realised made quite alot sence cause then atleast dts/ac3 could be made correct for alsa and windows)

Thanks for the info Elupus !

Can you pass this info to the Dev who can fix it ? I think is important to a lot of people outhere. :D

Jester
2008-12-05, 10:44
I'll do a test build if a dev looks at the SVN, I can do a patch too, however I have no clue where to look for this.

alanwww1
2008-12-05, 14:57
I'll do a test build if a dev looks at the SVN, I can do a patch too, however I have no clue where to look for this.

Thanks Jester !

I would really like to help and contribute to xbmc but i don't have enough coding knowledge, but i try to help with testing.

:grin:

Chura
2008-12-06, 00:11
I'm having the exact same problem, with ATI 3470.
I'm using sound over HDMI, and when i choose analog i have sound, but with Digital i dont.
Any other application running on that same computer works fine, for example the Media portal, or Media Center...

Any idea's when it will be solved ?

DannySan
2008-12-06, 15:21
Same question here, running with an MSI HD2600XT and having only sound when I switch XBMC to 'analog'... would like to have the surround-sound working, just as the fact that I can't send XBMC to my second 'monitor' (Philips 32" LCD-tv)...

Are those maybe problems that the next build will fix? :grin:

LinarSavion
2008-12-08, 22:17
Any dev can maybe point us to where the channel order is defined?

brownstein
2009-01-25, 07:19
having the same issue myself. auzentech xplosion sound card, right channel swapped with center. anyone found the fix yet?

ashlar
2009-02-27, 13:00
With the "smooth" branch now being tested out, it would be nice to have this fixed.

Testing a build with messed up channel mixing would be painful and the "smooth" functions really give their best when resampling is available (hence, only with analog out).

mattemawi
2009-03-07, 13:29
Well i just started up as a complete new user of XBMC this week an went totally "sold" on this product!!! It the best MC application so fare!!

On my HFX setup use state of the art components and from now on XP-32 bits OS.... Runs very nica on music and films...... BUT its some what irritating that the anlog channels is mixed up.....

The ticket is now 3 months old and i just want to now the status and an expected solution for the problem

// Mats

warwon
2009-03-07, 16:17
What the heck!?

I've had no issues with my 5.1 and I updated to Jester march 2nd build.

Now my middle speaker became mapped to my right.

Freaken great, it was working with no issues. Now it's broken.

This is awful!

mitul103
2009-03-07, 17:07
What the heck!?

I've had no issues with my 5.1 and I updated to Jester march 2nd build.

Now my middle speaker became mapped to my right.

Freaken great, it was working with no issues. Now it's broken.

This is awful!

Is it really that hard to revert to whatever version you were using before and wait until this is fixed?

warwon
2009-03-07, 19:37
Not really just sucks since that version was back in Feb 1st or somthing...

Mad

natethomas
2009-03-07, 20:12
What the heck!?

I've had no issues with my 5.1 and I updated to Jester march 2nd build.

Now my middle speaker became mapped to my right.

Freaken great, it was working with no issues. Now it's broken.

This is awful!

I'm curious what setup you have. Are you outputting through HDMI, Optical cable, or three analog cables?

warwon
2009-03-07, 20:28
three analog cables

Front/Sub, Right and left front, back left and right.

Never a issue until March 2nd svn updates (maybe sooner, I haven't updated in almost a month, was busy)

I don't use optical or coxial digital because you get 2 channel audio only from blue-ray, so I switch to analog to fix the issue.

All my movies with 5.1 used to be fine in XBMC now there hooped.

argus
2009-03-26, 23:08
same problem here with creative sb live 5.1

must be just a simple exchange of codelines somewhere but i'm ignorant when it comes to coding

i did manage to make a workaround by installing kxproject drivers and setting quasi surround from there while keeping channels downmixed to stereo in xbmc
link: http://www.driverheaven.net/general-discussion/166535-3545-released-beta-revision-3545b.html

abba77
2009-03-26, 23:54
x-fi here with a 4.1 setup.

svn build from yesterday. default is to downmix to stereo, so only front two work. setting it not to downmix, i get the same audio from rear when a 5.1ac3 stream is playing. e.g. hearing the narrator on the rears prominantly with planet earth.

phi2039
2009-03-28, 06:23
See SVN rev 19008. This resolves channel mappings for AC3, AAC, DTS, and Vorbis sources for 5.0 and 5.1 content (i.e. no more center channel from right surround speaker). Additional mappings are easy enough to add, just ask, but remember that mapping != mixing. The number of channels in must equal the number of channels out.

This fix does NOT handle up/down/cross-mixing. These will be implemented as a part of the MasterAudio branch project.

natethomas
2009-03-28, 10:13
Whoa. And just like that, the resolution appears.

BTW, phi, I have no idea where you stand on the Mizzou and KU thing, but as an ardent KU supporter, tonight was not a great night. This made it a little better though.

ashlar
2009-03-28, 17:29
See SVN rev 19008. This resolves channel mappings for AC3, AAC, DTS, and Vorbis sources for 5.0 and 5.1 content (i.e. no more center channel from right surround speaker). Additional mappings are easy enough to add, just ask, but remember that mapping != mixing. The number of channels in must equal the number of channels out.

This fix does NOT handle up/down/cross-mixing. These will be implemented as a part of the MasterAudio branch project.Ehm... :shocked::shocked::shocked:
You are THE MAN my friend!!!
Now I only need for an updated Smoothvideo version and I'll be able to test everything. Great work, thank you so much!

LinarSavion
2009-03-28, 19:49
See SVN rev 19008. This resolves channel mappings for AC3, AAC, DTS, and Vorbis sources for 5.0 and 5.1 content (i.e. no more center channel from right surround speaker). Additional mappings are easy enough to add, just ask, but remember that mapping != mixing. The number of channels in must equal the number of channels out.

This fix does NOT handle up/down/cross-mixing. These will be implemented as a part of the MasterAudio branch project.

Thanks man!
great work now i can finally use xbmc for all of my movies!

Freddo
2009-03-28, 20:07
Awesome work I've been hoping this would make 9.04! Just one thing though;

Additional mappings are easy enough to add, just ask.

Can you remap eac3 5.1 too please? I did some googling and I think this is the channel order:

0 = FL
1 = C
2 = FR
3 = Surround left
4 = Surround Right

5:x = LFE

source (http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/2007-August/001418.html)

There were some other mappings requested on my TRAC ticket here (http://xbmc.org/trac/ticket/4871) but I'm less fussed about those ones.

phi2039
2009-03-28, 20:38
Whoa. And just like that, the resolution appears.

BTW, phi, I have no idea where you stand on the Mizzou and KU thing, but as an ardent KU supporter, tonight was not a great night. This made it a little better though.

I am a very disappointed Boilermaker... :sad:

phi2039
2009-03-28, 21:51
@Freddo: Unfortuantely I spoke too soon. DVDPlayer doesn't tell us about any codecs other than AAC, AC3, DTS, and Vorbis, so I will need to make changes there as well. That will have to wait until after 9.04. Sorry.

argus
2009-03-28, 23:08
just installed rev19011 and 5.1 isn't fixed for me

center sound is going to front left and front right has no sound on both AC3 and DTS avi's

phi2039
2009-03-29, 00:12
just installed rev19011 and 5.1 isn't fixed for me

center sound is going to front left and front right has no sound on both AC3 and DTS avi's

Please post a log as well as your hardware config. Samples are even better.

Freddo
2009-03-29, 01:35
@Freddo: Unfortuantely I spoke too soon. DVDPlayer doesn't tell us about any codecs other than AAC, AC3, DTS, and Vorbis, so I will need to make changes there as well. That will have to wait until after 9.04. Sorry.

Are you sure about that ? From debuglog playing eac3 files..

20:53:35 T:6460 M:867209216 INFO: ffmpeg: Input #0, matroska, from 'F:\Movies\The Mummy (1999)\The Mummy (1999).mkv':
20:53:35 T:6460 M:867209216 INFO: ffmpeg: Duration: 02:04:53.21, start: 0.000000, bitrate: N/A
20:53:35 T:6460 M:867205120 INFO: ffmpeg: Stream #0.0(eng): Video: vc1, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 tb(r)
20:53:35 T:6460 M:867205120 INFO: ffmpeg: Stream #0.1(eng): Audio: eac3, 48000 Hz, 5.1, s16
20:53:35 T:6460 M:867205120 INFO: ffmpeg: Stream #0.2(eng): Audio: ac3, 48000 Hz, 5.1, s16
20:53:35 T:6460 M:867205120 INFO: ffmpeg: Stream #0.3(eng): Audio: flac, 48000 Hz, 5.1, s16

phi2039
2009-03-29, 02:10
DVDPlayer certainly KNOWS about the codec...it is just not so polite as to pass that information along to the AudioRenderer (us). I will have a look and see what else may break as a result of changing what it passes for EAC3.

Freddo
2009-03-29, 02:36
Ah right, that's a shame but understandable, the number of users using these sorts of exotic codecs (EAC3, DTSMA, Dolby TrueHD) is probably very small so it's no big deal if this can't make 9.04.

phi2039
2009-03-29, 02:51
just installed rev19011 and 5.1 isn't fixed for me

center sound is going to front left and front right has no sound on both AC3 and DTS avi's

I didn't commit one of the modified files, so the fix wasn't actually active yet. Should be good to go now.

phi2039
2009-03-29, 02:53
Ah right, that's a shame but understandable, the number of users using these sorts of exotic codecs (EAC3, DTSMA, Dolby TrueHD) is probably very small so it's no big deal if this can't make 9.04.

Well...it was too easy a fix to leave it broken (although it is hard to tell from the sample if the mappings are correct). You should be good to go now with r19028. It looks like the channel order is the same as Vorbis. Let me know if they are not correct.

Freddo
2009-03-29, 03:51
Wow thanks a lot! Although I've just knackered my HTPC so I can't test it for now, I will rebuild it soon and let you know though.

natethomas
2009-03-30, 08:44
Alright, I've finally been able to test this, and it works GREAT!!! Many thanks!

argus
2009-03-30, 10:37
tested and works perfect! finally i can enjoy true 5.1 on xbmc

thanks for all the effort!

DGMurdockIII
2009-04-19, 21:31
i still want to use stereo sound when using hdmi for sound