esp-idf icon indicating copy to clipboard operation
esp-idf copied to clipboard

Bluetooth HFP Audio Gate PCM waveform mode I2S (esp-idf-v5.2) (IDFGH-12609)

Open Ageofenigma opened this issue 10 months ago • 10 comments

Answers checklist.

  • [X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • [X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • [X] I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

I want to use PCM mode in the I2S interface for Bluetooth HFP Audio Gate Example to be a slave for SIMCom modem. Simcom supports only PCM waveform mode ( 256 kHz clock, mono, short 16 bit ). Is it possible to rebuild lib to be able to use this mode? (esp-idf-v5.2)

Ageofenigma avatar Apr 14 '24 22:04 Ageofenigma

Hi, according to your requirements [256 kHz clock, mono, short 16 bit], this is the corresponding lib file based on idf version v5.2. [libbtdm_app.zip] The requirement about slave role can be configured in esp-idf. If you have any questions, feel free to ask.

esp-qing avatar Apr 15 '24 11:04 esp-qing

It builds but esp_bt_controller_init returns "ESP_ERR_INVALID_ARG"

Ageofenigma avatar Apr 15 '24 17:04 Ageofenigma

This lib file corresponds to esp-idf version 5.2.1. Could you please confirm which version of esp-idf you are using? You can view the log output from the compilation of the previous lib file.

esp-qing avatar Apr 16 '24 06:04 esp-qing

idf.py --version shows ESP-IDF v5.2.1-dirty

Ageofenigma avatar Apr 16 '24 08:04 Ageofenigma

Hi, this is the new lib file corresponding to idf version 5.2.1(commit a322e6bd), please try again. libbtdm_app.zip

esp-qing avatar Apr 16 '24 09:04 esp-qing

It works thanks, but I figured out that the SimCom clock is 2048 KHz and looks like this: SIMCOM_PCM Could you change the clock to 2048 KHz? Will it work for the waveform like this?

Ageofenigma avatar Apr 16 '24 19:04 Ageofenigma

Is it possible to rebuild it to 2048 KHz clock?

Ageofenigma avatar Apr 18 '24 09:04 Ageofenigma

Hi, the default synchronization clock of esp-idf is 8kHZ, and the default data clock is 256kHZ. I guess the clock you want to modify is the data clock. There has never been a requirement to modify the clock before. Sorry, after trying, It cannot be directly modified to 2048kHZ at the moment and It will take some time to improve this feature. Maybe you can try modifying the SimCom clock? If you have any further questions please feel free to ask.

esp-qing avatar Apr 18 '24 10:04 esp-qing