Kodi Community Forum
Testing audio engine ActiveAE - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: Testing audio engine ActiveAE (/showthread.php?tid=170338)



RE: Testing audio engine ActiveAE - gjwAudio - 2014-03-15

@FernetMenta

Thank you for the informative reply. I understand better the issues and how to achieve a solution to my problem.
Quote:In the meantime you can build XBMC yourself and change the code to you needs. Not a big to to build XBMC from source. I am happy to assist you with the necessary code change.
Thanks for your generous offer. Since I run xbmc via OpenELEC (and Me-No-Linux - my experience is confined to the Windows world), the prospect of successfully compiling a suitable fix is intriguing... and downright scary too !

Can you suggest where I research the tools & necessary resources for rolling my own build ?

EDID:
I don't think asking the manufacturer will lead to anything useful. Is there a command I can run to capture and display the EDID coming from my AVR ?

Cheers. I really appreciate your help.
Grant


RE: Testing audio engine ActiveAE - FernetMenta - 2014-03-15

AFAIK you need a Linux machine for building OpenElec.
Do you have a chance to test on Windows? This way we could narrow it down somehow.

Check out this thread on the OE forum about EIDD:
http://openelec.tv/forum/68-audio/65894-fixed-hd-audio-my-guide-to-edid-editing


RE: Testing audio engine ActiveAE - gjwAudio - 2014-03-17

@FernetMenta

Thank you for the link to the EDID discussion. Heh-heh, now I remember stumbling upon that thread when searching for a way to override the video info coming from my AVR (Anthem D2).

When D2 was first connected, the option to set xbmc's resolution for 1920x1080@60p disappeared from the dropdown list (video worked fine with TV connected directly), and the culprit identified was "funky EDID" coming from the D2. I found an example somewhere for Intel, and cobbled together this xorg.conf file:

Code:
Section "Device"
  Identifier  "Device0"
  Driver      "intel"
  VendorName  "INTEL Corporation"
EndSection

Section "Screen"
  Identifier  "Screen0"
  Device      "Device0"
  Monitor     "HDMI2"
  DefaultDepth  24
  SubSection "Display"
    Depth       24
    Modes     "[email protected]" "1920x1080@24p" "1920x1080@60p"
  EndSubSection
EndSection

Section "Monitor"
  Identifier  "HDMI2"
  HorizSync   14.0 - 70.0
  VertRefresh 24.0 - 62.0
  Option      "DPMS" "true"
  Modeline    "1920x1080@24p"     74.230 1920 2560 2604 2752 1080 1084 1089 1125 +hsync +vsync
  Modeline    "1920x1080@50p"    148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
  Modeline    "[email protected]" 148.352 1920 1960 2016 2200 1080 1082 1088 1125 +hsync +vsync
  Modeline    "1920x1080@60p"    148.500 1920 2008 2056 2200 1080 1084 1089 1125 +hsync +vsync
EndSection

Section "Extensions"
  # fixes tearing
  Option      "Composite"           "Disable"
EndSection

It seems to cure the output resolution roadblock, but I'm open to suggestions for improvement. Given that the D2 has an excellent Gennum GF9350 VXP image processor, I assume it would announce its capabilities correctly, but so far it's not that elegant. Upgrading to Gotham nightlies didn't help the res selection limitation, so the override remains in my system - I hope it's not impacting the audio data received through EDID.

But that's video stuff, and we're talking about getting four audio channels to play, as four channels.

Reading through that discussion, the similarity to my issue struck me, and when chewitt stated (in this post):

Quote:The major revolution in Eden was that AudioEngine stopped blindly trusting filesystem config files and started evaluating how hardware was presented in the OS so that autoconfiguration worked properly. I'd wager an educated guess that after 2.99.2 the XBMC devs fixed bugs so AudioEngine correctly detects the incorrect/bad EDID and configures itself appropriately - over time we have seen many AVR's and TV's with bad EDID and while current AE is not perfect it's stable and rarely to blame for this kind of thing.
...a new angle came to mind: Is it possible xbmc makes the wrong output choice - based on the info sent (or not being sent) by my D2 ?

You configure 3.0 as 5.1 due to ALSA mapping requirements, OK. Is there a check in the ALSA driver stage for compatible formats at the receiving end - I presume so - and here may be a point of failure.

I know for a fact the D2 does not support 4-CH PCM (FL,FR,BL,BR), and yet xbmc somehow decides this is the correct format for HDMI output. ALSA may like FL,FR,BL,BR - but Anthem doesn't see it (...and the D2 defaults to the first two channels, FL & FR). In this case, should xbmc choose 5.1 format ?

Clearly, I need to corral the EDID coming from the D2, then answers can be found. I read the wiki entry on Creating & Using EDID.BIN, but it looks like a procedure I can't use on OE (maybe I'm wrong). I hope somebody can direct me how to extract the EDID.BIN being used by my Intel Sandy Bridge NUC, under OpenELEC.

Quote:AFAIK you need a Linux machine for building OpenElec.

Hmmmm... no Linux machine here. Uh-oh.

Quote:Do you have a chance to test on Windows? This way we could narrow it down somehow.

I appreciate alternative the suggestion. Windows XP desktop here (Luddite - yes, I know) and no HDMI on that machine. Double uh-oh.

Thanks again, for playing Smile
Grant


RE: Testing audio engine ActiveAE - FernetMenta - 2014-03-17

Quote:I know for a fact the D2 does not support 4-CH PCM (FL,FR,BL,BR), and yet xbmc somehow decides this is the correct format for HDMI output. ALSA may like FL,FR,BL,BR - but Anthem doesn't see it (...and the D2 defaults to the first two channels, FL & FR). In this case, should xbmc choose 5.1 format ?

If you don't have configured fixed mode, XBMC tries to open the channels layout with best match to the input stream. In case this is FL,FR,BL,BR which also matches ALSA channel map, we try to open this layout. If the audio device does not support this format, ALSA should fail opening. Then we try the next layout which would be 5.1 in this case.


RE: Testing audio engine ActiveAE - gjwAudio - 2014-03-17

(2014-03-17, 13:26)FernetMenta Wrote: If you don't have configured fixed mode, XBMC tries to open the channels layout with best match to the input stream. In case this is FL,FR,BL,BR which also matches ALSA channel map, we try to open this layout.

Yes, understood and agreed.

Quote:If the audio device does not support this format, ALSA should fail opening. Then we try the next layout which would be 5.1 in this case.

And my question now: Why has this failed for me ? Why does ALSA think the audio device supports 4-CH format ?

Please suggest my next step to investigate.

Thank you for patience and persistence Smile
Grant


RE: Testing audio engine ActiveAE - kyungrak - 2014-03-17

Hello,

this little note just to report beta 2 solved my issue. No more freezing when I have playlist with different sample rates music files. Smile


RE: Testing audio engine ActiveAE - FernetMenta - 2014-03-17

(2014-03-17, 15:14)kyungrak Wrote: Hello,

this little note just to report beta 2 solved my issue. No more freezing when I have playlist with different sample rates music files. Smile

Glad to hear. Thanks for reporting back.


RE: Testing audio engine ActiveAE - FernetMenta - 2014-03-17

(2014-03-17, 13:57)gjwAudio Wrote: Please suggest my next step to investigate.

Thank you for patience and persistence Smile
Grant

I would install Windows on this machine and do the test. Then we would know if it's a driver issue.


RE: Testing audio engine ActiveAE - kyungrak - 2014-03-17

Hello again,

I've just noticed that 24bit audio files are seen as 32bit audio files. Not a real issue but could be of interest to you FernetMenta.


RE: Testing audio engine ActiveAE - FernetMenta - 2014-03-17

(2014-03-17, 15:56)kyungrak Wrote: Hello again,

I've just noticed that 24bit audio files are seen as 32bit audio files. Not a real issue but could be of interest to you FernetMenta.

already fixed but not merged: https://github.com/xbmc/xbmc/pull/4432


RE: Testing audio engine ActiveAE - gjwAudio - 2014-03-18

(2014-03-17, 15:34)FernetMenta Wrote: I would install Windows on this machine and do the test. Then we would know if it's a driver issue.

"Houston... I think we have a (driver) problem"

@FernetMenta

Way to Go ! What an excellent suggestion - to run the test audio files on a Windows install of xbmc. Fortunately I was able to borrow a victim laptop today. Results point the finger at the ALSA driver in OE (if I understand the logic flow correctly).

Test Setup:
Asus X502C - i3-3217U, 4 GB RAM, Intel HD 4000 graphics, Win 8.1, vanilla xbmc (Gotham b2, no added plugins or tweaks) > HDMI > Anthem Statement D2 > Samsung PN51E6500.

Audio Settings:
  • Audio output device - WASAPI: D2 on HDMI
  • Number of channels - 5.1
  • Output configuration - Optimized
EDID gets through to Windows announcing these capabilities:

Image

Image

The usual three MCH-FLAC files were tested (3.0, 4.0 and 5.1). Both 3.0 and 4.0 files were sent as 5.1, and played successfully through the D2. The 5.1 file played through all speakers as anticipated.

Conclusion:
Something is wrong in the OE implementation of xbmc, allowing it to make an "illegal/invalid" output choice for the 4.0 file.

How to track down the failure point in OE ?

Thanks again,
Grant


RE: Testing audio engine ActiveAE - fritsch - 2014-03-18

There is no "OE implementation" of xbmc. If ALSA opens that mask, then that's a driver problem and should be reported upstream to the ALSA devs.


RE: Testing audio engine ActiveAE - gjwAudio - 2014-03-18

(2014-03-18, 09:07)fritsch Wrote: There is no "OE implementation" of xbmc. If ALSA opens that mask, then that's a driver problem and should be reported upstream to the ALSA devs.

Hi fritsch,

Thank you for chiming in with clarification. Please excuse my vague understanding of OE internals and building blocks, I guess I misunderstood when reading here. I'm learning every day, and just trying to chase down my audio problem.

Where do I go, to report this issue to the ALSA devs ?

Thanks for you help,
Grant


RE: Testing audio engine ActiveAE - bibi - 2014-03-18

There : https://bugs.launchpad.net/bugs/bugtrackers/alsa-mantis


RE: Testing audio engine ActiveAE - gjwAudio - 2014-03-21

@bibi - Thanks for the link.


Q1: Is it possible that my issue could be affected by different Intel HD graphics driver(s) ?

I ask because the successful test using Windows/xbmc ran on HD 4000 graphics, and the OE code is running on HD 2000 (NUC 847 Celeron).

EDIT:
Q2: where can I find the method to extract incoming EDID info on Intel NUC platform ? Reading this thread describes a process for nVidia, so I'm asking what variations would make it run for Intel.

Thank you (all) for your assistance.

Cheers,
Grant