Azure Sphere MT3620 M4 API Reference Manual
|
This section introduces the enumerations that I2S should configure before performing transfer. More...
This section introduces the enumerations that I2S should configure before performing transfer.
I2S link channel per sample.
Before I2S transfer, users should make sure that the parameter is defined in hal_i2s_link_config structure and configured through mtk_mhal_i2s_set_config() and just used in TDM mode.
Enumerator | |
---|---|
MHAL_I2S_LINK_CHANNLE_PER_SAMPLE_2 |
Two channels in each frame sync cycle. |
MHAL_I2S_LINK_CHANNLE_PER_SAMPLE_4 |
Four channels in each frame sync cycle. |
I2S bits per sample.
Before I2S transfer, users should make sure that the parameter is defined in hal_i2s_link_config structure and configured through mtk_mhal_i2s_set_config().
Enumerator | |
---|---|
MHAL_I2S_BITS_PER_SAMPLE_32 |
32 bits in each frame sync cycle. |
MHAL_I2S_BITS_PER_SAMPLE_64 |
64 bits in each frame sync cycle. |
MHAL_I2S_BITS_PER_SAMPLE_128 |
128 bits in each frame sync cycle. |
enum hal_i2s_tx_mode |
Enable or disable the right channel of I2S Tx sending the same data as the left channel of I2S Tx.
Before I2S transfer, users should make sure that the parameter is defined in hal_i2s_link_config structure and configured through mtk_mhal_i2s_set_config().
Enumerator | |
---|---|
MHAL_I2S_TX_MONO_DUPLICATE_DISABLE |
The right channel of Tx sends all 0. |
MHAL_I2S_TX_MONO_DUPLICATE_ENABLE |
The right channel of Tx sends the same data as the left channelof I2S Tx. |
enum hal_i2s_rx_down_rate |
Enable or disable 2x down sample rate mode in the I2S Rx link.
There is a mode that the sample rate of I2S Tx is 48kHz and the sample rate of I2S Rx is 24kHz. And in this mode, I2S Rx will drop one sample in each two input samples automatically. Before I2S transfer, users should make sure the parameter is defined in hal_i2s_link_config structure and configured through mtk_mhal_i2s_set_config().
Enumerator | |
---|---|
MHAL_I2S_RX_DOWN_RATE_DISABLE |
Real sample rate of I2S Rx = sample rate. |
MHAL_I2S_RX_DOWN_RATE_ENABLE |
Real sample rate of I2S Rx is 1/2 of the sample rate. |
I2S channel number define.
Before I2S transfer, users should make sure that the parameter is defined in hal_i2s_link_config structure and configured through mtk_mhal_i2s_set_config().
Enumerator | |
---|---|
MHAL_I2S_MONO |
This value means one channel. |
MHAL_I2S_STEREO |
This value means two channels. |
enum i2s_no |
I2S port number.
This parameter is defined in the mtk_i2s_ctlr structure, which is used by the user to specify the I2S port.
Enumerator | |
---|---|
MHAL_I2S0 |
I2S port is i2s0. |
MHAL_I2S1 |
I2S port is i2s1. |
enum i2s_fnen |
Function enable/disable.
Before I2S transfer, users should make sure that the parameter is defined in hal_i2s_link_config structure, which is used in lr_swap and word_select_inverse. They are configured through mtk_mhal_i2s_set_config().
Enumerator | |
---|---|
MHAL_FN_DIS |
Function disable. |
MHAL_FN_EN |
Function enable. |
enum hal_i2s_initial_type |
This enum defines the initial type of I2S.
Before I2S transfer, users should use the parameter in mtk_mhal_i2s_cfg_type() function to set I2S HW initial parameter
Enumerator | |
---|---|
MHAL_I2S_TYPE_EXTERNAL_MODE |
I2S external mode. |
MHAL_I2S_TYPE_EXTERNAL_TDM_MODE |
I2S external TDM mode. |
MHAL_I2S_TYPE_INTERNAL_LOOPBACK_MODE |
I2S internal loopback mode. |
enum hal_i2s_sample_rate |
I2S sample rate define.
Before I2S transfer, users should make sure that the parameter is defined in hal_i2s_link_config structure and configured through mtk_mhal_i2s_set_config().