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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

347 Views
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 Kudos
1 Reply

327 Views
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 Kudos