Hi Joseph,
I port the file AudioEncoder.c from A2DPDemo to A3DPDemo_SRC to play the tone through UART using AUD_Send_Encoded_Audio_Data(). It seems to work fine as in the following screenshot, but there is no sound coming out of the Air Capsule speaker. I use the Tone in file A2DPDemo.c in project A2DPDemo.
Let me know what you think.
Regards,
Henry Nguyen
--------------------------- Start ----------------------------------------------
A3DP+SRC>
etAUD_Signalling_Channel_Open_Indication
BD_ADDR: 0x001a7d157ad8
A3DP+SRC>
etAUD_Stream_Open_Confirmation
Status: 0
BD_ADDR: 0x001a7d157ad8
MediaMTU: 895
A3DP Open: 0
Stream Format:
Frequency: 48000
Channels: 2
Flags: 0
A3DP+SRC>Play 3
AUD_Change_Stream_State success.
A3DP+SRC>Play 3
AUD_Change_Stream_State success.
A3DP+SRC>OpenStack().
HCI_VS_InitializeAfterHCIReset
VS_Update_UART_Baud_Rate success.
HCI_VS_InitializeAfterHCIReset Success
Bluetooth Stack ID: 1
A3DP Source Feature enabled.
Device Chipset: 4.1
BD_ADDR: 0x0017e9e555f3
EIR Data Configured Successfully (Device Name MSP-SRC-e555f3).
A3DP Endpoint opened successfully.
Class of Device: 0x100428.
Supported formats:
Frequency: 48000, Channels: 2, Flags: 0
******************************************************************
* Command Options: Inquiry, DisplayInquiryList, Pair, *
* EndPairing, PINCodeResponse, PassKeyResponse, *
* UserConfirmationResponse, *
* SetDiscoverabilityMode, SetConnectabilityMode,*
* SetPairabilityMode, SetBaudRate *
* ChangeSimplePairingParameters, *
* GetLocalAddress, GetLocalName, SetLocalName, *
* GetClassOfDevice, SetClassOfDevice, *
* GetRemoteName, OpenSink, CloseSink, Play, *
* SendCommand, Pause, Help *
******************************************************************
A3DP+SRC>Inquiry
atLinkKeyRequest: 0x001a7d157ad8
GAP_Authentication_Response success.
A3DP+SRC>
A3DP+SRC>
Inquiry Entry: 0x90004eec020d.
A3DP+SRC>
Inquiry Entry: 0x000275ffed82.
A3DP+SRC>Inquiry
Inquiry Entry: 0x844bf5c10a22.
A3DP+SRC>
Inquiry Failed: -1.
Function Error.
A3DP+SRC>
Inquiry Entry: 0x001a7d157ad8.
A3DP+SRC>
Result: 1,0x90004eec020d.
Result: 2,0x000275ffed82.
Result: 3,0x844bf5c10a22.
Result: 4,0x001a7d157ad8.
A3DP+SRC>Inquiryfdsa
Invalid Command: INQUIRYFDSA.
A3DP+SRC>Pair 4
GAP_Initiate_Bonding(Dedicated): Success.
A3DP+SRC>
atLinkKeyRequest: 0x001a7d157ad8
GAP_Authentication_Response success.
A3DP+SRC>
atIOCapabilityRequest: 0x001a7d157ad8
Auth success.
A3DP+SRC>
atIOCapabilityResponse: 0x001a7d157ad8
Capabilities: No Input/Output
A3DP+SRC>
atUserConfirmationRequest: 0x001a7d157ad8
Auto Accepting: 130915
GAP_Authentication_Response success.
A3DP+SRC>Un-handled Auth. Event.
A3DP+SRC>
atLinkKeyCreation: 0x001a7d157ad8
Link Key Stored.
A3DP+SRC>
atAuthenticationStatus: 0 for 0x001a7d157ad8
A3DP+SRC>OpenSink 4
AUD_Open_Remote_Stream success.
A3DP+SRC>
etAUD_Stream_Open_Confirmation
Status: 1
BD_ADDR: 0x001a7d157ad8
Connection to 0x001a7d157ad8 failed.
A3DP+SRC>OpenSink 4
AUD_Open_Remote_Stream success.
A3DP+SRC>
atLinkKeyRequest: 0x001a7d157ad8
GAP_Authentication_Response success.
A3DP+SRC>
atAuthenticationStatus: 0 for 0x001a7d157ad8
A3DP+SRC>
etEncryption_Change_Result for 0x001a7d157ad8, Status: 0x00, Mode: Enabled.
A3DP+SRC>
etAUD_Signalling_Channel_Open_Indication
BD_ADDR: 0x001a7d157ad8
A3DP+SRC>
etAUD_Stream_Open_Confirmation
Status: 0
BD_ADDR: 0x001a7d157ad8
MediaMTU: 895
A3DP Open: 0
Stream Format:
Frequency: 48000
Channels: 2
Flags: 0
A3DP+SRC>Play 4
AUD_Change_Stream_State Failed: 0.
Function Error.
A3DP+SRC>
etAUD_Stream_State_Change_Confirmation
BD_ADDR: 0x001a7d157ad8
StreamState: Started
A3DP Start: 0
A3DP+SRC>Building SBC configuration based on these connection parameters:
MediaMTU: 895
Frequency: 48000
Channels: 2
FormatFlags: 0x00
CodecType: SBC
SFCM: 0x11
BLSAM: 0x15
Min Bit Pool: 10
Max Bit Pool: 53
Initializing SBC encoder using parameters:
Freq: 48000
Block Size: 16
Channel Mode: Joint Stereo
Allocation: Loudness
Subbands: 8
Bit Pool: 30
Timing Parameters:
MTU: 894
Frame Size: 73
Frames per Packet: 12
Packet Delay (MS): 32
Extra Time/Pkt: 536895712
Sent SBC packet # 100 (1200 total frames)
Sent SBC packet # 200 (2400 total frames)
Sent SBC packet # 300 (3600 total frames)
Sent SBC packet # 400 (4800 total frames)
Sent SBC packet # 500 (6000 total frames)
Sent SBC packet # 600 (7200 total frames)
Sent SBC packet # 700 (8400 total frames)
Sent SBC packet # 800 (9600 total frames)
Sent SBC packet # 900 (10800 total frames)
Sent SBC packet # 1000 (12000 total frames)
Sent SBC packet # 1100 (13200 total frames)
Sent SBC packet # 1200 (14400 total frames)
Sent SBC packet # 1300 (15600 total frames)
Sent SBC packet # 1400 (16800 total frames)
Sent SBC packet # 1500 (18000 total frames)
Sent SBC packet # 1600 (19200 total frames)
Sent SBC packet # 1700 (20400 total frames)
Sent SBC packet # 1800 (21600 total frames)
Sent SBC packet # 1900 (22800 total frames)
Sent SBC packet # 2000 (24000 total frames)
Sent SBC packet # 2100 (25200 total frames)
Sent SBC packet # 2200 (26400 total frames)
Sent SBC packet # 2300 (27600 total frames)
Sent SBC packet # 2400 (28800 total frames)
Sent SBC packet # 2500 (30000 total frames)
Sent SBC packet # 2600 (31200 total frames)
Sent SBC packet # 2700 (32400 total frames)
Sent SBC packet # 2800 (33600 total frames)
Sent SBC packet # 2900 (34800 total frames)
....
-------------------- End -----------------------------