This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

A3DPDemo_SRC: Play tone and no sound

Other Parts Discussed in Thread: CC2564MODNEM

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 -----------------------------

  • Hi Henry,

    Please let me know which platform you are trying it on.
    It seems you're a bit confused between A2DP and A3DP modes. Please check the datasheet for a detailed description.

    A3DP stands for Assisted Mode for A2DP where the SBC encoding/decoding happens at the device (CC256x) side as opposed to the host side in the case of A2DP (AudioEncoder.c).

    In the classic A2DP case, audio is exchanged as SBC frames, get transferred to the host via the UART interface. The host then decodes the data and transfers to the AudioCodec.

    In the A3DP case, the decoding happens in the CC256x side and the audio codec is connected directly to the CC256x device (and not the host processor).

    Please let me know what is the motivation behind porting AudioEncoder.c to A3DPDemo_SRC.

    Regards,
    Gigi Joseph.
  • Hi Josehp,

    First I want to make it clear that my application is a Bluetooth Audio SOURCE not a Bluetooth Audio SINK as in Bluetooth speakers or headsets. Its function is to send very simple audio tones (stored in memory and no hardware ADC Codec) to the Bluetooth speakers.

    I have the Tiva DK-Tm4c123g development kit and the CC2564MODNEM board to work with. As the Tia DK-Tm4c123g development kit does not have I2S connection to the CC2564MODNEM board through the EM connector, I think it's much better and convenient to use UART to send audio data to the CC2564MODNEM as in the A2DPDemo. So I try to use the codes from the A2DPDemo to send the tone through the UART. Otherwise I have to modify the DK-Tm4c123g board to connect to the I2S of the CC2564MODNEM using say SSI0 and SSI1. On the firmware side, I have to add in the I2S module. This takes too much effort as my schedule is very short says weeks.

    So is there a way to fix the Encoder.c functions to send data through UART to the Bluetooth module using A3DP. The other choices I have are:

    1) Porting the A2DPDemo to run on the Tiva Tm4c123g and selectt the audio SOURCE role. Right now it is only compiled for target Tiva tm4c129x. Is it easy or hard to port this codes? Note that it is my first time working with Tiva TM4C129/3 series.

    2) Modify the DK-Tm4c123g board to connect to the I2S of the CC2564MODNEM using 2 SSI ports, and add I2S module.

    BTW, what do you mean as you quote <In the A3DP case, the decoding happens in the CC256x side and the audio codec is connected directly to the CC256x device (and not the host processor).> Is that mean I can not emulate I2S to connect to the CC2564MODNEM using two SSI ports as in TI spma042b document, Dual-SPI Emulating I2S on Tiva™ C Series TM4C123x MCUs?

    Thank a lot,
    Henry Nguyen
  • HI,

    I believe option 1 is better suited for you.

    Regards,
    Gigi Joseph.
  • Hi Joshep,

    I think option 1 is better too.

    Thanks,

    Henry Nguyen