/* Get i2s audio sampling rate handled by device.  */
static uint32_t i2s_get_audio_freq(uintptr_t reg)
/* Get i2s audio sampling rate handled by device.  */
static uint32_t i2s_get_audio_freq(uintptr_t reg)
{
	uint32_t reg_data = litex_read32(reg + I2S_CONFIG_OFFSET);
	reg_data &= I2S_CONF_LRCK_MASK;
	return reg_data >> I2S_CONF_LRCK_FREQ_OFFSET;
}