Excuse me, I’d like to switch Xiaozhi’s audio input to I2S input to increase the microphone pickup distance. I’ve changed the default input path to I2S in Xiaozhi’s menuconfig, and modified the I2S to master mode in audio_server.c. Now the Xiaozhi wake word can be recognized, but there is no audio output. Resampling works fine and returns the correct number of bytes, but the audio write function returns 0. Additionally, if I enable pa.is_need_3a = 1;, it keeps printing 3a_w rbuf_far empty. Is this an issue? Need help.
while (!audio_mgr->is_online_exit)
{
ret = audio_write(audio_mgr->speaker, (uint8_t *)sifli_resample_get_output(audio_mgr->resample), resample_len);
if (ret > 0) {
break;
}
LOG_E("func: %s, speaker write failed error %d\n", __func__, ret);
rt_thread_mdelay(10);
if (retry ++ > 10) {
rt_kprintf("func: %s, speaker write failed retry: %d, resample_len: %d\n", __func__, retry, resample_len);
break;
}
}

