Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get MCLK in hfp_ag (IDFGH-12077) #13138

Open
3 tasks done
smishra123 opened this issue Feb 8, 2024 · 1 comment
Open
3 tasks done

Get MCLK in hfp_ag (IDFGH-12077) #13138

smishra123 opened this issue Feb 8, 2024 · 1 comment
Assignees
Labels
Status: In Progress Work is in progress

Comments

@smishra123
Copy link

smishra123 commented Feb 8, 2024

Answers checklist.

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

General issue report

I am working with hfp_ag on LyraT 4.3 board to build a custom product. The product almost works. The only issue left is getting MCLK from BT controller to the ES8388 audio chip. I have configured the audio chip and verified the configuration. However ES8388 on LyraT 4.3 seems to need the MCLK to function.

I can see all the I2S signals except MCLK on the oscilloscope when hfp-ag and headset combination are in a call. The LRCK is 8KHz while the SCLK is 256 KHz. When I loop back I2S data in and data out, the LyraT 4.3 board running hfp_ag echoes back what I have spoken in the headset. However without the MCLK input to ES8388 I cannot use the mic or speaker connected to ES8388.

I added the following function calls in to main.c in hfp_ag/main . These are adapted from i2s_check_set_mclk function in i2s_common.c. However this does not seem to work. My assumption was that the Bluetooth stack and controller generated the I2S signals and were also generating the MCLK, but that the MCLK was not made available on the GPIO pin since that pin could vary from board to board.

gpio_hal_iomux_func_sel(PERIPHS_IO_MUX_GPIO0_U, FUNC_GPIO0_CLK_OUT1);

//gpio_ll_iomux_pin_ctrl(is_apll ? 0xFFF6 : (is_i2s0 ? 0xFFF0 : 0xFFFF));
gpio_ll_iomux_pin_ctrl(0xFFFF); // i tried all 3 combinations
@espressif-bot espressif-bot added the Status: Opened Issue is new label Feb 8, 2024
@github-actions github-actions bot changed the title Get MCLK in hfp_ag Get MCLK in hfp_ag (IDFGH-12077) Feb 8, 2024
@esp-qing
Copy link
Collaborator

Hi, this may be a configuration issue of the board in IDF. Please refer to the examples in ADF to modify the board configuration.
https://github.com/espressif/esp-adf/tree/master/examples/player/pipeline_hfp_stream

@espressif-bot espressif-bot added Status: In Progress Work is in progress and removed Status: Opened Issue is new labels Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: In Progress Work is in progress
Projects
None yet
Development

No branches or pull requests

3 participants