webOS Nation Forums >  webOS Devices >  Palm Windows Mobile Devices & Apps > A possible way to add A2DP to the Treo 700w?
A possible way to add A2DP to the Treo 700w?
  Reply
 
Thread Tools Display Modes
Old 05/15/2006, 07:08 PM   #101 (permalink)
Member
 
Posts: 275
tried it. no good.
wannatreo is offline   Reply With Quote
Old 06/07/2006, 01:33 AM   #102 (permalink)
Member
 
Posts: 4,354
Well I finally got some a2dp headphones and installed the a2dp support. I'm now at the same point as the rest of you with the freeze every few seconds. I did notice that increasing the cpu speed seems to help it some. Another thing I noticed is that it seems to be the music player that is being starved of cpu cycles. If you run another application at the same time such as the camera you don't see it freezing. So I started looking for any utils that would allow me to change the application priority.

The only thing I found was this
http://www.gb-soft.cz/XDAII/product_...k_wm5pe_en.htm

Which has a feature that allows you to change the priority for audio media. I found a post that describes what it does.

"I looked into what the GB-SOFT utility is doing, and it seems to just be setting one registry value:
HKEY_LOCAL_MACHINE\Drivers\BuiltIn\WaveDev\Priority256
from it's default
0x100 (256) to
0x80 (128)

This apparently gives the built-in sound processing DLL (WaveDev) a higher thread priority and eliminates the skipping sound."

Sounded promising so I gave it a try, but it didn't appear to make any difference.

Anyone else know of any utilities that will allow you to change applicatoin/process priorities? hmm, I wonder if there are other driver priorities you can change via the registry. Maybe adjusting the a2dp driver priority might help?

EDIT: So I tried changing the a2dp driver priority, but it didn't make any difference. Not sure those registry settings have any effect.
This is what I tried.
http://forum.xda-developers.com/viewtopic.php?t=46811

Guess I'm quiting for tonight. Think I'll look for a util that can display process/driver priorities to see if they are actually being changed.

Last edited by hannip; 06/07/2006 at 03:26 AM.
hannip is offline   Reply With Quote
Old 06/07/2006, 05:50 PM   #103 (permalink)
Member
 
Posts: 4,354
Excerpt from http://msdn.microsoft.com/library/de.../threads30.asp

"Priority Levels
Effective with version 3.0, Windows CE offers 256 priority levels, with 0 being the highest priority and 255 being the lowest priority. Levels 255 through 248 are defined for application threads and map to the 8 priority levels that were available in earlier versions of Windows CE.

Many of the higher priority levels (247 through 0) are assigned to real-time applications, drivers, and system processes. In order to prevent random applications from degrading the performance of the system, the OEM can restrict all of the priority levels between 247 and 0 to OEM-specified applications. For more information on the priority levels that are available to applications on your target device, you should consult the OEM."

Could it be that Palm has restricted the priorities? That would explain everything. Although I wouldn't think this restriction would apply to drivers, could it?
hannip is offline   Reply With Quote
Old 06/12/2006, 12:31 PM   #104 (permalink)
Member
 
Posts: 4,354
Well I tried using PocketHackMaster to tweak the cpu, memory and bus speeds to see if it would help with the music lag, but nothing I tried seemed to help.

Word of caution if you want to play with PHM yourself. Don't try to push the bus and memory speed over the spec'd 208/104 rate. It messed up the battery monitoring on my device. Hard reset did not fix it. Overclocking the cpu beyond spec seems to only hang the device without further damage.

So after playing with various priority settings for wavedev.dll, waveapi.dll, bta2dp.dll and BluetoothUart.dll, nothing fixed the music lag, although I could get it to play for longer periods of time between hangs.

My current theories:
1) Might be some poorly written device driver on the Treo that hogs too much time in a critical section. I wish you could use the Remote Kernel Tracker on end user devices. It's pretty hard to debug stuff like this without a kernel trace.

2) Might be some bandwidth issue causing flow control stops and starts between the cpu and bluetooth radio. I attempted to change the baud rate between the cpu and bluetooth radio, but the device driver just overwrites my changes.

I wonder if the bta2dp.dll supports any kind of buffering. If there was a way to create a larger buffer it might work.
hannip is offline   Reply With Quote
Old 06/16/2006, 05:22 PM   #105 (permalink)
Member
 
Posts: 1
OK, Add the Jabra BT620s to the list of headsets. :-(
maxwave is offline   Reply With Quote
Old 06/16/2006, 05:41 PM   #106 (permalink)
Member
 
Posts: 4,354
And the Jensen WBB100, although the dongle that comes with it works well and even pairs nicely with my Samsung SBH100's.
hannip is offline   Reply With Quote
Old 06/24/2006, 12:00 PM   #107 (permalink)
Member
 
Posts: 7
Well I got it working for about 1-2 minutes without stops, but the quality is horrible. Simply set the a2dp bitpool to a low value so it doesn't send as much data over the air and it seems to work. Seeing how CPU usage doesn't spike, I would have to say either the sound processor chip BLOWS on the treo 700w or there is limit on bandwidth somehwere in the bluetooth module. Another possibility is the software is encoding everything, vs just sending over the mp3 stream (which over 95% of all a2dp headphones/adapters support). Either way, I am starting to doubt highly that a2dp works on the 700w.
aloshka is offline   Reply With Quote
Old 06/24/2006, 01:19 PM   #108 (permalink)
Member
 
Posts: 4,354
Can you explain how you lowered the bitpool? I have always suspected the bluetooth bandwidth as being the problem.
hannip is offline   Reply With Quote
Old 06/24/2006, 07:36 PM   #109 (permalink)
Member
 
Posts: 7
Attached is the reg file for the bitpools flags. You can change just the value between 2-44 (44 being highest quality). I believe some headphones even support 70+.

You can specify just the Bitpool value, or delete it and add 2 dword values called "MinBitPool", "MaxBitPool" so the treo can pick itself depending on mp3 quality etc (this is the default value when everything else is missing).

I've tried changing the transports and no luck. Something just slow on the 700w. Honestly, I'm planning to return it. Still within my 15 days of verizon return policy.
Attached Files
File Type: zip bt bitpools.zip (327 Bytes, 55 views) Email Attachment
aloshka is offline   Reply With Quote
Old 06/24/2006, 09:26 PM   #110 (permalink)
Member
 
Posts: 8
I too am having problems with skipping, etc of audio (own a pair of Logitech headphones).

It works with a lowered BitPool, but that is not a permanent solution. I think it should be physically possible for the hardware because it works with the Palm OS based Treos.

So, it's either a problem with M$'s bluetooth stack or a driver...?
RecklessOne is offline   Reply With Quote
Old 06/24/2006, 10:51 PM   #111 (permalink)
Member
 
Posts: 4,354
Quote:
Originally Posted by RecklessOne
I too am having problems with skipping, etc of audio (own a pair of Logitech headphones).

It works with a lowered BitPool, but that is not a permanent solution. I think it should be physically possible for the hardware because it works with the Palm OS based Treos.

So, it's either a problem with M$'s bluetooth stack or a driver...?
If it's not a hardware issue it would have to be a palm specific driver issue since the M$ stack works reasonably well on many other WM5 devices.
hannip is offline   Reply With Quote
Old 06/24/2006, 11:49 PM   #112 (permalink)
Member
 
Posts: 7
it also might be a problem with the fact that we are using drivers from a device that has a completely different bt stack and sound chip. while most devices are made by htc (wizard etc) the treo isn't. used to be but not anymore. we are probably at the mercy of somebody who knows bt very well...

as for me. i'm stuck between returning the 700w and getting a qtek 8500 phone. or working out the a2dp issue. I did find tons of documents on how to implement a2dp... but that's one complex issue. what do you all think? dump treo or stick it out cuz it is a great device afterall?

sorry for spelling & caps.. writing this on my treo.

Last edited by aloshka; 06/25/2006 at 12:15 AM.
aloshka is offline   Reply With Quote
Old 06/25/2006, 04:03 AM   #113 (permalink)
Member
 
Posts: 4,354
heh, I think it's just a matter of time between us figuring this out or softick coming out with a new stack for the 700w.

So I noticed that you had another registry entry in your reg file called "SampleRate". How does it fit in the equation? It seems that changing the bitpool blindly just results in distorted sound. Are there other parameters that need to be changed in concert with the bitpool value to make it sound halfway decent at lower bit rates?

So I assume that these parameters control the sbc encoding handled by sbc.dll that came with the tornado cab. I'm wondering if the encoding is being done via software or hardware. If sbc.dll is doing the encoding maybe we need to give it a higher priority like others have done for bta2dp.dll.

hmm, I don't see any reference to sbc.dll in the registry, but it does get loaded by device.exe. Strange.

Wild guess. sbc encoding could be done via hardware on the htc devices, but since the Treo has different hardware it might be falling back to software encoding.
hannip is offline   Reply With Quote
Old 06/25/2006, 02:13 PM   #114 (permalink)
Member
 
Posts: 7
I am getting the same idea about it doing software encoding instead of hardware. Softick probably will not do anything for the treo 700w because it would be a waste of his time. The 650 didn't have any type of stack for a2dp and he created it (by sending direct mp3 stream when listening to mp3s and sending subband coding for everything else, try playing a vbr mp3 file that has been split and missing headers. It will play on the treo but the headphones don't know how to handle it so they will make a ton of noise and eventually freeze up.) Rewriting in the Windows platform would require him to completely relearn how the windows system handles sound processing. So I am ruling out possibility of softick dong anything for the 700w. I will take a look at prioritizing sbc.dll but I'm not sure any encoding happens in that dll. It seems way to small in size and only exports some ACM functions which appear similar to the WAV fuctions exported from a2dp.dll (I already tried changing the entry points on both files, it won't connect the headphones anymore.)

I still have 10 days left, and will keep trying different things. But if worst comes to worst, WOULD YOU get rid of your 700w for a device like the 8500?
aloshka is offline   Reply With Quote
Old 06/25/2006, 02:16 PM   #115 (permalink)
Member
 
Posts: 7
I forgot to answer your sample rate question. The sample rate is the khz amount the sound is encoding in. The bitpool value is just a number that the volume gets divided by (smaller = worst quality). Its just a different type of encoding called loudness. The idea behind it is simply just restricting the loudness of the sound makes the sound easier to encode because it's values don't jump up and down so much. The samplerate is how fast the sound waves comes through in hz. So with those two values you can pretty much set a bitrate.

According to a2dp specs if you set a bitpool value of 19 and hz value of 44100 you are going to be ecoding/sending at an average rate close to 128kbs. So you can imagine why the sound sucks when you do 2 and 22050 khz.
aloshka is offline   Reply With Quote
Old 06/25/2006, 05:13 PM   #116 (permalink)
Member
 
Posts: 4,354
Thanks for the explaination. I downloaded the a2dp spec and tried all of the suggested values for middle quality and high quality streams. What was interesting is that only the sound quality changed. It didn't seem to affect the lag or the length of music play between lags. This would tell me that the problem isn't due to a limitation of bluetooth bandwidth. It seems more of a resource contention issue. Dropping the bitpool way down to 2 may only be decreasing the amount of proccessing time it takes to do the encode thereby reducing the contention. Seeing that the cpu is not being stressed you'd think this would be a priority issue.

Changing the priorities of bta2dp.dll and wavedev.dll doesn't fix it, but I did notice that making the wavedev.dll a lower priority (higher number) than bta2dp.dll it seems to help. I also noticed that if I increase the PocketMusic decoder thread priority it makes things worse. Something is getting starved out.

As far as the 8500 is concerned, isn't that the star trek phone? It looks cool and all, but it uses the smartphone os and no qwerty keyboard. If you want thin and don't care to have a touchscreen I would tend to go with the Q if the treo doesn't do it for you.

Edit: Is there a way to set the number of subbands from 8 to 4? It would seem that 4 subbands would take half the processing of 8 subbands. Maybe that would help.

Last edited by hannip; 06/25/2006 at 07:52 PM.
hannip is offline   Reply With Quote
Old 06/26/2006, 01:13 AM   #117 (permalink)
Member
 
Posts: 7
Yeah your completly right. I already had the Q. I guess I just really want a2dp. I'm a bit tired of wasting money in every direction to get what I want, ignoring completly what I really need.

As for the subband stuff, unfortunately the dll has absolutely no settings for that. What I'm wondering is who is the provider for that dll, microsoft or i-mate/htc? IF I can get a crack at the source code, I'm more than sure I could find the problem, but I'm starting to find something new since you are noticing this too. Perhaps the dll is eating TOO much processing time? Not giving enough for windows media or anything else on the pda... but I might be wrong.

I just wish there was a book or something on a2dp and sound processing. Surely I could figure it out if somone could help me. I will keep trying different things, somethings got to give. As for PDA, I'm sticking with 700w. I like everything about it, just wish it had a2dp.
aloshka is offline   Reply With Quote
Old 06/26/2006, 10:24 AM   #118 (permalink)
Member
 
Posts: 4,354
I thought the Q had a2dp support. Though I did hear reports that the slingplayer audio wasn't working through a2dp for some reason on the Q.
For now I'm getting by using an a2dp dongle, but I'd really like not to have to drag it along with me all the time. Plus it's yet one more thing I have to keep charged.
hannip is offline   Reply With Quote
Old 06/26/2006, 08:26 PM   #119 (permalink)
Banned
 
Kupe's Avatar
 
Posts: 3,782
Quote:
Originally Posted by hannip
I thought the Q had a2dp support. Though I did hear reports that the slingplayer audio wasn't working through a2dp for some reason on the Q.
The Q A2DP works like a champ. No problems here playing Sling through A2DP to my HT820 headphones.
Kupe is offline   Reply With Quote
Old 06/26/2006, 08:35 PM   #120 (permalink)
Member
 
Posts: 4,354
Quote:
Originally Posted by Kupe
The Q A2DP works like a champ. No problems here playing Sling through A2DP to my HT820 headphones.
Help smeg36. He can't get it to work on his Q.

http://www.slingcommunity.com/forum/.../13592/?page=1
hannip is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0