5,599,616 Members 44,876 Now Online
XDA Developers Android and Mobile Development Forum

[FIX] Galaxy Nexus GSM low latency audio for Jelly Bean

Tip us?
 
vonVideo
Old
(Last edited by vonVideo; 10th December 2012 at 02:42 PM.) Reason: Volume Boost
#1  
Senior Member - OP
Thanks Meter 135
Posts: 113
Join Date: May 2012
Default [FIX] Galaxy Nexus GSM low latency audio for Jelly Bean

One of the flaws of the new Android Jelly Bean OS compared to iOS is the big audio playback latency - about 48 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. I have to mention that Google improved from ICS where the playback latency was about 88 ms.

This is a similar thread to:
http://forum.xda-developers.com/show....php?t=1674836
but applies to Jelly Bean.

The attached package should be used only by experienced users that can eventually restore their system to the original state. I tested it on Android 4.1.1 GSM phone build JRO03C (maguro) and 4.1.2 build JZ054K.
The latency after aplying it should be 18 ms (no longer 11 ) with the new version - as reported by the "Caustic 2" app.
It does NOT work on Android 4.2!

Apps like Google Talk, Skype, YouTube, Play Music, Caustic 2, Pandora, TheDrum, My Piano... work very well with this change.
With the newest version all the apps I tested that work well with stock Jelly Bean work well with this patch, with the additional advantage of lower latency.

Status: stable (install and use at own risk)
Notes:
1) applying this might reverse changes made in other mods.
2) The "SCREEN OFF" BUG is FIXED as of July 16th night.

To install use "lowlatsnd41_18_inst.zip"
To restore to original state you may use "lowlatsnd41_rest.zip" or other restore methods if necessary.
Do not run the install twice in a row (run one install then one restore; you have to run restore only if you want to uninstall or before installing a new version when available...).

Since the volume is still a big issue for the Galaxy Nexus users I decided to address this with a Volume Boost patch.
Status: stable ( for 4.1, not tested in 4.2). Install and use at own risk...
The same rules for install/restore apply.

General comment: system updates may delete the backup of the original files; therefore the "restore" should be ran before an update followed by a new install after the update; restoring the original files is also required if the update performs sum checks.
Attached Files
File Type: zip lowlatsnd41_rest.zip - [Click for QR Code] (122.8 KB, 1612 views)
File Type: zip lowlatsnd41_18_inst.zip - [Click for QR Code] (252.2 KB, 2790 views)
File Type: zip volumeboost_inst.zip - [Click for QR Code] (129.4 KB, 461 views)
File Type: zip volumeboost_rest.zip - [Click for QR Code] (122.8 KB, 241 views)
The Following 61 Users Say Thank You to vonVideo For This Useful Post: [ Click to Expand ]
 
Megatr0n.
Old
(Last edited by Megatr0n.; 16th July 2012 at 11:33 PM.)
#2  
Megatr0n.'s Avatar
Senior Member
Thanks Meter 13
Posts: 127
Join Date: Sep 2011
I just installed it and my latency went from 168 ms to 18 ms in caustic 2.

Major ISSUE: When the screen is off audio is incredibly distorted (slowed down an incredible amount) when playing music through headphones. It seems to work fine when the screen is on, though.

I restored using your restore file and caustic 2 now reports my latency as 48 ms and music plays fine when the screen is off, too. Ha, I'm going to test to see if people still complain about horrible echo and delay when making GrooveIP calls over t-mobile 4G.

Thanks!
The Following User Says Thank You to Megatr0n. For This Useful Post: [ Click to Expand ]
 
vonVideo
Old
#3  
Senior Member - OP
Thanks Meter 135
Posts: 113
Join Date: May 2012
Quote:
Originally Posted by Megatr0n. View Post
I just installed it and my latency went from 168 ms to 18 ms in caustic 2.

Major ISSUE: When the screen is off audio is incredibly distorted (slowed down an incredible amount) when playing music through headphones. It seems to work fine when the screen is on, though.

I restored using your restore file and caustic 2 now reports my latency as 48 ms and music plays fine when the screen is off, too. Ha, I'm going to test to see if people still complain about horrible echo and delay when making GrooveIP calls over t-mobile 4G.

Thanks!
Bug confirmed... I'm working on it...
 
leets4uc3
Old
#4  
leets4uc3's Avatar
Senior Member
Thanks Meter 234
Posts: 889
Join Date: Jun 2010

 
DONATE TO ME
Is the distortion due to the limited clock speed?


Sent from my Galaxy Nexus using xda premium
DO YOU LIKE ELECTRO, DUBSTEP, HIP-HOP, HOUSE, ETC?
High in protein and bass

 
Megatr0n.
Old
#5  
Megatr0n.'s Avatar
Senior Member
Thanks Meter 13
Posts: 127
Join Date: Sep 2011
Quote:
Originally Posted by leets4uc3 View Post
Is the distortion due to the limited clock speed?


Sent from my Galaxy Nexus using xda premium
My GNex is running at 1536 Mhz CPU / 384 Mhz GPU w/ franco's kernel. Could that be causing my issues when the screen's off? Or did you mean that the issue is caused by the SOC clocking down by the scheduler to save power when the screen is off?
 
leets4uc3
Old
#6  
leets4uc3's Avatar
Senior Member
Thanks Meter 234
Posts: 889
Join Date: Jun 2010

 
DONATE TO ME
I was thinking it may have happened because I'm max screen off speed was 384 it was to low. But I changed it to always hold 12Xx and it bug still persisted

Sent from my Galaxy Nexus using xda premium
DO YOU LIKE ELECTRO, DUBSTEP, HIP-HOP, HOUSE, ETC?
High in protein and bass

 
vonVideo
Old
(Last edited by vonVideo; 17th July 2012 at 11:58 AM.) Reason: update with test info
#7  
Senior Member - OP
Thanks Meter 135
Posts: 113
Join Date: May 2012
Quote:
Originally Posted by Megatr0n. View Post
Major ISSUE: When the screen is off audio is incredibly distorted (slowed down an incredible amount) when playing music through headphones. It seems to work fine when the screen is on, though.
Thanks!
It is fixed now (as of 07/16/12 night - edited post). You may rename it after the download. Just make sure you don't run the install twice in a row...
 
vonVideo
Old
(Last edited by vonVideo; 17th July 2012 at 02:35 AM.)
#8  
Senior Member - OP
Thanks Meter 135
Posts: 113
Join Date: May 2012
Quote:
Originally Posted by leets4uc3 View Post
Is the distortion due to the limited clock speed?


Sent from my Galaxy Nexus using xda premium
No. The sound is just configured differently when the screen is off. There is still a issue, hopefully I'll fix it soon.
 
Megatr0n.
Old
#9  
Megatr0n.'s Avatar
Senior Member
Thanks Meter 13
Posts: 127
Join Date: Sep 2011
Quote:
Originally Posted by vonVideo View Post
No. The sound is just configured differently when the screen is off. It should be OK with the new packages.
Could you rename the fixed version, please? I just downloaded what I think is the new version but I'm still having the same issue when the screen is off and since it has the same name as the original file, I can't be sure that the new version doesn't work.
 
vonVideo
Old
(Last edited by vonVideo; 17th July 2012 at 02:36 AM.)
#10  
Senior Member - OP
Thanks Meter 135
Posts: 113
Join Date: May 2012
Quote:
Originally Posted by Megatr0n. View Post
Could you rename the fixed version, please? I just downloaded what I think is the new version but I'm still having the same issue when the screen is off and since it has the same name as the original file, I can't be sure that the new version doesn't work.
There is still a issue, hopefully I'll fix it soon...

The Following 2 Users Say Thank You to vonVideo For This Useful Post: [ Click to Expand ]
Tags
echo cancellation, jelly bean, latency, nexus, volume
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes