How to enable HFP in the device mode

Hi,
In the device mode HFP, I am able to establish a call using alsa tools (arecord and aplay), it is working fine. But it is not working through BT stack, data is not coming to primary HAL. But A2DP is working fine, can someone help me out in this. Thanks in advance

Please could you edit this topic and move it to the correct sub-forum (so we know what board you are using)?

If you mean hfp-client mode, you need to set the alsa connections up yourself in the audio hal when the parameter is set.

Like this:

Which starts a thread:

Which runs the audio: