FRDM K66F: Question about setting audio codec sample rate (sai_edma_transfer example)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

FRDM K66F: Question about setting audio codec sample rate (sai_edma_transfer example)

519 次查看
joseph_decunha
Contributor I

Hello,

Thank you in advance for your help.

I noticed in the sai_edma_transfer example, that in the sai_edma_transfer.c file, the audio codec seems to be configured twice. Once, the parameters of the audio are given by DEMO_AUDIO_BIT_WIDTH, DEMO_AUDIO_SAMPLE_RATE, etc. And additionally, a struct da7212Config, also takes the audio sample rate and bit width.

Is anyone able to explain the differences between the two repeated sets of parameters to me?

Thank you for your help,

Joseph

 

0 项奖励
回复
1 回复

499 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello,

Only for being sure are you referring to this macro,

#define DEMO_AUDIO_BIT_WIDTH    kSAI_WordWidth16bits
#define DEMO_AUDIO_SAMPLE_RATE  (kSAI_SampleRate16KHz)

and why this macro is not called in this structure?

    .format       = {.mclk_HZ = DEMO_AUDIO_MASTER_CLOCK, .sampleRate = 16000, .bitWidth = 16},

Did I understand well your question?

Best regards,
Pavel

0 项奖励
回复