-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Errors when closing audio in HFP examples (IDFGH-6239) #7911
Comments
Hi @skateskate, Please attach the elf file, it does help to locate the crash. Thanks |
@skateskate The error-1 is caused by logs. Set The other two errors need the information of elf file. |
Hello @BetterJincheng, thanks for the reply.
I have initialized I2S to 16 kHz - 16 bit, so every 7.5 ms I can read 480 byte (16 kHz * 7.5 ms * 2 byte * 2 channels) inside
Is it correct to set I edited the logs of the Error 1 in the original post to make the operations a little bit clearer, I added where the AG commands are sent. As you can see in the last
I have made different tests these days and I don't have anymore the original ELF files, I will save and upload them the next time I have the crashes. |
Hi @skateskate , May I know if you have fixed the issue? I'm using the LyraT V4.3 as a hands-free unit, it has a lot of problems. Would you mind sharing more about your project.? |
Hello @mingchau, sorry for the late reply. Unfortunately, I haven't fixed my problems yet, the project is "on hold" for now, I didn't make any progress. The error that was most frequent was the |
Environment
Problem Description
I have two LyraT boards and I would like to use one as AG and the other one as client. My code is based on
hfp_ag
andhfp_hf
examples respectively, I have only made some changes in order to use I2S to trasmit/receive audio generated from the microphones. Connection and audio opening work good, but I have problems when I try to disconnect audio with thedisa
console command: most of the times it works ok, but sometimes, randomly, I have different errors as you can see from the Debug Logs section. Thecona
/disa
commands can come from the AG or the client.As you can see some errors reboot the boards, others flood the serial port with warnings and errors. When these errors happen, I have to reboot the boards in order to use them again. I have modified the following parameters in the menuconfig:
BR/EDR Sync(SCO/eSCO) max connections --> 1
BR/EDR Sync(SCO/eSCO) default data path --> HCI
audio(SCO) data path --> HCI
Wide band speech --> ON
Following other posts I have also tried to modify the
#define BTM_SCO_DATA_SIZE_MAX
to240
instead of120
in thebt_target.h
file located atesp-idf\components\bt\host\bluedroid\common\include\common
. The system seems more stable with less frequent errors but I don't know if I am supposed to modify that parameter.Expected Behavior
Close the audio communication with
disa
command correctlyActual Behavior
Sometimes the system can't close the audio connection correctly with
disa
, different errors appear in the serial console.Code to reproduce this issue
This is the part which is called when the audio closes, it is the same for the AG and the client. I took it from the AG example code.
The main task is the following (it is the same for the AG and the client), with semaphore given every 7.5 ms in order to follow the mSBC rules (240 bytes every 7.5 ms); it transfer 240 byte to the ring buffer which is then emptied in the outgoing callback. The structure is similar to
hfp_ag
example code.Debug Logs
Error 1:
cona
command from the client,disa
command from the AG. As you can see the system works correctly various times before printing the errors.Error 2: audio opening and closing from the client, assert failed.
Error 3: cona and disa from the AG:
As I said before, the errors happen randomly, I couldn't find any correlation.
The text was updated successfully, but these errors were encountered: