Re: Bluetooth Audio via CompactFlash PC card to Headset on WinCE5.0
From: jtnum (twotech_at_selectronix.us)
Date: 12/16/04
- Next message: Samuel Phung: "Re: Which bootloader to use ?"
- Previous message: Bruce Eitman \(eMVP\): "Re: backspace key does not work in custom shell"
- In reply to: Greg Scott [MS]: "RE: Bluetooth Audio via CompactFlash PC card to Headset on WinCE5.0"
- Next in thread: jtnum: "Re: Bluetooth Audio via CompactFlash PC card to Headset on WinCE5.0"
- Reply: jtnum: "Re: Bluetooth Audio via CompactFlash PC card to Headset on WinCE5.0"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 16 Dec 2004 15:11:11 -0800
Hello Greg,
1) Yes, this fails with both the Brainboxes card and the Socket card.
2) It looks as if the packet count is 2, Pkt size = 48...it seems like the
problem is that both PddSco_DataPacketDown() and PddMsg_Start() can both set
the AUDIO_EVENT_TX_DATA event, which in turn calls TransmitPackets().
PddSco_DataPacketDown() increments g_dwTxPacketsToSend......
Just for grins, I commented out the setting of the AUDIO_EVENT_TX_DATA in
PddSco_DataPacketDown(), and now I get only a single sequence, instead of
continuous transmissions..
I've provided both before and after traces.......
This is a trace where I was getting continuous transmissions....with
comments to the trace added.
This trace starts after btagconfig -audio on, and a screen tap which
initiates a sound
Screen Tap
[BTSCOCND] pfnCallback =0x3D65AB0
[BTSCOCND] hWave =0x0
[BTSCOCND] dwOpenFlags =0x30000
BTSCOSND:: [WODM] TEXT("WODM_PREPARE")
BTSCOSND:: [FUNC] +wdev_COMMON_PREPARE()
BTSCOSND:: [FUNC] -wdev_COMMON_PREPARE()
BTSCOSND:: [WODM] TEXT("WODM_WRITE")
BTSCOSND:: [FUNC] +wdev_WODM_WRITE()
BTSCOSND:: [FUNC] +wdev_COMMON_ADDBUFFER()
DevId=0 dwUser=0x0 pWAVEHDR=0x3CD3D0
BEGINLOOP is not set
BTSCOSND:: [FUNC] -wdev_COMMON_ADDBUFFER()
BTSCOSND:: [FUNC] +PddMsg_Start()
BTSCOSND:: [FUNC] -PddMsg_Start()
Above sets AUDIO_EVENT_TX_DATA, which calls TransmitPackets()
[BTSCOSND] XmitPackets. WvHdr=0x3CD3D0 Cnt=2. PktSz=48
[BTSCOSND] XmitPackets. pTxBuff=0x1F25268 pScoConnHndl=0x2C
eType == DATA_PACKET_SCO (3)
[BCSP] BCSPWriteThread : Sending SCO packet ptr 0x3CDDC0
eType == DATA_PACKET_SCO (3)
[BCSP] BCSPWriteThread : Sending SCO packet ptr 0x3CDE40
Why does this get called again below.but different SCO packet pointer??
[BTSCOSND] XmitPackets. WvHdr=0x3CD3D0 Cnt=2. PktSz=48
[BTSCOSND] XmitPackets. pTxBuff=0x1F25268 pScoConnHndl=0x2C
eType == DATA_PACKET_SCO (3)
[BCSP] BCSPWriteThread : Sending SCO packet ptr 0x3CE0A0
eType == DATA_PACKET_SCO (3)
[BCSP] BCSPWriteThread : Sending SCO packet ptr 0x3CE110
BTSCOSND:: [INTR] "Block Complete... Sending callback"
[BTSCOCND] Callback func=0x3D65AB0 (hWave=0x0, uMsg=0x3BD, Inst=0x3CD390,
pwh=0x3CD3D0, 0)
[BTSCOSND] XmitPackets. WvHdr=0x0 Cnt=2. PktSz=48
[BTSCOSND] XmitPackets. pTxBuff=0x1F25268 pScoConnHndl=0x2C
eType == DATA_PACKET_SCO (3)
[BCSP] BCSPWriteThread : Sending SCO packet ptr 0x3CE190
eType == DATA_PACKET_SCO (3)
[BCSP] BCSPWriteThread : Sending SCO packet ptr 0x3CEA10
[BTSCOSND] XmitPackets. WvHdr=0x0 Cnt=2. PktSz=48
[BTSCOSND] XmitPackets. pTxBuff=0x1F25268 pScoConnHndl=0x2C
eType == DATA_PACKET_SCO (3)
[BCSP] BCSPWriteThread : Sending SCO packet ptr 0x3CEA90
eType == DATA_PACKET_SCO (3)
[BCSP] BCSPWriteThread : Sending SCO packet ptr 0x3CEAB0
WvHdr is now 0x00, from here down
[BTSCOSND] XmitPackets. WvHdr=0x0 Cnt=2. PktSz=48
[BTSCOSND] XmitPackets. pTxBuff=0x1F25268 pScoConnHndl=0x2C
eType == DATA_PACKET_SCO (3)
[BCSP] BCSPWriteThread : Sending SCO packet ptr 0x3CF920
eType == DATA_PACKET_SCO (3)
[BCSP] BCSPWriteThread : Sending SCO packet ptr 0x3CF9C0
[BTSCOSND] XmitPackets. WvHdr=0x0 Cnt=2. PktSz=48
[BTSCOSND] XmitPackets. pTxBuff=0x1F25268 pScoConnHndl=0x2C
eType == DATA_PACKET_SCO (3)
[BCSP] BCSPWriteThread : Sending SCO packet ptr 0x3CFA40
eType == DATA_PACKET_SCO (3)
[BCSP] BCSPWriteThread : Sending SCO packet ptr 0x3CFA60
[BTSCOSND] XmitPackets. WvHdr=0x0 Cnt=2. PktSz=48
[BTSCOSND] XmitPackets. pTxBuff=0x1F25268 pScoConnHndl=0x2C
Wavepdd.cxx:AudioThreadProc() is the thread that waits on Rx or Tx events
For an AUDIO_EVENT_TX_DATA
Put logic in wavepdd.cxx:TransmitPackets() to check for pWAVEHDR==NULL
Here is a trace after commenting out the setting of AUDIO_EVENT_TX_DATA in
PddSco_DataPacketDown()
[BTSCOCND] pfnCallback =0x3D65AB0
[BTSCOCND] hWave =0x0
[BTSCOCND] dwOpenFlags =0x30000
BTSCOSND:: [WODM] TEXT("WODM_PREPARE")
BTSCOSND:: [FUNC] +wdev_COMMON_PREPARE()
BTSCOSND:: [FUNC] -wdev_COMMON_PREPARE()
BTSCOSND:: [WODM] TEXT("WODM_WRITE")
BTSCOSND:: [FUNC] +wdev_WODM_WRITE()
BTSCOSND:: [FUNC] +wdev_COMMON_ADDBUFFER()
DevId=0 dwUser=0x0 pWAVEHDR=0x3CD3D0
BEGINLOOP is not set
BTSCOSND:: [FUNC] -wdev_COMMON_ADDBUFFER()
BTSCOSND:: [FUNC] +PddMsg_Start()
BTSCOSND:: [FUNC] -PddMsg_Start()
[BTSCOSND]AudThrProc OpnAndStarted - XmitPktsToSend=2
[BTSCOSND] XmitPkts WvHdr=0x3CD3D0 Cnt=2. PktSz=48
[BTSCOSND] XmitPkts pTxBuff=0x1F25268 pScoConnHndl=0x2C
eType == DATA_PACKET_SCO (3)
[BTSCOSND] +sco_DataPacketDown_Out
+PddSco_DataPacketDown g_dwTxPacketsToSend++
// SetEvent(g_hAudioEvents[AUDIO_EVENT_TX_DATA]);
[BCSP] BCSPWriteThread : Sending SCO packet ptr 0x3CCA90
[BTSCOSND]AudThrdProc : Pkts to Send = 2 Pkts Sent = 2
eType == DATA_PACKET_SCO (3)
[BTSCOSND] +sco_DataPacketDown_Out
+PddSco_DataPacketDown g_dwTxPacketsToSend++
[BCSP] BCSPWriteThread : Sending SCO packet ptr 0x3CCB10
[BTSCOSND]AudThrdProc MarkFullAsDone, RemoveCompleteBlocks
BTSCOSND:: [FUNC] -wdev_WODM_WRITE Success()
I still cannot hear any audio from the headset....not even a click, or
noise, indicating that some data, even if it were corrupt, was getting
through.
It still leaves the target unit locked up, and no longer any control of the
VolUp or VolDn on the headset.
What CF Bluetooth cards does Microsoft use for its testing?
Thanks for any additional comments.....as tracing through the various layers
of the stack is pretty slow and painful...........
Jerry Numata
Selectronix, Inc.
"Greg Scott [MS]" <gregsco@online.microsoft.com> wrote in message
news:poHrWUj4EHA.3440@cpmsftngxa10.phx.gbl...
> Just to confirm, this fails with both the Brainboxes card and the Socket
> card?
>
> In HCI_WritePacket the queue should never have more than four packets.
I'd
> be surprised if you were stuck in this loop forever. Are you sure it
never
> breaks out? Can you debug this a bit more and determine if the packets
are
> sent from HCI layer at a fast rate. Keep in mind that if you turn on much
> debug output it can cause audio to cut out. When you get in a state where
> you think it is alternating packets can you check the
g_pSCOTransmitPackets
> list and see if it looks ok. This list holds the queue of SCO packets
sent
> from HCI.
>
> Also, make sure the UART speed is fast enough to support this. Can you
try
> using a BT USB dongle and see if you have any luck there?
>
> I hope this helps.
>
> Greg Scott
> Software Design Engineer, Windows CE
> Microsoft Corporation
> _____________________________________________________________
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> _____________________________________________________________
>
> --------------------
> | From: "jtnum" <twotech@selectronix.us>
> | Subject: Bluetooth Audio via CompactFlash PC card to Headset on WinCE5.0
> | Date: Fri, 10 Dec 2004 16:45:31 -0800
> | Lines: 29
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
> | Message-ID: <OT#i0qx3EHA.3416@TK2MSFTNGP09.phx.gbl>
> | Newsgroups: microsoft.public.windowsce.platbuilder
> | NNTP-Posting-Host: evrtwa1-ar2-4-33-047-236.evrtwa1.dsl-verizon.net
> 4.33.47.236
> | Path:
>
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09
> phx.gbl
> | Xref: cpmsftngxa10.phx.gbl microsoft.public.windowsce.platbuilder:59132
> | X-Tomcat-NG: microsoft.public.windowsce.platbuilder
> |
> | Has anyone used a CF flash card and WinCE 5.0 to pipe the normal PC
sounds
> | (*.wav) files to a headset?
> |
> | Evidently an 'SCO-enabled' Bluetooth device (in my case a CF adapter) is
> | required to support the Headset profile.....this may be the cause of the
> | difficulty I'm experiencing.
> |
> | Does anyone know of a manufacturer of this device?
> |
> | It doesn't look as if SocketCommunications card supports this, and the
> | BrainBox card I have performs in the same manner as the Socket
> | card....namely the Volume controls work, providing appropriate sound
> | changes, when the VolUp or VolDn button is pressed, but no audio....not
> even
> | a click or noise issues when the sound is initiated.
> |
> | I have traced through the various layers of the HCI extension,
> btscosnd.dll,
> | and the HCI Transport layer stuff..bthcsr.dll, and bthuniv.dll
> | ..and the driver gets stuck in file hcibcsp.cpp, BCSPWriteThread() in a
> | while(1) loop trying to send SCO packets......it stays in forever if it
> | continues to get a PSCOPacket....which it does.
> | Looking at the packet numbers, it appears as if there is only 2 packets
> that
> | continuously alternate.
> |
> | Has anyone else experienced this?
> |
> |
> |
> |
> |
> |
>
- Next message: Samuel Phung: "Re: Which bootloader to use ?"
- Previous message: Bruce Eitman \(eMVP\): "Re: backspace key does not work in custom shell"
- In reply to: Greg Scott [MS]: "RE: Bluetooth Audio via CompactFlash PC card to Headset on WinCE5.0"
- Next in thread: jtnum: "Re: Bluetooth Audio via CompactFlash PC card to Headset on WinCE5.0"
- Reply: jtnum: "Re: Bluetooth Audio via CompactFlash PC card to Headset on WinCE5.0"
- Messages sorted by: [ date ] [ thread ]