How to make CYW920706 I2S/PCM slave in HFP Profile - Audio Gateway

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
markandreck-01
Level 1
Level 1
5 questions asked 10 sign-ins 5 replies posted

Hi, 

I want to interface my CYW20706  to a linear PCM codec device in slave mode.

I have been working with the CYW20706 for my intercom project for a while now. I have been able to use the sample HSP-Audio Gateway code using the Modulus ToolBox to initiate a connection with my Bluetooth headset.

I connected my CYW20706 to an I2S/PCM audio codec (Digilent Pmod I2S2) and I successfully managed to achieve the desired bidirectional audio communication. However, all along, the CYW20706 has been configured as the PCM master providing the required Serial clock/PCM_BCLK and Left-Right Clock/PCM_SYNC to the slave PCM audio codec.

I want to configure the CYW20706 in HFP-Audio Gateway as a PCM/I2S slave so that it can receive the PCM_BCLK and PCM_SYNC clocks from the PCM audio codec acting as the PCM master.

I have referred to the link below and it hasn't been helpful
https://community.infineon.com/t5/Resource-Library/PCM-I2S-Clock-setting-in-CYW20706/ta-p/246335

Regards

Mark

0 Likes
1 Solution
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

I simply tested the API on my side like follows. But I didn't see the error.

Owen_Zhang123_0-1660203148687.png

 

View solution in original post

7 Replies
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

Please try the following API located in wiced_hal_pcm.h:

typedef struct{
wiced_hal_i2spcm_path_t mode; /* 0:I2S, 1:PCM*/
wiced_hal_i2spcm_role_t role; /* I2S/PCM interface role: 0: slave; 1: master */
wiced_hal_pcm_param_t pcm_param; /* Configure pcm1 param here*/
}wiced_hal_pcm_config_t;

/**
* Function wiced_hal_set_pcm_config
*
* To set the pcm configuration parameter
*
* @param[in] pcm_config : strucure pointer
*
* @return void
*
*/
void wiced_hal_set_pcm_config (wiced_hal_pcm_config_t *pcm_config);

0 Likes
markandreck-01
Level 1
Level 1
5 questions asked 10 sign-ins 5 replies posted

Hi Owen,

Thanks for the reply. 

I found the API now I want to know exactly how I would implement it.

Regards

Mark

0 Likes
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

Please call the API in hfp_ag.c file during the hfp_ag_startup.

Owen_Zhang123_0-1660127468271.png

 

0 Likes
markandreck-01
Level 1
Level 1
5 questions asked 10 sign-ins 5 replies posted

This is what I've done and these are the errors that I got

markandreck01_0-1660128427594.png

 

0 Likes
markandreck-01
Level 1
Level 1
5 questions asked 10 sign-ins 5 replies posted

May you please help suggesting a way to get rid of the errors and have the API working

0 Likes
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

I simply tested the API on my side like follows. But I didn't see the error.

Owen_Zhang123_0-1660203148687.png

 

markandreck-01
Level 1
Level 1
5 questions asked 10 sign-ins 5 replies posted

Thanks for the assistance, I got it to work perfectly

0 Likes