Page 1 of 1

esp32 adf hfp examples bug

Posted: Thu Jan 09, 2025 10:40 am
by hamzatamer76
Hello, I am trying to make hands free with esp32 lyrat mini development board, but the pipelien_hfp and pipeline_a2dp_hfp examples in the sample codes do not work correctly. I selected lyrat mini via menuconfig. It connects to bluetooth, but its microphone does not work when making a phone call. The internal microphone on it does not detect the sound. There is no problem on the speaker side, the other party's voice comes to me.

Re: esp32 adf hfp examples bug

Posted: Fri Jan 10, 2025 9:51 am
by RaresCon
Hi! I think there is a problem in the example that I have observed without testing. While setting the control mode for the ES8388 codec (https://github.com/espressif/esp-adf/bl ... ple.c#L390), it is not set for ENCODE_DECODE mode, it is set only for DECODE, which power ups in the ES8388 driver only the DAC/line-out. I think you should change this to ENCODE_DECODE.

Let me know if this works. :D

Re: esp32 adf hfp examples bug

Posted: Mon Jan 13, 2025 12:06 pm
by hamzatamer76
No, it didn't work. I tried ENCODE, DECODE, BOTH and none of them worked. This card uses two codecs, one of them is adc codec es7243 and the other is dac codec es8311. So I think I should select BOTH options but it didn't work.

Re: esp32 adf hfp examples bug

Posted: Mon Jan 13, 2025 12:27 pm
by ok-home
hamzatamer76 wrote:
Mon Jan 13, 2025 12:06 pm
No, it didn't work. I tried ENCODE, DECODE, BOTH and none of them worked. This card uses two codecs, one of them is adc codec es7243 and the other is dac codec es8311. So I think I should select BOTH options but it didn't work.
I do not know for what reason, but on lyraT mini in esp-adf microphone is set to the left channel, you can try to switch to the right channel should work

Code: Select all

    i2s_cfg.std_cfg.slot_cfg.slot_mode = EXAMPLE_AUDIO_CHANNELS; // mono (1)
    i2s_cfg.std_cfg.slot_cfg.slot_mask = I2S_STD_SLOT_RIGHT;// redefine to right ch for lyraT mini
The bad thing is that this trick does not work in the voip examples, echo cancellation is set to the microphone in the left channel, echo in the right channel and I don't know how to deal with it.

Re: esp32 adf hfp examples bug

Posted: Wed Jan 22, 2025 11:47 am
by hamzatamer76
Thank you so much, It worked thanks to you.