feat(es3c28p): fix audio speed-up, boost mic gain, and correct I2S pinout
This commit is contained in:
@@ -113,13 +113,19 @@ static i2s_data_bit_width_t to_esp32_bits_per_sample(uint8_t bits) {
|
||||
}
|
||||
|
||||
static void get_esp32_std_config(Esp32I2sInternal* internal, const I2sConfig* config, i2s_std_config_t* std_cfg) {
|
||||
i2s_slot_mode_t slot_mode = I2S_SLOT_MODE_STEREO;
|
||||
if ((config->channel_left != I2S_CHANNEL_NONE && config->channel_right == I2S_CHANNEL_NONE) ||
|
||||
(config->channel_left == I2S_CHANNEL_NONE && config->channel_right != I2S_CHANNEL_NONE)) {
|
||||
slot_mode = I2S_SLOT_MODE_MONO;
|
||||
}
|
||||
|
||||
std_cfg->clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(config->sample_rate);
|
||||
std_cfg->slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(to_esp32_bits_per_sample(config->bits_per_sample), I2S_SLOT_MODE_STEREO);
|
||||
std_cfg->slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(to_esp32_bits_per_sample(config->bits_per_sample), slot_mode);
|
||||
|
||||
if (config->communication_format & I2S_FORMAT_STAND_MSB) {
|
||||
std_cfg->slot_cfg = I2S_STD_MSB_SLOT_DEFAULT_CONFIG(to_esp32_bits_per_sample(config->bits_per_sample), I2S_SLOT_MODE_STEREO);
|
||||
std_cfg->slot_cfg = I2S_STD_MSB_SLOT_DEFAULT_CONFIG(to_esp32_bits_per_sample(config->bits_per_sample), slot_mode);
|
||||
} else if (config->communication_format & (I2S_FORMAT_STAND_PCM_SHORT | I2S_FORMAT_STAND_PCM_LONG)) {
|
||||
std_cfg->slot_cfg = I2S_STD_PCM_SLOT_DEFAULT_CONFIG(to_esp32_bits_per_sample(config->bits_per_sample), I2S_SLOT_MODE_STEREO);
|
||||
std_cfg->slot_cfg = I2S_STD_PCM_SLOT_DEFAULT_CONFIG(to_esp32_bits_per_sample(config->bits_per_sample), slot_mode);
|
||||
}
|
||||
|
||||
if (config->channel_left != I2S_CHANNEL_NONE && config->channel_right == I2S_CHANNEL_NONE) {
|
||||
|
||||
Reference in New Issue
Block a user