@kiran @ljking or anybody else who works for Qualcomm, or anybody who just knows anything about the audio routing on these qualcomm boards…
The problem: there is no AUDIO in Bluetooth HFP-Client mode.
HFP-Client mode works, in general. It is possible to control calls using the protocol via bttestapp included in the builds for DB410c. When in a call, the cellphone (Nexus 6 with factory firmware) routes audio to the DB410c as expected. Everything through the entire process works exactly as expected, except that there is no sound.
Note: audio_policy.conf has been modified so that it selects SPEAKER by default, instead of handset. The logcat during an HFP-Client session indicates that the output device is voice-speaker, and input device is voice-speaker-mic, both correct.
Errors during the HFP-CLient session indicated that it was missing paths named “hfp-sco” and “hfp-sco-wb”.
So I found the following from mixer_paths_mtp.xml:
<path name="hfp-sco">
<ctl name="PRI_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" />
</path>
<path name="hfp-sco-wb">
<ctl name="Internal BTSCO SampleRate" value="16000" />
<path name="hfp-sco" />
</path>
Now this… obviously does not work. To start with, PRI_MI2S_RX and TERT_MI2S_TX go nowhere on DB410c. If I’m not mistaken, “PRI_MI2S_RX” is the thing that RECEIVES DATA (hence RX) to send out on the PRI_MI2S, which is the PCM-OUT pin on the low speed expansion header. Also, it doesn’t seem like the TERT_MI2S_TX is actually connected to anything. That would be the thing that TRANSMITS DATA that was received from the TERT_MI2S, which appears to be N/C.
So the most immediately obvious change to make, is to swap out PRI_MI2S_RX for QUAT_MI2S_RX, but that isn’t going to work, because there is no control named “QUAT_MI2S_RX Port Mixer INTERNAL_BT_SCO_TX” defined in the kernel.
So I tried to define the control by adding;
SOC_SINGLE_EXT(“INTERNAL_BT_SCO_TX”, MSM_BACKEND_DAI_QUATERNARY_MI2S_RX,
MSM_BACKEND_DAI_INT_BT_SCO_TX, 1, 0, msm_routing_get_port_mixer,
msm_routing_put_port_mixer),
to quat_mi2s_rx_port_mixer_controls[]
and
{“QUAT_MI2S_RX Port Mixer”, “INTERNAL_BT_SCO_TX”, “INT_BT_SCO_TX”},
to intercon[]
Both in kernel/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.h
Still no sound out on the HDMI though…
Mind you, this approach really doesn’t “feel” right, since it won’t take account for the input and output devices that were selected (i.e. voice-speaker and voice-speaker-mic).
But there are other things about this that are odd; for instance, what is the relationship between INTERNAL_BT_SCO_TX, INTERNAL_BT_SCO_RX, INT_HFP_BT Hostless, and MultiMedia6 (aka MSM8916 HFP TX?) ??
So I guess the question is this; how do I get the audio stream coming in from the bluetooth to come out with the HDMI? And how do I turn the audio coming in one of the microphones into a stream out the bluetooth?
Note: A2DP-sink is working perfectly (including AVRCP). Conceptually, HFP-client is not very different, except that it adds an outbound audio stream as well.