Audio Output Chain Fixes?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
gnif Offline
Team-XBMC Developer
Posts: 442
Joined: Feb 2008
Reputation: 34
Location: Australia, Katoomba
Lightbulb  Audio Output Chain Fixes? Post: #1
After struggling to get channel mapping correct for all outputs of an realtime ac3 encoded stream, it has become obvious that the audio system is fatally flawed.

I have started to work on fixing it, and I have already got all the DVDPlayer audio codecs working with the new renderer api, and things are working real nice.

What I have done is changed the iChannels parameter to a bitmask of channels instead. When the renderer is opened, the codec returns a bitmask for the renderer. This makes it possible to map 3.0 output with either lfe or center for the third channel.

To make the renderer work, I have modified ALSA to open as many channels as it needs to map the channels to them... ALSA's channel order is FL, FR, RL, RR, CE, LFE... but with 3.0 we need FL, FR, CE... so we have to open 5 channels, sending nothing to RL and RR so that we can send CE out on the correct channel.

The audio renderes now EXPECT the mapping to be one or more of FL, FR, RL, RR, CE, LFE, this means that we remove all the codec checks for mapping, as the codec must output it correct.

I have also updated the codecs to output the standard format, including detection of 3.0 with lfe or center for ac3.

I am not scared of SVN - Cutting my hands open on the bleeding edge.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #2
Sounds good.

I'd strongly recommend chatting with phi2039 before you get too far along. He's put quite a bit of work thus far into the masteraudio branch, and so any discussion should really take place in that context. No point doing things twice Smile

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
gnif Offline
Team-XBMC Developer
Posts: 442
Joined: Feb 2008
Reputation: 34
Location: Australia, Katoomba
Post: #3
Actually, the master-audio branch has only minor modifications to it. I know he has a whole DSP thing he wants, but that is a long way off, this is more of a fix for the poor multi channel support.

I am not scared of SVN - Cutting my hands open on the bleeding edge.
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,595
Joined: Sep 2003
Reputation: 9
Location: Sweden
Lightbulb  Braintrust... Post: #4
jmarshall Wrote:I'd strongly recommend chatting with phi2039 before you get too far along. He's put quite a bit of work thus far into the masteraudio branch, and so any discussion should really take place in that context. No point doing things twice Smile
@gnif, you should also talk with Topfs2 who also have mentioned grander plans for the audio chain Wink

...and of course elupus who is Team-XBMC's DVDPlayer guru Nerd

Try to catch them all on IRC (#xbmc on freenode) for a chat / brainstorming session Nod

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
gnif Offline
Team-XBMC Developer
Posts: 442
Joined: Feb 2008
Reputation: 34
Location: Australia, Katoomba
Post: #5
Well, for those that don't already know, I am working on the masteraudio branch with phi, who has already done a tremendous job so far.

To give people an idea of whats going on... over the weekend phi got the branch rendering audio, re-sampling, and matrix mixing. There is still a fair amount to do, for example, the audio sync on video's is terrible at the moment, and it is missing alot of the DSP chains it initially will need to replicate the current XBMC functionality.

So, this is where I come in... I have implemented so far four filters, one is just a base class for LPCM streams, two are simple test filters (De/Re-Interleave), and the last... and imho the coolest, an AC3Encoder!

It wont be too long before most things will be working, I hope everyone is excited about this as I am Smile

I am not scared of SVN - Cutting my hands open on the bleeding edge.
(This post was last modified: 2009-05-26 06:47 by phi2039.)
find quote
topfs2 Offline
Team-XBMC Developer
Posts: 3,825
Joined: Dec 2007
Reputation: 8
Post: #6
gnif Wrote:It wont be too long before most things will be working, I hope everyone is excited about this as I am Smile

I am for sure as excited as you Smile

It's going to be so nice to have such advanced abstraction to the audio hardware throughout the plattforms, and having DSP in that is going to make XBMC audiophile worthy.

Also when MasterAudio is merged I hope to alter PAPlayer so it can do proper bitperfect playback aswell.

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
find quote