I prefer to keep discussions like this on the forum so that other people will be able to read it and learn from it.
Here is the thing; I did nothing at all with respect to A2DP/AVRCP. The guys at hisilicon did all that, and it was working before I even started with this board. So really, I can’t answer much about that except to say that IN THEORY, you should be able to make those work over a different BT adapter, since they run their data over HCI, which is carried over UART. But be aware that your UART would have to be running at a high enough rate to carry the audio data that you are sending over the link.
There is one other thing that I want to make sure you are aware of with regards to A2DP: It will not output sound unless you hit the PLAY button in the bluetooth music application on the hikey960.
Now regarding HFP… you see, it would have been very helpful if you had mentioned previously that you were using a different BT adapter. While technically, HFP audio can be run over HCI protocol in much the same way as A2DP, Android does not support this. While there is some code in AOSP regarding HFP over HCI, this code was never completed, has never been tested, and has never been maintained. That means that HFP audio must originate in some manner that is accessible to the AUDIO HAL, which typically means an ALSA device. If your bluetooth adapter has I2S capability, then you could attach it to the I2S pins of the LS adapter and configure simple-card to work with it. IF this is possible for your hardware, and you want to try it out, then be aware that my april kernel branch does NOT have the patch needed to enable i2s0 on the LS adapter. You can find the branch that ends with “CAR96” and cherry-pick these two commits from it;
c3080aaada9f8a97825bb050eb69788376998c7d
077e0189be3a6f1bd24aceb6c18872a066ed8be0
(* These first of those two commits will have conflicts that you will need to resolve)
In addition, understanding this commit will help you in writing a codec driver for your bt card;
71e95cfc04322263133721f7a3e7d623c92c71fe
Note that everything in the bt_sco_hw_params function is specific to the on-board wilink8 bt.
Do you mind if I ask you WHY you are using a separate BT adapter? In the very least, I would VERY STRONGLY recommend that you get it working with the built-in bluetooth card first, and then switch to yours.