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.

CC2564MODNEM: A2DP repeater with a CC2564MODNEM and a STM3240G-EVAL board

Part Number: CC2564MODNEM
Other Parts Discussed in Thread: CC256XSTBTBLESW

Hi,

Does the Audio Manager from the CC256XSTBTBLESW's AUDDemo sample code initialized via AUD_Initialize() support both Sink and Source role at the same time ?

I've initialized both InitializationInfoSNK and InitializationInfoSRC parameter in the AUD_Initialization_Info_t structure given to AUD_Initialize() and I'm getting a sink stream when I'm pairing with a bluetooth speaker.

The only way I can get a source stream is to live InitializationInfoSNK parameter uninitialized.

Best regards,

Jo

  • Jo,

    Can you please provide us details on exactly how are you initializing the AUD_Initialization_Info_t struct? If your application is based on the AUDDemo, you can copy the Initialize_Sink function in the reply below.

    Best regards,
    Vihang
  • Hi Vihang,

    Here is my Initialize_Sink() function :

    static int Initialize_Sink(void)
    {
       int                                      ret_val;
       AUD_Initialization_Info_t                InitializationInfo;
       AUD_Stream_Initialization_Info_t         InitializationInfoSNK;
       AUD_Stream_Initialization_Info_t         InitializationInfoSRC;
       AUD_Remote_Control_Initialization_Info_t InitializationInfoAVR;
       AUD_Remote_Control_Role_Info_t           RemoteControlRoleInfo;
    
       /* First, check to make sure that a valid Bluetooth Stack ID exists. */
       if(BluetoothStackID)
       {
          /* Next, check to make sure that the Audio Manager has not already*/
          /* been initialized.                                              */
          if(!Initialized)
          {
             VolumeChangedEventTransactionID = -1;
    
             /* Audio has not been initialized, now let's attempt to        */
             /* initialize it.                                              */
             BTPS_MemInitialize(&InitializationInfo, 0, sizeof(AUD_Initialization_Info_t));
             BTPS_MemInitialize(&InitializationInfoSNK, 0, sizeof(AUD_Stream_Initialization_Info_t));
             BTPS_MemInitialize(&InitializationInfoSRC, 0, sizeof(AUD_Stream_Initialization_Info_t));
             BTPS_MemInitialize(&InitializationInfoAVR, 0, sizeof(AUD_Remote_Control_Initialization_Info_t));
             BTPS_MemInitialize(&RemoteControlRoleInfo, 0, sizeof(AUD_Remote_Control_Role_Info_t));
    
             InitializationInfo.SNKInitializationInfo           = &InitializationInfoSNK;
             InitializationInfo.SRCInitializationInfo           = &InitializationInfoSRC;
             InitializationInfo.RemoteControlInitializationInfo = &InitializationInfoAVR;
    
             InitializationInfoSNK.EndpointSDPDescription       = (char *)SinkDescription;
             InitializationInfoSNK.NumberConcurrentStreams      = 1;
             InitializationInfoSNK.NumberSupportedStreamFormats = NUM_SNK_SUPPORTED_FORMATS;
             BTPS_MemCopy(InitializationInfoSNK.StreamFormat, AudioSNKSupportedFormats, sizeof(AudioSNKSupportedFormats));
             
             InitializationInfoSRC.EndpointSDPDescription       = (char *)SourDescription;
             InitializationInfoSRC.NumberConcurrentStreams      = 1;
             InitializationInfoSRC.NumberSupportedStreamFormats = NUM_SNK_SUPPORTED_FORMATS;
             BTPS_MemCopy(InitializationInfoSRC.StreamFormat, AudioSNKSupportedFormats, sizeof(AudioSNKSupportedFormats));
    
             InitializationInfoAVR.ControllerRoleInfo           = &RemoteControlRoleInfo;
             InitializationInfoAVR.SupportedVersion             = apvVersion1_0;
    
             RemoteControlRoleInfo.ProviderName                 = (char *)ProviderName;
             RemoteControlRoleInfo.ServiceName                  = (char *)ControllerDescription;
             RemoteControlRoleInfo.SupportedFeaturesFlags       = SDP_AVRCP_SUPPORTED_FEATURES_CONTROLLER_CATEGORY_1;
    
             /* Everything has been initialized, now attemp to initialize   */
             /* the Audio Manager.                                          */
             ret_val = AUD_Initialize(BluetoothStackID, &InitializationInfo, AUD_Event_Callback, 0);
             if(!ret_val)
             {
                DisplayFunctionSuccess("AUD_Initialize() Sink");
    
                Initialized = TRUE;
             }
             else
                DisplayFunctionError("AUD_Initialize()", ret_val);
          }
          else
             ret_val = -1;
       }
       else
          ret_val = -1;
    
       return(ret_val);
    }


    Best regards,
    Jo

  • For some reason the default stream mode is sink so the first connected device is the sink and the second is the source.
    So now the reapeater works, in the future we may have to change this behaviour but for now it is acceptable.
    Thanks a lot,
    Jo