Streamline Android Theme Customization with Graphic Porter

I dont have a custom theme on my Android phone, and the reason for this is because … more

Boost the Brightness of Your Sony Xperia Z1’s LED

I think the last time anyone has ever used a physical torch to find their earphones, … more

XDA Xposed Tuesday: Modify the Look of Your Volume Control – XDA TV

How many screenshots have you seen with a volume status bar in the … more

Prepare Your Nokia X2 for Battle with Nokia X2 Tools

Unveiled in June this year, the Nokia X2 is the Finnish companys second crack at an … more
Post Reply

Possible A2DP skipping solution!

26th May 2009, 02:54 AM   |  #1  
OP Member
Thanks Meter: 0
 
47 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 03:14 AM.
26th May 2009, 02:59 AM   |  #2  
Senior Member
Flag Dolton, IL
Thanks Meter: 25
 
833 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, 03:01 AM   |  #3  
alapapa's Avatar
Senior Member
Thanks Meter: 7
 
453 posts
Join Date:Joined: Dec 2007
More
interesting, plausible explanation

where in the code do you make the change?
26th May 2009, 03:02 AM   |  #4  
OP Member
Thanks Meter: 0
 
47 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, 03:10 AM   |  #5  
OP Member
Thanks Meter: 0
 
47 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 03:13 AM.
26th May 2009, 03:15 AM   |  #6  
alapapa's Avatar
Senior Member
Thanks Meter: 7
 
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, 03:17 AM   |  #7  
OP Member
Thanks Meter: 0
 
47 posts
Join Date:Joined: Apr 2009
Menu button>Settings>Wireless Controls>Bluetooth Settings>(long press) Your headset name>Options...>uncheck phone....
26th May 2009, 03:40 AM   |  #8  
crazythunder's Avatar
Senior Member
Flag buffalo,ny
Thanks Meter: 82
 
853 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, 01:22 PM   |  #9  
OP Member
Thanks Meter: 0
 
47 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, 02:36 PM   |  #10  
DOHCtor's Avatar
Senior Member
Flag Southern California
Thanks Meter: 118
 
1,095 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