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)

812件の閲覧回数
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 返信

792件の閲覧回数
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 件の賞賛
返信