btscosnd: SCO over HCI USB or BCSP sound quality issue

btscosnd: SCO over HCI USB or BCSP sound quality issue

Post by winso » Mon, 19 Feb 2007 06:36:17


Thanks for your attention first.

I'm running wince 5.0 compiled with platform builder 5.0 (updated QFE
till end of 2006) on our samsung smdk2440a development board.

My task is to enable SCO over bluetooth channel using the built-in
btscosnd audio driver instead of hardware routing. I have tried two of
the transport sample codes that microsoft provides, usb and bcsp. Both
function well as our original expectation to the microsoft bluetooth
Audio Gateway and btscosnd sample codes. However, we got lots harmonic
and silence sound in the destination end (either testing with wavplay
or wavrec).

Our test method is to play a standard 1kHz SIN tone on source side
(2440 board), and record the SCO results on destionation side (PC).
The PC end records data into digital format directly so there should
be no distoration problem (eg. disturbed by the environment noise
etc.) We have tried PC, real headset devices (using microsoft
out-of-box AG sample) or phone (with our own modified
handsfree/handset profile). The results were very similar.
I google for any possibile cause and read through all the posts on
every related forums. At the beginning (because I tried USB dongle
first), I thought it's the problem with isochronous USB transfer
described in Q317434. But I'm not sure if it applies to wince 5.0
(because wince 5.0 wasn't on the problem list). I have tried
everything I can think of to solve this problem. For instances,

1. change USB altsetting and tune with those parameters
iScoWriteLowNumPackets, iScoWriteNumPackets, and iScoWritePacketSize.
-> It doesn't make any obvious changes.

2. try among different USB dongles (different bt chips) and change
some parametes like thresholds of flow control, iMaxPacketSize,
concurrentpacket number etc on these USB dongles. -> little improves
but not very much. Different bt chip dongles show similar results. CSR
chips behave little better than others, but still not much improve.
(try about 8 different vendor of USB dongles).

3. Using an USB analyzer to capture out packets of USB shows
continuous packets (means lose nothing at all) but timing (1m sec of
each USB transaction) seems to have some trouble in that. Sometimes it
slips one or two transactions, but something to highlight here, data
are continuous. I suspect there might be some schedule packet problem
with hci. So I play around the microsoft built-in hci.cxx code, but
still can't get it to work well.

We spent too much time and finally end up with these tries on USB. We
thought maybe BCSP might be a better choice as a transport layer.
Unfortunately, we meet the similar condition and get similar results
(Though BCSP shows better but still not so perfect as we expected to).

We tried SCO over BCSP on the same 2440 board and connected 2440 UART0
(COM1) to an external CSR BC03 development board at baud rate from
38400 up to 460800 successfully. Since we can succeed running BCSP
stable at baud rate 460800. Obviously, the bad results must not come
from the lack of bandwith. And here we don't have to worry about the
isoc transfer problem of USB.

So, is there anyone could give any suggestion what might be the
possible reason that we meet to? Do I have to change any pskey on CSR
chips to bring it to work right? Is there any expert plz guide us to
the right direction to solve the problem.
Many thanks in advance.

winson