Micromax Yureka: Indian Handset with CyanogenMod

Thesoap opera involving Cyanogen Inc., OnePlus, and Micromax is one of the most talked about … more

Chainfire Turns Your Bootanimation into a Logging Center

Having a nice boot animation certainly adds a little bit of aesthetic polish to your … more

Android TV Launcher Pushed to Google Play

Over the past decade, the tech universe has seen two drastic and widely contrasting changes with … more

Cyngn, OnePlus, Micromax – The Legal Battle

Recently, a battle has been waging in India over the rights to distribute the commercial … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Possible A2DP skipping solution!

OP crushsuitandtie

26th May 2009, 03:54 AM   |  #1  
OP Member
Thanks Meter: 1
 
54 posts
Join Date:Joined: Apr 2009
Headset: Motorola S9-HD
ROM: Haykuro 6.0
Radio: ota-radio-2_22_19_26I

Issue: a2dp audio skips due to location of phone... or so it seemed. The audio would skip if the phone was placed across my body from the antenna or in a pocket.

Resolution: I began researching the bluez stack and found several places in the code that alluded to the hfp and a2dp being intertwined. This lead me to remember that android also attempts to switch between the hfp and a2dp for incoming calls.

I found that my headset was connected by default with both profiles active (not one at a time).

Thus after several test i found that disabling the hfp will eliminate the skipping.

Explanation: My best analysis is that the phone is keeping both profiles open at the expense of splitting the channel. Thus when the phone has gsm related events (incoming calls, tower hopping, background edge data) it is tying up the hfp by error thus causing a2dp to get reduced resources, low signal strength, and possibly packet collisions. Try for yourself. The skipping instantly stopped for me. Let me know how it goes for you! Thanks to all the devs for these great roms and info.
Last edited by crushsuitandtie; 26th May 2009 at 04:14 AM.
26th May 2009, 03:59 AM   |  #2  
Senior Member
Flag Dolton, IL
Thanks Meter: 25
 
837 posts
Join Date:Joined: Feb 2009
Donate to Me
More
can i get an english translation lol jk...can u explain it in noob form
26th May 2009, 04:01 AM   |  #3  
alapapa's Avatar
Senior Member
Thanks Meter: 8
 
453 posts
Join Date:Joined: Dec 2007
More
interesting, plausible explanation

where in the code do you make the change?
26th May 2009, 04:02 AM   |  #4  
OP Member
Thanks Meter: 1
 
54 posts
Join Date:Joined: Apr 2009
noob translation: turning off the headphone profile possibly frees up room for audio to stream uninterrupted...

ps. that might still confuse some... lol
26th May 2009, 04:10 AM   |  #5  
OP Member
Thanks Meter: 1
 
54 posts
Join Date:Joined: Apr 2009
Quote:
Originally Posted by alapapa

interesting, plausible explanation

where in the code do you make the change?

no changes were made yet... the bluez stack is written to have a bridge between a2dp and headphone profile. i think android is sending packets to the headset via hfp for gsm events. I would think android should discard the packets instead of sending them out and relying on the headset to ignore them.

i would think the code can't be changed without making LOTS of other changes... i would be essentially rewriting how android handles the two profiles at the same time. (ALOT of work)

if this ends up fixing it for everyone... then i might look into trying to increase a2dp's priority in transmitting or some other solutions...
Last edited by crushsuitandtie; 26th May 2009 at 04:13 AM.
26th May 2009, 04:15 AM   |  #6  
alapapa's Avatar
Senior Member
Thanks Meter: 8
 
453 posts
Join Date:Joined: Dec 2007
More
Quote:
Originally Posted by crushsuitandtie

no changes were made yet... the bluez stack is written to have a bridge between a2dp and headphone profile. i think android is sending packets to the headset via hfp for gsm events. I would think android should discard the packets instead of sending them out and relying on the headset to ignore them.

i would think the code can't be changed without making LOTS of other changes... i would be essentially rewriting how android handles the two profiles at the same time. (ALOT of work)

if this ends up fixing it for everyone... then i might look into trying to increase a2dp's priority in transmitting or some other solutions...

i think I gotcha...you just killed the hfp profile on your PC or w/e...?
26th May 2009, 04:17 AM   |  #7  
OP Member
Thanks Meter: 1
 
54 posts
Join Date:Joined: Apr 2009
Menu button>Settings>Wireless Controls>Bluetooth Settings>(long press) Your headset name>Options...>uncheck phone....
26th May 2009, 04:40 AM   |  #8  
crazythunder's Avatar
Senior Member
Flag buffalo,ny
Thanks Meter: 82
 
854 posts
Join Date:Joined: Apr 2007
Donate to Me
More
thanks for that tip. i was cutting my grass the other day. g1 in rear pocket. stereo bluetooth headphones on. signal kept cutting out on me. i'm gonna try this and see if it helps.
26th May 2009, 02:22 PM   |  #9  
OP Member
Thanks Meter: 1
 
54 posts
Join Date:Joined: Apr 2009
Quote:
Originally Posted by crazythunder

thanks for that tip. i was cutting my grass the other day. g1 in rear pocket. stereo bluetooth headphones on. signal kept cutting out on me. i'm gonna try this and see if it helps.

No problem. I'm just trying to add something constructive around here. I'm still not even close to some of these guys.
26th May 2009, 03:36 PM   |  #10  
DOHCtor's Avatar
Senior Member
Flag Southern California
Thanks Meter: 122
 
1,105 posts
Join Date:Joined: Apr 2009
More
Hey you're right! I just connected my S9 to "media" only (disabling the phone connection in bluetooth settings) and it doesn't skip anymore, even with wifi on! I'm going to give this a try on my sony head unit in my car when I get the chance and I'll report back.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes