Bluetooth HFP echo on receiver side

When making a bluetooth hands free phone call, the person on the receiving end of the call hears an echo (or loopback) of their own voice with an aprox 1 second delay. The feedback IS NOT caused by a speaker feeding back into a microphone.

I was using this Toradex article as a guide How to Setup Bluetooth Audio Profiles (Linux) | Toradex Developer Center

Environment info:

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           5.15.129-6.4.0-devel+git.67c3153d20ff #1 SMP PREEMPT Wed Sep 27 12:30:36 UTC 2023
Kernel command line:      root=PARTUUID=72b5ae8b-02 ro rootwait console=tty1 console=ttymxc2,115200 consoleblank=0 earlycon
Distro name:              NAME="TDX Wayland with XWayland"
Distro version:           VERSION_ID=6.4.0-devel-20231220205908-build.0
Hostname:                 verdin-imx8mp-15006329
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Verdin iMX8M Plus WB on Verdin Development Board
Toradex version:          0058 V1.1A
Serial number:            15006329
Processor arch:           aarch64
------------------------------------------------------------

Bluez v5.65
BlueALSA v16.1

Hey @david.bouthillier,

For general checking: Can you switched out the speaker/microphone to validate the issue most likely relating to software? Also can you share how you know it’s not related to speaker->microphone feedback?

Can you describe your hardware setup, and what software steps you are taking to produce this event?

-Eric

I have a Verdin board with an IMX8MP. I’m using headphones for the audio (completely sealed), and the device has an integrated microphone. I used bluetoothctl to connect my iPhone. I initiate a phone call on my iPhone to another phone. I then ran the following BlueALSA scritp (from the tutorial).

alsaloop -g /dev/stdin <<EOF
-C bluealsa:SRV=org.bluealsa,DEV=A0:56:F3:97:94:4C,PROFILE=sco -P plughw:0 -r 8000 -c 2 -f s16_le -n -t 40000 -T 1
-C plughw:0 -P bluealsa:SRV=org.bluealsa,DEV=A0:56:F3:97:94:4C,PROFILE=sco -r 8000 -c 2 -f s16_le -n -t 40000 -T 2
EOF

On my end (bluetooth connect through embedded device), I can hear the person on the other phone perfectly, and they can hear me perfectly.

However, on the receiver end, they hear their voice repeated back to them with an aprox 1 second delay. On my end, I never hear any feedback, echo, or loopback.

This is the issue I cannot seem to figure out.

Hey @david.bouthillier,

Just wanted to check in and report that I will try and recreate your experience.

-Eric

1 Like

Hey @david.bouthillier,

Looking through your old post, you stated that you updated bluealsa to v4.1.1. Can you confirm you did this? I ran into some gdbus-codegen issues when attempting.

-Eric

Yes, we upgraded to v4.1.1-90-gc18e812

I’m not on the build team, so I’m not exactly sure how it was done. We upgraded because there was a bug in the old version that caused a crash for us.

Hey @david.bouthillier,

Unfortunately I couldn’t recreate the error. I will escalate the topic on our end, that most likely won’t provide any immediate solution. I would recommend reaching out to the bluez-alsa community on their
git-hub link and maybe they can provide specific guidance.

-Eric

Ok, keep us updated. This is critical for us to resolve.

I have already reached out to the Blue ALSA folks, the PulseAudio team, and the Bluez community. I did not have any success resolving the issue.