Android bluetooth HFP client on DragonBoard 410c


#1

Hello,
I’m trying to activate HFP client and, eventually, a2dp bluetooth profiles on DragonBoard 410c. Technically I need DragonBoard as a simple bluetooth headset with ability to answer/reject calls and listen music content from the phone.
Tried to assembly some pieces of information available on the net but it still does not work.
Here is my config.xml from /packages/apps/Bluetooth/res/values (Android 6.0.1):

<bool name="profile_supported_a2dp">true</bool>
<bool name="profile_supported_a2dp_sink">true</bool>
<bool name="profile_supported_hdp">true</bool>
<bool name="profile_supported_hs_hfp">true</bool>
<bool name="profile_supported_hfpclient">true</bool>    

As you can see the corresponding profiles are enabled. Is there any other location I should check?
Any advice and suggestions will be greatly appreciated!


Enable HFP client on Android
#2

OK, after few tries I figured out how to get it working. Curiously, the branch 1.2.7 has bug with bluetooth PBAP profile, BTTest app crashes when trying to connect to phone book. The 1.2.6 works fine, same for 1.2.4 (Lollipop). Now another issue, there is no sound coming from HDMI while answering the call (bluetooth headset mode). The music steaming is fine, volume control is working on both sides. Any idea where should I look? Thank you!


#3

Hi @dim.sh

I am not an Android programmer, and I haven’t tried this myself, but here is the instruction I was given to get BT running.

do following changes for HFP BT call and try .I tried this on LA.BR.1.2.4(Lollipop)

in mixers_path_sbc.xml and platfrom id #define HFP_PCM_RX 25 in hardware/qcom/audio/hal/msm8916/plafortform.h

Let us know if this works for you.

Full Disclosure. I am an employee of Qualcomm Canada. Any opinions I may have expressed in this or any other post may not reflect the opinions of my employer.


#4

Hi,
Ok, I made changes in platform.h HFP_PCM_RX 5 -> 25.
Could you specify, please, the mixer_paths_sbc.xml location? I’m trying to locate it but found nothing on latest LA.BR.1.2.4. In fact there is mixer_paths_sbc.xml located in /device/qcom/msm8916_32 but I doubt that is the one I’m looking for since the build will be msm8916_64, am I wrong? Otherwise I found also another one in /out/target/product/msm8916_64/system/etc/mixer_paths_sbc.xml… Should I check this one? Also, what exactly need to be modified in .xml file?

Thank you!


#5

Hi @dim.sh

I talked to the local expert on this and here are the answers he gave me:

Ok, I made changes in platform.h HFP_PCM_RX 5 -> 25.
Could you specify, please, the mixer_paths_sbc.xml location?

Path for mixer_paths_sbc.xml \device\qcom\msm8916_32

I’m trying to locate it but found nothing on latest LA.BR.1.2.4. In fact there is mixer_paths_sbc.xml located in /device/qcom/msm8916_32 but I doubt that is the one I’m looking for since the build will be msm8916_64, am I wrong?

all files are picked up from 8916_32 folder only
8916_64 only has files specific to 64 bit … rest are copied from 8916_32 only . it is just a naming convention … does not mean they are related to architecture

Otherwise I found also another one in /out/target/product/msm8916_64/system/etc/mixer_paths_sbc.xml… Should I check this one?

/out/target/product/msm8916_64/system/etc/mixer_paths_sbc.xml … this file will be generated , once you compiled your source code this is out folder which has compiled binaries and exe files and other .

Also, what exactly need to be modified in .xml file?

you need to add hfp voice call related changes , by default we don’t have these changes . Please add below changes in mixer_path_sbc.xml

<path name="hfp-sco">
        <ctl name="QUAT_MI2S_RX Port Mixer INTERNAL_BT_SCO_TX" value="1" />
        <ctl name="INTERNAL_BT_SCO_RX Audio Mixer MultiMedia6" value="1" />
        <ctl name="MultiMedia6 Mixer TERT_MI2S_TX" value="1" />
        <ctl name="HFP_INT_UL_HL Switch" value="1" />
                        <ctl name="QUAT_MI2S_RX_DL_HL Switch" value="1" /> 
<path name="hfp-sco-wb">
        <ctl name="Internal BTSCO SampleRate" value="16000" />
        <path name="hfp-sco" />
    </path>

Full disclosure: I am an employee of Qualcomm Canada, any opinions I may have expressed in this of any other post may not reflect the opinions of my employer.


Enable HFP client on Android
#6

Hi @ljking,

Understood, thank you!
I’ll wait for mixer_path_sbc.xml changes, I confirm, there is a problem displaying the code, I cannot see it, only an empty box. And it’s exactly the same thing with notification email. Is there any other way to share it?

Thanks again!