5,594,805 Members 37,204 Now Online
XDA Developers Android and Mobile Development Forum

[FIX] Galaxy Nexus GSM low latency audio playback

Tip us?
 
vonVideo
Old
(Last edited by vonVideo; 14th July 2012 at 03:32 PM.) Reason: status
#1  
Senior Member - OP
Thanks Meter 135
Posts: 113
Join Date: May 2012
Default [FIX] Galaxy Nexus GSM low latency audio playback

In my opinion one of the main flaws of the Android ICS OS the big audio playback latency - about 88 ms. This impacts negatively many applications that emulate musical instruments and the ones that do VOIP like Skype or Google Talk. For VOIP apps the audio lag also has a negative impact on acoustic echo cancellation - probably the most difficult feature to implement on an Android phone. In spite of many user protests and requests apparently Google has chosen not to do anything about it.

This is a similar thread to the one started by "Windows X":
http://forum.xda-developers.com/show....php?t=1621914
but the solution is applicable to the Google Galaxy Nexus GSM phone ( or with custom ROMs based on ICS 4.0.4 GSM (maguro))

The attached package should be used only by experienced users that can eventually restore their system to the original state. I tested it only on ICS 4.0.4 GSM phone build IMM76I (maguro). In this configuration it worked flawlessly as far as I could test it. Other successful testing reports coming for CM9 Nightly Builds, AOKP and rascream maguro ROMs.
The latency after aplying it should be about 20 ms - as reported by the "Caustic 2" app.

Change log:
Original package replaced by "lowlatsnd_inst.zip"
To restore to original state you may use "lowlatsnd_rest.zip" or other restore methods if necessary.

Status: stable
Note: applying this might reverse changes made in other mods.
Attached Files
File Type: zip lowlatsnd_inst.zip - [Click for QR Code] (168.7 KB, 1639 views)
File Type: zip lowlatsnd_rest.zip - [Click for QR Code] (122.8 KB, 782 views)
The Following 29 Users Say Thank You to vonVideo For This Useful Post: [ Click to Expand ]
 
AfzalivE
Old
#2  
Member
Thanks Meter 14
Posts: 80
Join Date: Aug 2010
consider submitting to AOSP once you're sure it's stable
Google Nexus 4
4.2 Rooted Boot-Unlocked
Google Galaxy Nexus
4.2 Rooted Boot-Unlocked
 
vonVideo
Old
#3  
Senior Member - OP
Thanks Meter 135
Posts: 113
Join Date: May 2012
Actually I think it is pretty stable, but I tested it only on my ICS 4.0.4 GSM phone build IMM76I.
 
zimphishmonger
Old
#4  
zimphishmonger's Avatar
Senior Member
Thanks Meter 741
Posts: 3,865
Join Date: Jun 2009
Quote:
Originally Posted by vonVideo View Post
Actually I think it is pretty stable, but I tested it only on my ICS 4.0.4 GSM phone build IMM76I.
Ill be trying on AOKP later today, but as its just a modified AOSP, I dont expect any issues. Nice find!
| Device: LG Nexus 4 | Morfic's Trinity or Bricked Kernels |

| Device: Google Nexus7 | Trinity Kernel |

 
Serious_Beans
Old
#5  
Serious_Beans's Avatar
Senior Member
Thanks Meter 343
Posts: 2,307
Join Date: Feb 2011
Location: New York

 
DONATE TO ME
Quote:
Originally Posted by vonVideo View Post
In my opinion one of the main flaws of the Android ICS OS the big audio playback latency - about 88 ms. This impacts negatively many applications that emulate musical instruments and the ones that do VOIP like Skype or Google Talk. For VOIP apps the audio lag also has a negative impact on acoustic echo cancellation - probably the most difficult feature to implement on an Android phone. In spite of many user protests and requests apparently Google has chosen not to do anything about it.

This is a similar thread to the one started by "Windows X":
http://forum.xda-developers.com/show....php?t=1621914
but the solution is applicable to the Google Galaxy Nexus GSM phone.

The attached package is in an experimental stage and should be used only by experienced programmers that can eventually restore their system to the original state. I tested it only on ICS 4.0.4 GSM phone build IMM76I.
The latency after aplying it should be about 20 ms - as reported by the "Caustic 2" app.
So that's why I have an echo on almost all of my phone calls and voip apps?
Is this a flashable zip or something you have to include before compiling?
 
vonVideo
Old
(Last edited by vonVideo; 26th May 2012 at 08:11 PM.)
#6  
Senior Member - OP
Thanks Meter 135
Posts: 113
Join Date: May 2012
It is a flashable zip.
The big audio playback latency is one of the reasons for echo cancellation poor performance.
The Following User Says Thank You to vonVideo For This Useful Post: [ Click to Expand ]
 
aeoveu
Old
(Last edited by aeoveu; 26th May 2012 at 09:19 PM.)
#7  
Senior Member
Thanks Meter 70
Posts: 470
Join Date: Nov 2010
I'm guessing it's possible to manually paste these files into the phone via some form of root explorer, right?

Since I'm new to the GN (had a Desire before), is it possible for you to create a flashable version of the stock files which will get replaced, as a precaution, please? Backing up and restoring takes quite a while (some minutes vs. a few seconds compared to a patch )

Edit: maybe I haven't noticed it, but I'm on 4.0.4 update 2 (forgot the exact build number - as I said, I'm new to the GN ) so... where exactly (or rather, how) can I spot the differences before and after applying the patches?
 
vonVideo
Old
(Last edited by vonVideo; 26th May 2012 at 09:56 PM.)
#8  
Senior Member - OP
Thanks Meter 135
Posts: 113
Join Date: May 2012
Actually I have included in the zip the original libraries too with the extension ".orig" for ICS 4.0.4
They may work on 4.0.2 too, but I did not test them. You can copy your original libraries for example in /data/local/tmp/ and restore them later if you need by mounting system rw...
The Following User Says Thank You to vonVideo For This Useful Post: [ Click to Expand ]
 
nmesisca
Old
#9  
nmesisca's Avatar
Recognized Developer
Thanks Meter 65
Posts: 530
Join Date: Nov 2007
Location: Dublin

 
DONATE TO ME
Tested this on the Modaco ROM ..
Seems to break system sounds. Music doesnt play anymore.
Phone calls still work though...
Caustic 2 does say 20ms latency..
going back to stock for now but sure deserves attention..
--------------------------------------
LGE Nexus 5
Twitter
 
vonVideo
Old
#10  
Senior Member - OP
Thanks Meter 135
Posts: 113
Join Date: May 2012
Unfortunately I don't know the Modaco ROM. On ICS 4.0.4 it works flawlessly with any sound source I tested so far.

Tags
echo cancellation, latency, maguro, nexus
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes