-
Notifications
You must be signed in to change notification settings - Fork 175
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
how to configure voice data which from bt to PCM format ? #238
Comments
Thank you @zhou88mang for the details. Which host do you use? (Linux/MCU)? Which one precisely? Which stack do you use for Bluetooth? Can you please provide the sdkconfig , esp log and host side bluetooth logs like btmon, Bluetooth TL logs? |
thank for your replay! host logs : [834.151682] [00:13:54.151] LOG -- hfp.c.241: HFP_TX OK [834.151939] [00:13:54.151] ACL => 80 00 1E 00 1A 00 41 00 09 EF 2A 00 0D 0A 2B 42 52 53 46 3A 31 36 33 36 35 0D 0A 0D 0A 4F 4B 0D 0A 40 OK [834.242748] [00:13:54.242] ACL => 80 00 26 00 22 00 41 00 09 EF 3A 00 0D 0A 2B 43 49 4E 44 3A 31 2C 30 2C 30 2C 33 2C 35 2C 30 2C 30 0D 0A 0D 0A 4F 4B 0D 0A 40 [834.283238] [00:13:54.283] LOG -- hfp.c.241: HFP_TX [834.283444] [00:13:54.283] ACL => 80 00 0F 00 0B 00 41 00 09 EF 0C 00 0D 0A 4F 4B 0D 0A 40 OK [834.320363] [00:13:54.320] ACL => 80 00 26 00 22 00 41 00 09 EF 3A 00 0D 0A 2B 43 48 4C 44 3A 28 31 2C 31 78 2C 32 2C 32 78 2C 33 29 0D 0A 0D 0A 4F 4B 0D 0A 40 [834.360937] [00:13:54.360] LOG -- hfp.c.918: sco_handle 0x180, address E0:9D:FA:5C:9D:AE, transmission_interval 12 slots, retransmission_interval 2 slots, rx_packet_length 60 bytes, tx_packet_length 60 bytes, air_mode 0x 2 (0x02 == CVSD) [834.361748] Audio connection established with SCO handle 0x0180. [834.366153] [00:13:54.366] ACL => 80 00 0F 00 0B 00 41 00 09 EF 0C 00 0D 0A 4F 4B 0D 0A 40 [834.412096] [00:13:54.412] ACL => 80 00 0F 00 0B 00 41 00 09 EF 0C 00 0D 0A 4F 4B 0D 0A 40 [834.456337] [00:13:54.456] ACL => 80 00 0F 00 0B 00 41 00 09 EF 0C 00 0D 0A 4F 4B 0D 0A 40 [834.501644] [00:13:54.501] LOG -- hfp_ag.c.2515: HF speaker gain = 14 [834.502222] [00:13:54.502] ACL => 80 00 0F 00 0B 00 41 00 09 EF 0C 00 0D 0A 4F 4B 0D 0A 40 [834.546949] [00:13:54.546] LOG -- hfp_ag.c.2521: HF microphone gain = 14 my problem is that i found data from pcm interface of esp32 is i2s format by measuring , but the pcm interface of my host chip can only support pcm protocol(mode A , mode B), so i want know whether esp32 can set pcm signal to pcm format instead of i2s format |
Hello @zhou88mang , Thank you for the logs. Can you please attach the sdkconfig at your side? |
this is sdkconfig : and my code related pcm configure is as same as hfp-ag demo of esp-idf, as follow :
|
Hello @zhou88mang , espressif/esp-idf#11589 was created with idf. As i can see, you had closed this issue, which internally closes our internal idf ticket. In ESP-Hosted, We use controller and use HCI packets. ESP-IDF example hfp-ag demo is over Bluedriod (stack runs without HCI interface, which is fundamentally difference in ESP-Hosted and HFP_AG example. As HCI is directly consumed at controller, if something is not working as expected, it must be either at the stack configuration or controller consuming hci. Is the issue resolved? If not, please reopen espressif/esp-idf#11589. |
I hope you have not changed the code apart from enabling uart and using max SCO connections. Crux here is that ESP-Hosted uses HCI interface (stack over host, controller over esp) whereas, ESP-IDF example hfp_ag uses Bluedroid directly in conjunction with controller locally present. |
Thank for your reply ! |
but, if i just use HFP-AG demo , i did not found any ways to configure pcm format , it just provided the function "app_gpio_pcm_io_cfg", I don't know how it generated these pcm signals inside, I suspect this was done inside the controller, |
The Bluetooth team was looking in this matter till you had closed espressif/esp-idf#11589 |
any progress ahead? |
I successfully implemented the Bluetooth function using btstack + esp-hosted, but there was one problem, i set BR/EDR Sync(SCO/eSCO) default datapath PCM .By measuring the output pin of the pcm, I found that the format of these signals is i2s format , but the signal I really want is PCM format, is there any way to configure the format of these output signals?
The text was updated successfully, but these errors were encountered: