clean A1S, add ES8388 and generic codecs, add MCLK, clean Kconfig - release

This commit is contained in:
Philippe G
2021-08-03 21:51:33 -07:00
parent 987fa5d18c
commit ce9c3952e8
4 changed files with 51 additions and 35 deletions

View File

@@ -26,8 +26,16 @@ static int i2c_port = -1;
int adac_init(char *config, int i2c_port_num) {
char *p;
int i2c_addr = 0;
i2c_port = i2c_port_num;
// some crappy codecs require MCLK to work
if ((p = strcasestr(config, "mck")) != NULL) {
ESP_LOGI(TAG, "Configuring MCLK on GPIO0");
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO0_U, FUNC_GPIO0_CLK_OUT1);
REG_WRITE(PIN_CTRL, 0xFFFFFFF0);
}
i2c_port = i2c_port_num;
// configure i2c
i2c_config_t i2c_config = {
.mode = I2C_MODE_MASTER,