Open heinzboehmer opened 1 month ago
@heinzboehmer
Great find! Let me think about the best fix here --- most likely increasing the size of the TX buffer as it is common to queue frames while waiting for the bus to become available. I'll probably still lower the call volume offset max value to something more sensible.
Thanks! -Ted
Makes sense!
Also, I think the current call vol offset max is fine. Phone calls on my phone are super quiet, so I have my offset set to something like +13.
Running on a CD53 with a V1 board and an S23 if that matters.
CONFIG_UI_CD53
setsvolStepMax = 1
, which means that when the call volume offset is sufficiently high, a bunch of commands will get written to the I-Bus TX buffer and it will overflow beforeHandlerBTCallStatus()
exits. This results in no resetting of the volume level once a call is over.Here's a log snippet showcasing the behavior:
Note that the 15 expected volume I-Bus commands are not sent, as the buffer overflows and the handler does not see them.
IBusCommandBlueBusSetStatus()
is the only thing sent.Another quick snippet after adding logging on overflow:
I "fixed" this locally by increasing the TX buffer size: https://github.com/tedsalmon/BlueBus/commit/93fc478243792ee3ef2804b5d202d9152a30ba2c
Wasn't sure if you'd rather increase the TX buffer size, decrease the max call offset or write a feature that blocks adding more commands to the buffer until there's space. Decided to open an issue instead of a PR to leave the fix approach up to you, Ted.
Not super high priority, but figured I'd let you know about it.