17 #define I2S_ROLE_MASTER 0 18 #define I2S_ROLE_SLAVE 1 26 #define I2S_MODE_LEFT_JUSTIFIED 0 27 #define I2S_MODE_RIGHT_JUSTIFIED 1 28 #define I2S_MODE_DSP_SHORT_FRAME_SYNC 2 29 #define I2S_MODE_DSP_LONG_FRAME_SYNC 3 37 #define I2S_CHANNEL_MODE_NUM_1 0 38 #define I2S_CHANNEL_MODE_NUM_2 1 39 #define I2S_CHANNEL_MODE_NUM_3 2 40 #define I2S_CHANNEL_MODE_NUM_4 3 41 #define I2S_CHANNEL_MODE_NUM_6 4 49 #define I2S_SLOT_WIDTH_8 0 50 #define I2S_SLOT_WIDTH_16 1 51 #define I2S_SLOT_WIDTH_24 2 52 #define I2S_SLOT_WIDTH_32 3 60 #define I2S_INTSTS_TX_FIFO (1 << 1) 61 #define I2S_INTSTS_RX_FIFO (1 << 2) 62 #define I2S_INTSTS_FIFO_ERR (1 << 3) 70 #define I2S_CMD_CLEAR_TX_FIFO (0x01) 71 #define I2S_CMD_CLEAR_RX_FIFO (0x02) 72 #define I2S_CMD_RX_DEGLITCH (0x03) 73 #define I2S_CMD_DATA_ENABLE (0x04) 74 #define I2S_CMD_CHANNEL_LR_MERGE (0x05) 75 #define I2S_CMD_CHANNEL_LR_EXCHG (0x06) 76 #define I2S_CMD_MUTE (0x07) 77 #define I2S_CMD_BIT_REVERSE (0x08) 85 #define I2S_CMD_DATA_ENABLE_TX (1 << 1) 86 #define I2S_CMD_DATA_ENABLE_RX (1 << 2) I2S configuration structure.
int bflb_i2s_feature_control(struct bflb_device_s *dev, int cmd, size_t arg)
Control i2s feature.
void bflb_i2s_link_txdma(struct bflb_device_s *dev, bool enable)
Enable i2s tx dma.
uint32_t bflb_i2s_get_intstatus(struct bflb_device_s *dev)
Get i2s interrupt status.
void bflb_i2s_init(struct bflb_device_s *dev, const struct bflb_i2s_config_s *config)
Initialize i2s.
void bflb_i2s_txint_mask(struct bflb_device_s *dev, bool mask)
Enable or disable i2s rx fifo threhold interrupt.
void bflb_i2s_link_rxdma(struct bflb_device_s *dev, bool enable)
Enable i2s rx dma.
void bflb_i2s_rxint_mask(struct bflb_device_s *dev, bool mask)
Enable or disable i2s rx fifo threhold interrupt.
void bflb_i2s_deinit(struct bflb_device_s *dev)
Deinitialize i2s.
uint8_t rx_fifo_threshold
void bflb_i2s_errint_mask(struct bflb_device_s *dev, bool mask)
Enable or disable i2s error interrupt.
uint8_t tx_fifo_threshold