FORUMS
Remove All Ads from XDA

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

115 posts
Thanks Meter: 136
 
By vonVideo, Senior Member on 16th July 2012, 10:20 PM
Post Reply Email Thread
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, 1694 views)
File Type: zip lowlatsnd41_18_inst.zip - [Click for QR Code] (252.2 KB, 2928 views)
File Type: zip volumeboost_inst.zip - [Click for QR Code] (129.4 KB, 519 views)
File Type: zip volumeboost_rest.zip - [Click for QR Code] (122.8 KB, 277 views)
The Following 61 Users Say Thank You to vonVideo For This Useful Post: [ View ] Gift vonVideo Ad-Free
16th July 2012, 11:29 PM |#2  
Megatr0n.'s Avatar
Senior Member
Thanks Meter: 13
 
More
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: [ View ] Gift Megatr0n. Ad-Free
17th July 2012, 12:09 AM |#3  
OP Senior Member
Thanks Meter: 136
 
More
Quote:
Originally Posted by Megatr0n.

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...
17th July 2012, 12:45 AM |#4  
leets4uc3's Avatar
Senior Member
Thanks Meter: 237
 
Donate to Me
More
Is the distortion due to the limited clock speed?


Sent from my Galaxy Nexus using xda premium
17th July 2012, 01:07 AM |#5  
Megatr0n.'s Avatar
Senior Member
Thanks Meter: 13
 
More
Quote:
Originally Posted by leets4uc3

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?
17th July 2012, 01:46 AM |#6  
leets4uc3's Avatar
Senior Member
Thanks Meter: 237
 
Donate to Me
More
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
17th July 2012, 01:52 AM |#7  
OP Senior Member
Thanks Meter: 136
 
More
Quote:
Originally Posted by Megatr0n.

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...
17th July 2012, 01:54 AM |#8  
OP Senior Member
Thanks Meter: 136
 
More
Quote:
Originally Posted by leets4uc3

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.
17th July 2012, 02:00 AM |#9  
Megatr0n.'s Avatar
Senior Member
Thanks Meter: 13
 
More
Quote:
Originally Posted by vonVideo

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.
17th July 2012, 02:31 AM |#10  
OP Senior Member
Thanks Meter: 136
 
More
Quote:
Originally Posted by Megatr0n.

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: [ View ] Gift vonVideo Ad-Free
17th July 2012, 02:43 AM |#11  
klobkelosh's Avatar
Senior Member
Phx, AZ
Thanks Meter: 417
 
More
I can confirm still an issue listening to mlb app with screen off. On the plus side, voip delay noticeably lessened.
The Following User Says Thank You to klobkelosh For This Useful Post: [ View ] Gift klobkelosh Ad-Free
Post Reply Subscribe to Thread

Tags
abandoned, closed source, echo cancellation, jelly bean, latency, nexus, volume

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes