I did get this to work, but not without some effort...
First, I applied the workaround given here to allow multiple SAI_TransferSendEDMA() to work.
How to reuse SAI_TransferSendEDMA in KSDK 2.0
Secondly, I copied over the SAI configuration from sai_edma_transfer.c, in particular
use the default SGTL config:
- sgtl_config_t codecConfig;
- codecConfig.bus = kSGTL_BusLeftJustified;
- codecConfig.master_slave = true;
- codecConfig.route = kSGTL_RoutePlayback;
- SGTL_Init(&codecHandle, &codecConfig);
+ SGTL_Init(&codecHandle, NULL);
And configure the SGTL as slave (SAI as master):
-#if !defined(DEMO_CODEC_WM8960)
- config.masterSlave = kSAI_Slave;
-#if defined(FSL_FEATURE_SAI_HAS_MCR) && (FSL_FEATURE_SAI_HAS_MCR)
- config.mclkOutputEnable = false;
-#endif
-#endif