headphone (hfp/hsp) over bluetooth not working (using bluez4 for hfp support).
Connection is established correctly but audio transfer to headphone does not give audio in speaker.
both audio transfers (mic and speaker) does not work, but also no error in function calls.
audio using bluetooth a2dp works correctly, but hfp/hsp does not work.
hen another bluetooth dongle (BCM92046DG-CL1ROM) is connected to the intel-edison over usb and used for communication (edison internal bluetooth disabled using rfkill) , the headphone works ok.
system-setup / environment:
carkit/headset (dymond ck02)
edison yocto build from edison-src-weekly-68.tgz, modified:
- removed bluez5 (bluez 5 does not include headphone support anymore)
- installed blues4
- installed alsa-lib
- small non-sourcecode modifications to be able to build the image
(most times missing include and lib files temporarily copied from /edison-src/build/tmp/sysroot/edison/usr/[include or lib] )
- simple /etc/asound.conf for type bluetooth profile voice
- kernel added CONFIG_BT_HCIBTUSB to test other bluetooth dongles
bcm43340 wifi/bluetooth chip bug / firmware problem / driver problem.
In the past I had simular problems with another broadcom dongle, using newer firmware fixed it. But in this case I don't have access to newer firmware for the bcm43340 so I cannot test this.
I think for HFP as well as for A2DP you'd have to set up pulseaudio and correctly connect BlueZ via ALSA.
I'd assume it definitely wouldn't work out of the box
thinks are little bit more complicate:
- from Bluez5 the HFP/HSP profiles support has been removed as Daniele mentioned; expectation is that an external component, like ofono, implement a bluez plugin for that;
- pulseaudio5 starts to support new Bluez5 interfaces but only a2dp is supported (check pulseaudio5 notes); there is an ongoing effort to support HFP/HSP in 5.99.1
- pulseaudio4 is back-ward compatible with bluez4 so you can use bluez4 package (as done in the reported question). (or use alsa lib)
So at the end you have 2 otions:
- rollback to bluez4 + alsa/pulseaudio
- use bluez5 + ofono + PulseAudio 5.99.1
First option is the one originally followed and no audio is there; the reason may be in the BT controller that may be configured to route audio over PCM/i2s interface and not over HCI (when you plug an usb dongle audio-sco is exposed via hci as it is the only option).
You may try to play with audio route configuration as below:
# SCO settings
scopcm = 1,0,0,0,0,0,0,0,0,0
Above file seems to be read by bluetooth-rfkill-event daemon that run in background on Edison and that automatically launch the brcm_patchram_plus utility on rfkill unblock event on BT interface.
Check at below link for scopcm and other brcm_patchram_plus options:
https://code.google.com/p/broadcom-bluetooth/source/browse/brcm_patchram_plus.c brcm_patchram_plus.c - broadcom-bluetooth - Broadcom Bluetooth chip Support on Linux - Google Project Hosting
Hope this helps