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)



- sjongele - 2012-01-16

Hello Gnif,

In thread "XBMC PulseAudio passthrough support (including Nvidia) is available" cbxbiker61 shows his progress on passthrough. He has got DTS HD-MA working (very well!) and is working on TrueHD passthrough, both for Pulse and ALSA. Maybe AE could profit from his good work?


- Philmatic - 2012-01-16

gnif Wrote:Yes, I am back and at it coding

You sir, are a gentleman and a scholar! Welcome back gnif!


- liquidskin76 - 2012-01-16

gnif Wrote:Quick details on whats going on development wise, Team-XBMC have decided that AE will be pushed into master after the Eden release weather its ready or not.

Excellent... can't wait!


- liquidskin76 - 2012-01-16

gnif Wrote:To give an idea on the amount of new code that AE is introducing, there are a total of 16,613 lines in the AudioEngine core alone (includes comments, so subtract a few hundred), that does not include the PAP rewrite nor the hundreds of changes across XBMC required to make it work with AE.

gnif Wrote:The majority of this code I have single handedly written in my spare time with a bit of assistance here and there from other devs for performance and bit-streaming issues.

gnif... you should be very proud of what you have accomplished to date. Keep up the great work.

Cheers


- testmetest - 2012-01-16

gnif Wrote:To give an idea on the amount of new code that AE is introducing, there are a total of 16,613 lines in the AudioEngine core alone

The majority of this code I have single handedly written in my spare time with a bit of assistance here and there from other devs for performance and bit-streaming issues.
Simply astonishing. Thanks for your tremendous work!


- rodercot - 2012-01-17

Hey guys,

I am trying to decipher these audio dropouts. I just watched another bd rip dts-hd and two pretty good dropouts like 50% through the movie. the typical alsa underunn errors in the log, it is attached here

http://pastebin.ca/2103711

I am also attaching as many alsa outputs as I can think of to try and rectify this...all the below info is from the GT 430 I have installed.

Code:
Linux mythlvgrm 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010 i68                                                                                       6 GNU/Linux
Ubuntu 10.04.3 LTS

xbmc@mythlvgrm:/proc$ cd asound
xbmc@mythlvgrm:/proc/asound$ ls
card0  cards  devices  hwdep  meminfo  modules  NVidia  oss  pcm  seq  timers  version
xbmc@mythlvgrm:/proc/asound$ cd card0
xbmc@mythlvgrm:/proc/asound/card0$ ls
codec#3  eld#3.0  id  oss_mixer  pcm3p
xbmc@mythlvgrm:/proc/asound/card0$ cd pcm3p
xbmc@mythlvgrm:/proc/asound/card0/pcm3p$ ls
info  sub0  xrun_debug
xbmc@mythlvgrm:/proc/asound/card0/pcm3p$ cd sub0
xbmc@mythlvgrm:/proc/asound/card0/pcm3p/sub0$ ls
hw_params  info  prealloc  prealloc_max  status  sw_params
xbmc@mythlvgrm:/proc/asound/card0/pcm3p/sub0$ cat hw_params
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 176
buffer_size: 5632
xbmc@mythlvgrm:/proc/asound/card0/pcm3p/sub0$ cat info
card: 0
device: 3
subdevice: 0
stream: PLAYBACK
id: HDMI 0
name: HDMI 0
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 0
xbmc@mythlvgrm:/proc/asound/card0/pcm3p/sub0$ cat status
state: RUNNING
owner_pid   : 2582
trigger_time: 97715.873030773
tstamp      : 100450.705703767
delay       : 5357
avail       : 275
avail_max   : 5610
-----
hw_ptr      : 120606915
appl_ptr    : 120612272
xbmc@mythlvgrm:/proc/asound/card0/pcm3p/sub0$ cat prealloc
64
xbmc@mythlvgrm:/proc/asound/card0/pcm3p/sub0$ cat prealloc_max
32768
xbmc@mythlvgrm:/proc/asound/card0/pcm3p/sub0$ cat sw_params
tstamp_mode: NONE
period_step: 1
avail_min: 176
start_threshold: 2147483647
stop_threshold: 5632
silence_threshold: 0
silence_size: 1476395008
boundary: 1476395008
xbmc@mythlvgrm:/proc/asound/card0/pcm3p/sub0$ cd ..
xbmc@mythlvgrm:/proc/asound/card0/pcm3p$ cd ..
xbmc@mythlvgrm:/proc/asound/card0$ ls
codec#3  eld#3.0  id  oss_mixer  pcm3p
xbmc@mythlvgrm:/proc/asound/card0$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
xbmc@mythlvgrm:/proc/asound/card0$ cd ~
xbmc@mythlvgrm:~$ cat /proc/asound/cards
0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfaf7c000 irq 18
xbmc@mythlvgrm:~$ ls -F /proc/asound/card0
codec#3  eld#3.0  id  oss_mixer  pcm3p/
xbmc@mythlvgrm:~$ ls -F /proc/asound/card0/codec#3
/proc/asound/card0/codec#3
xbmc@mythlvgrm:~$ cat /proc/asound/card0/codec#3
Codec: Nvidia GPU 14 HDMI/DP
Address: 3
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x10de0014
Subsystem Id: 0x10de0101
Revision Id: 0x100100
No Modem Function Group found
Default PCM:
    rates [0x0]:
    bits [0x0]:
    formats [0x0]:
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x04 [Audio Output] wcaps 0x72b1: 8-Channels Digital Stripe CP
  Device: name="HDMI 0", type="HDMI", device=3
  Converter: stream=6, channel=0
  Digital: Enabled GenLevel
  Digital category: 0x2
  PCM:
    rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
    bits [0xe]: 16 20 24
    formats [0x5]: PCM AC3
  Unsolicited: tag=00, enabled=0
Node 0x05 [Pin Complex] wcaps 0x407381: 8-Channels Digital CP
  Control: name="IEC958 Playback Con Mask", index=0, device=0
  Control: name="IEC958 Playback Pro Mask", index=0, device=0
  Control: name="IEC958 Playback Default", index=0, device=0
  Control: name="IEC958 Playback Switch", index=0, device=0
  Control: name="ELD", index=0, device=3
  Pincap 0x09000094: OUT Detect HBR HDMI DP
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=05, enabled=1
  Connection: 1
     0x04
xbmc@mythlvgrm:~$ cat /proc/asound/card0/eld#2.0
cat: /proc/asound/card0/eld#2.0: No such file or directory
xbmc@mythlvgrm:~$ cat /proc/asound/card0/eld#3.0
monitor_present         1
eld_valid               1
monitor_name            DENON-AVAMP

connection_type         HDMI
eld_version             [0x2] CEA-861D or below
edid_version            [0x3] CEA-861-B, C or D
manufacture_id          0xee11
product_id              0xa
port_id                 0x40000
support_hdcp            0
support_ai              0
audio_sync_delay        0
speakers                [0x5f] FL/FR LFE FC RL/RR RC RLC/RRC
sad_count               8
sad0_coding_type        [0x1] LPCM
sad0_channels           8
sad0_rates              [0x1ee0] 32000 44100 48000 96000 176400 192000 384000
sad0_bits               [0xe0000] 16 20 24
sad1_coding_type        [0x7] DTS
sad1_channels           6
sad1_rates              [0x6c0] 44100 48000 96000 176400
sad1_max_bitrate        1536000
sad2_coding_type        [0x2] AC-3
sad2_channels           6
sad2_rates              [0xe0] 32000 44100 48000
sad2_max_bitrate        640000
sad3_coding_type        [0xb] DTS-HD
sad3_channels           8
sad3_rates              [0x1ec0] 44100 48000 96000 176400 192000 384000
sad4_coding_type        [0xa] E-AC-3/DD+ (Dolby Digital Plus)
sad4_channels           8
sad4_rates              [0xc0] 44100 48000
sad5_coding_type        [0xc] MLP (Dolby TrueHD)
sad5_channels           6
sad5_rates              [0x1ec0] 44100 48000 96000 176400 192000 384000
sad6_coding_type        [0xc] MLP (Dolby TrueHD)
sad6_channels           8
sad6_rates              [0x6c0] 44100 48000 96000 176400
sad7_coding_type        [0x9] DSD (One Bit Audio)
sad7_channels           6
sad7_rates              [0x40] 44100
xbmc@mythlvgrm:~$

sorry for the long post but I am ready to take a sledgehammer to this machine. I have tried a 210, 220, 430 and 520 gt cards and they all preducr some kind of audio dropout.

Thanks,

Dave


- gnif - 2012-01-17

@rodercot, please provide a sample file and I will attempt to replicate the issue here.


- gnif - 2012-01-17

Another update... allready!

Fixes
* Fixed another AE issue with the sound device being reopened when it was already in a compatible format.
* Better handling of situations with multiple RAW and normal streams that could cause deadlocks
* Fixed random deadlock on playback stop or application termination during playback.

New Feature!
PAP now handles pass-through, get testing people! Big Grin

Edit:
* Bug detected in new PAP pass-through already, the track position is running too fast, but otherwise it works great for me

I would also like to know if people are noticing an audible difference with running AE... I am by no means an audiophile, I am only doing this for fun and to fully take advantage of my HiFi equipment.


- Hack_kid - 2012-01-17

hey grif, been awaiting your return, horay! anyways, have you worked out the 24htz and audio sync issue yet? everyone was saying AE would be the golden bullet for it but it seems still present for me. well there is a patch in this same sub forum about a global av delay based on refresh rate, you should try incorporate that into AE, it works beautifuly i just set 24htz to 250ms delay and 60htz to 0ms and i'm golden. also can you try and include dual audio out. i dont want it cuz of the dumb reason of using my tvs shitty speakers i want it because i have a Zone 2 speaker setup out on my porch and i listen to a lot of music, my Onkyo TX-NR609 supports outputing 1 source to botuh zones at the same time but only analog connections it wont do it with the HDMI audio (most AVRs are this way now a days) so to get it to work u simply connect audio to the analog autio in of whatever input your on, well in xbmc linux you can only have one audio device selected at a time, see the issue? i userstand there is no way to have the audio in sync, but thats a moot point, i dont think ANYONE is trying to use anolog and digital signals IN THE SAME ROOM AT THE SAME TIME, (not yelling Smile just i think a lot of peoiple miss this point) maybe the same room but not at the same time its either 1 or the other or both but in two different locations.

anyways compiling tonight so i can TEST TEST TEST

oh ps, that guy asking about Betas he doesnt get the release structure of xbmc, most people use nightlys but dont get the whole milestone release thing so when they download eden they expect it to be way different then the nightlys when all it is is a bugfree nightly, then right after stable eden the nightlies get good


- MaDeMaNN - 2012-01-17

Can someone help i keep trying to compile but i get this error. Thanks for helping
1>InitializeBuildStatus:
Creating "XBMC\Release (DirectX)\objs\XBMC.unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
Performing Custom Build Tools
20120117-f5239e6
1 file(s) copied.
FC: cannot open ..\..\XBMC\WIN32\GIT_REV.H - No such file or folder

1 file(s) copied.

http://pastebin.com/vCcBfW5K


- mylle - 2012-01-17

dado483 Wrote:Hi all,

using the latest gnif updates, i've merged opdenkamp git and gnif git in a new branch.

For checkout it, use this command:

git clone -b AE-betaEden git://github.com/dado483/xbmc.git

Happy testing

Davide

Hi Davide,

Im trying to compile from your branch but its failing. Any idea what wrong?

http://pastebin.com/5bfzf1CQ

regards
Jacob


- gnif - 2012-01-17

@Hack_kid
1) Thanks for the support
2) Please in future make your posts readable, use punctuation, paragraph breaks, and capitalisation.
3) NO DUAL AUDIO, read the thread history
4) Please detail this 24bit issue so I can investigate

@mylle
Wrong place to ask, please PM him or start a thread related to his branch, this thread has gone WAY off topic and needs to come back to pure AE related discussion only.

@MaDeMaNN
Windows build may be broken, if you cant fix it yourself you shouldn't be using AE at all.


- gnif - 2012-01-17

Just a quick heads up, latest commit that introduces CAEBitstreamPacker breaks bit streaming, will update when it is fixed


- Hack_kid - 2012-01-17

Sorry on a mobile phone.

Not 24 bit, 24htz, as in refresh rate. With 24p/htz matierial there's is an audio sync issue, it always needs a 250ms delay in the audio to be in sync. 60htz/p matierial needs no delay. So a user named a11599 I think made a patch that via adancedsettings allows you to set global a/v delays based on refreshrate, the patch is a few threads down.

Do you think you can incorporate that into AE as the issue is still present in latest AE git


- liquidskin76 - 2012-01-17

gnif Wrote:4) Please detail this 24bit issue so I can investigate

Hey gnif,

As Hack_kid mentioned, it's 24htz (23.976htz actually) material, like blu-ray backups. More specifically, it's when using the 'Adjust display refresh rate to match video' setting and bitstreaming audio (like TrueHD and DTS-HD). It's out of sync by around 200/250ms.

I believe when decoding audio instead of bitstreaming, the issue isn't present.

Cheers