Kodi Community Forum
AudioEngine branch - DO NOT REQUEST BINARY BUILDS - 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: AudioEngine branch - DO NOT REQUEST BINARY BUILDS (/showthread.php?tid=78289)



- topfs2 - 2011-07-28

einhänder Wrote:...indeed ccache was responsible.

now the build process stops at:
Code:
make[1]: Leaving directory `/var/tmp/portage/media-tv/xbmc-9999/work/xbmc-9999/xbmc/cores/dvdplayer/DVDSubtitles'
make -C xbmc/cores/AudioEngine
make[1]: Entering directory `/var/tmp/portage/media-tv/xbmc-9999/work/xbmc-9999/xbmc/cores/AudioEngine'
CPP     AEFactory.o
AEFactory.cpp: In static member function ‘static bool CAEFactory::LoadEngine()’:
AEFactory.cpp:45: error: ‘AE_ENGINE_PULSE’ was not declared in this scope
make[1]: *** [AEFactory.o] Error 1

i already checked AEFactory.cpp and AEFactory.h but can't find what could be wrong until now.

I guess you use --disable-pulse? Looks like gnif forgot to ifdef guard it Smile skip the --disable-pulse and use the AE_ENGINE=SOFT var


- einhänder - 2011-07-28

yes i do use the --disable-pulse flag. Smile

i already took a look at the ifdef section in AEFactory.h but thought that it was covered correctly.

Code:
enum AEEngine
{
#ifndef __APPLE__
  AE_ENGINE_NULL,
  AE_ENGINE_SOFT,
#else
  AE_ENGINE_COREAUDIO,
#endif
#ifdef HAS_PULSEAUDIO
  AE_ENGINE_PULSE,
#endif
};

do i miss anything?


- nirmv - 2011-07-28

gnif Wrote:Update

Since topfs2 updated & fixed Pulse Audio support, many of you might have not realized that AE is now using pulse if you have it. Since Pulse does not support pass-through it may be the cause of your issues at the moment. Pulse also doesnt let you select a sound device, that's why the device spinner is reporting none found. (this affects linux only)

I just committed a fix that allows you to choose the engine at start up, to do so, you need to set the environment variable AE_ENGINE to either "PULSE" or "SOFT", it is case insensitive.

Example:
Code:
AE_ENGINE=SOFT ./xbmc.bin

Fixed for me.
Thanks.


- Gryph - 2011-07-29

Loving your work here Gnif, wondering if you could help out a fellow Aussie to where I'm going wrong!

Firstly, here's a log: http://pastebin.ubuntu.com/654158/

All the videos appear to play in fast forward, with no audio - If I play an MP3 or even the navigation sounds they appear to work.

Here's the output of aplay -l
Code:
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

Code:
cat /proc/asound/card1/eld#3.0
monitor_present        1
eld_valid        1
monitor_name        TX-SR707
  
connection_type        HDMI
eld_version        [0x2] CEA-861D or below
edid_version        [0x3] CEA-861-B, C or D
manufacture_id        0xcb3d
product_id        0x72
port_id            0x20000
support_hdcp        0
support_ai        0
audio_sync_delay    0
speakers        [0x4f] FL/FR LFE FC RL/RR RLC/RRC
sad_count        8
sad0_coding_type    [0x1] LPCM
sad0_channels        2
sad0_rates        [0x1ee0] 44100 48000 88200 176400 192000 384000
sad0_bits        [0xe0000] 16 20 24
sad1_coding_type    [0x1] LPCM
sad1_channels        8
sad1_rates        [0x1ee0] 44100 48000 88200 176400 192000 384000
sad1_bits        [0xe0000] 16 20 24
sad2_coding_type    [0x2] AC-3
sad2_channels        8
sad2_rates        [0xe0] 44100 48000 88200
sad2_max_bitrate    640000
sad3_coding_type    [0x7] DTS
sad3_channels        8
sad3_rates        [0xc0] 48000 88200
sad3_max_bitrate    1536000
sad4_coding_type    [0x9] DSD (One Bit Audio)
sad4_channels        6
sad4_rates        [0x40] 48000
sad5_coding_type    [0xa] E-AC-3/DD+ (Dolby Digital Plus)
sad5_channels        8
sad5_rates        [0xc0] 48000 88200
sad6_coding_type    [0xb] DTS-HD
sad6_channels        8
sad6_rates        [0x1ec0] 48000 88200 176400 192000 384000
sad7_coding_type    [0xc] MLP (Dolby TrueHD)
sad7_channels        8
sad7_rates        [0x1480] 88200 192000

In the audio settings I have:-
Custom: hw:CARD=NVidia,DEV=9
Passthrough: hw:CARD=NVidia,DEV=9

But scratching my head from here on in - Happy to shout you a beer for your assistance!

** EDIT **
Okay, I sorted the fast playback out by setting the Passthrough to: HDA NVidia hdmi
I can still play MP3, GUI sounds and AVI movies are fine - Just the rest is missing

** SOLVED Smile **
I added the line into /etc/modprobe.d/nvidia-hdmi.conf
Code:
options snd-hda-intel enable_msi=0 probe_mask=0x108

This changed all my devices around - I could now play DD/DTS/DTS-HD (Don't have any True-HD stuff to test with as yet)
But I lost my MP3, Navigation sounds & AVIs.

Tried a custom .asoundrc and /etc/asound.conf - No luck there.
Using hw:1,9 (as this works in MY profile)

Then it clicked, I logged in via the xbmc profile:
Code:
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

After changing the "Audio Output Device" to "Default"
Passthrough to "hdmi"

Set .asoundrc in the /home/xbmc to:
Code:
pcm.!default {
type hw
card 0
device 3
}

Bingo bango we now have sound - I hope this info helps anyone else sort out their issues.


- einhänder - 2011-07-29

topfs2 Wrote:I guess you use --disable-pulse? Looks like gnif forgot to ifdef guard it Smile skip the --disable-pulse and use the AE_ENGINE=SOFT var

i guess i got it now. Smile

i added a condition in AEFactory.cpp:

Code:
#if defined(__LINUX__) || defined(__APPLE__)
#if defined(HAS_PULSEAUDIO)
  if (getenv("AE_ENGINE"))
  {
    engine = ((CStdString)getenv("AE_ENGINE")).ToUpper();
         if (engine == "PULSE") loaded = CAEFactory::LoadEngine(AE_ENGINE_PULSE);
    else if (engine == "SOFT" ) loaded = CAEFactory::LoadEngine(AE_ENGINE_SOFT);
  }
#endif
#endif
but i'm not quite sure if this is the way to go. but as far as i understand the possibility to set an environment var is only required in case one uses pulseaudio. if one does not use pulseaudio an environment var isn't required at all.

edit: patch if required and reviewed positively: http://pastie.org/2289222


- dado483 - 2011-07-29

gnif Wrote:Since Pulse does not support pass-through it may be the cause of your issues at the moment.

Hi Gnif, there isn't a a development version of pulseaudio that support the pass-through? If yes, that version support pass-through of all version of audio codec or is restricted for the moment only at some audio codec (Ex. simple DD or DTS)?

Thanks!
Davide


- gnif - 2011-07-30

@dado483 - I have heard talk that this is coming, but for all intent and purposes Pulse at current can not do passthrough.

@einhänder - I just pushed in a fix for this.

@Gryph - This comes down to an issue with nVidia cards and HDMI, we cant tell which output is the correct one and you often need a modprobe line to correct it, its not really an issue related to AE at all, but thanks for the information.

@ArtVandelae - Thanks for that, I have merged your pull request.

I am actually on holidays for the next few days, so communication will be rather limited until I get back home.


- Anssi - 2011-07-30

gnif Wrote:@dado483 - I have heard talk that this is coming, but for all intent and purposes Pulse at current can not do passthrough.

Passthrough support was merged into pulseaudio git master in May. It is not supported by stable releases, though.


- gnif - 2011-07-30

@Anssi - I meant, in stable (Natty). When it can, I am sure topfs2 will add support for it Smile


- erhnam - 2011-07-30

@Gryph,

We use a script for xbmc-live to set the modprobe lines during startup. This script only works for Nvidia ION systems at the moment. Patches or comments are welcome.

https://github.com/xbmc/xbmc-live/blob/master/live.d/03-configNVIDIAHDMI.sh


- dado483 - 2011-07-30

Anssi Wrote:Passthrough support was merged into pulseaudio git master in May. It is not supported by stable releases, though.

I've found this: http://cgit.collabora.com/git/user/arun/pulseaudio.git/

Arun is the user that have implemented pass-through in Pulseaudio master branch.
I've not tried the Arun git version yet, as soon as possible i'll try and then i'll post the result with XBMC (hoping that all will works good! Nod)


- topfs2 - 2011-07-30

gnif Wrote:@Anssi - I meant, in stable (Natty). When it can, I am sure topfs2 will add support for it Smile

haha, I most likely will not as I only own analog hw Smile I will gladly help and review patches for it though Smile


- Wanilton - 2011-07-30

Today I compiled the current version of Audio Engine - repository Gnif, and also successfully build, I am using Windows 7, 64-bit, found some errors when using this new build, the main ones were:
When playing shows or movies, with tracks Dolby True HD or DTS HD MA, I'm ok video (no aceleration), but I don´t have any audio, as in the movies with Dolby Digital and DTS audio are all ok (audio and video ok), in music, I can play normally first track, but when passing to the next track, skip 5 or 6 tracks, and plays well again. Recently I ran previous builds with previous versions AE, and usually audios HD ok for me, including DTS HD MA, any changes made ​​in code, is what caused this effect when using in Windows O.S, here is my log. .http://dl.dropbox.com/u/25170804/xbmc.log
The audio when listening to music, when the first run, I still need to press + to increase volume from 0 to 1 dB, so you can hear the audio.
My receiver is onkyo 705 (decoder ok for audio HD), send audio using this configuration:
DIRECTSOUND: AMD HDMI OUTPUT (AMD High Definition), I using ATI Radeon HD 5450 via HDMI for send sound and video to receiver.
I Try use Exclusive Mode, with the same results for me...
In my log i have this about AE:
2:49:40 T:3972 M:1727213568 WARNING: CAEUtil::GuessChLayout - This method should really never be used, please fix the code that called this
Image


- ArtVandelae - 2011-07-30

You shouldn't be using a Directsound device under Windows 7. Try changing it to something without that prefix.


- Sam.Nazarko - 2011-07-31

Can't get this to work. Same issues as when I tried using MPC-HC. I have an ATI card so I used an override because my AVR was reporting Max Supported Channels as 6, bumped that up to 8. DolbyTrueHD will show on my receiver, but video plays very slowly and can't hear sound. DTS-HD MA shows on AMP as DTS and no sound is heard. Ideas? Using HTR80 (Onkyo) and LG 42LD450