/* Configure ES8388 DAC mute or not. Basically you can use this function to mute the output or unmute.  */
esp_err_t es8388_set_voice_mute(bool enable)
/* Configure ES8388 DAC mute or not. Basically you can use this function to mute the output or unmute.  */
esp_err_t es8388_set_voice_mute(bool enable)
{
    esp_err_t res = ESP_OK;
    uint8_t reg = 0;
    res = es_read_reg(ES8388_DACCONTROL3, &reg);
    reg = reg & 0xFB;
    res |= es_write_reg(ES8388_ADDR, ES8388_DACCONTROL3, reg | (((int)enable) << 2));
    return res;
}