On reset, all the MMRs will be
initialized to their default values and clocks are disabled.
Enable the SOC CLK and pull the
I2S clock enable high to configure the MMRs. Don't configure the
I2S clock generation MMR at PRCM module at this point.
For I2S BCLK loop back configure the loopback pad as input for BCLK
to pass through
Configuration sequence of I2S MMR:
All the general configurations of I2S to be done (pins,
serial format, clocks, sample word sizes, channel mapping, div values
for audio clock gen)
Once the I2S audio clock gen unit related configuration is
done, configure the audio clock MMR in ckmdig. [Note: Optional if
internally generated clocks are to be used for I2S
operation.]
Make AIFCLKCTL.WB_EN = 1 to enable the generation of wclk and bclk.
[Note: Optional if we want to enable the internal generation of clocks.]
AIFWCLKSRC.WCLK_SRC can be configured to select either internal or
external clock generator source. After this, bclk will be provided to
bclk domain and its configuration cannot change. Otherwise, it will lead
to metastability issues.
Configure the DMA sequence. This will enable the AIF module.
Configure the MMRs related with the samplestamp generator.