5,598,980 Members 31,445 Now Online
XDA Developers Android and Mobile Development Forum

Possible A2DP skipping solution!

Tip us?
 
crushsuitandtie
Old
(Last edited by crushsuitandtie; 26th May 2009 at 03:14 AM.)
#1  
Member - OP
Thanks Meter 0
Posts: 47
Join Date: Apr 2009
Default Possible A2DP skipping solution!

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.
 
g1junky
Old
#2  
Senior Member
Thanks Meter 24
Posts: 831
Join Date: Feb 2009
Location: Dolton, IL

 
DONATE TO ME
can i get an english translation lol jk...can u explain it in noob form
 
alapapa
Old
#3  
alapapa's Avatar
Senior Member
Thanks Meter 7
Posts: 453
Join Date: Dec 2007
interesting, plausible explanation

where in the code do you make the change?
I can help you become more human

 
crushsuitandtie
Old
#4  
Member - OP
Thanks Meter 0
Posts: 47
Join Date: 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
 
crushsuitandtie
Old
(Last edited by crushsuitandtie; 26th May 2009 at 03:13 AM.)
#5  
Member - OP
Thanks Meter 0
Posts: 47
Join Date: Apr 2009
Quote:
Originally Posted by alapapa View Post
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...
 
alapapa
Old
#6  
alapapa's Avatar
Senior Member
Thanks Meter 7
Posts: 453
Join Date: Dec 2007
Quote:
Originally Posted by crushsuitandtie View Post
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...?
I can help you become more human

 
crushsuitandtie
Old
#7  
Member - OP
Thanks Meter 0
Posts: 47
Join Date: Apr 2009
Menu button>Settings>Wireless Controls>Bluetooth Settings>(long press) Your headset name>Options...>uncheck phone....
 
crazythunder
Old
#8  
crazythunder's Avatar
Senior Member
Thanks Meter 82
Posts: 853
Join Date: Apr 2007
Location: buffalo,ny

 
DONATE TO ME
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.
 
crushsuitandtie
Old
#9  
Member - OP
Thanks Meter 0
Posts: 47
Join Date: Apr 2009
Quote:
Originally Posted by crazythunder View Post
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.
 
DOHCtor
Old
#10  
DOHCtor's Avatar
Senior Member
Thanks Meter 117
Posts: 1,095
Join Date: Apr 2009
Location: Southern California
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.




T-Mobile G1 - First
MyTouch 3G - Second
Nexus One - Third
Nexus S - Fourth
Galaxy Nexus - Fifth
Nexus 7 - Sixth
Nexus 4 - Seventh
Nexus 5 - Current

I'm a Google Fan

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Samsung EFS Tool Updated to V5, Brings Universal Device Support

You may recall that we’ve talked about XDA Recognized Contributor … more

Say Goodbye to Holo Blue Once and for All

When Google released Android 4.4 KitKat back in October of last year, they changed quite a bit … more

Sony Z Ultra Google Play Edition Receives Bluetooth Certification for Android 4.4.3

You may recall that a few days ago, Sprint jumped the gun … more

Easily Configure Xposed Module Projects in Eclipse

XDA Recognized Developer rovo89‘s innovative and versatile Xposed Framework allows … more