The HFP protocol supports the ability to negotiate codecs if that is supported by both AG and HF. This patch adds advertising of codec negotiation support and the ability to negotiate a codec change. The only currently supported extra codec (as of HF 1.7.1) is mSBC. mSBC requires that the transmission be done over an eSCO link with Transparent Data. The linux kernel ensures the former, but we have to manually set the socket to transparent data.
4444ecad6 bluetooth: add wideband audio codec negotiation to HFP
src/modules/bluetooth/backend-native.c | 73 +++++++++++++++++++++++++++++++---
src/modules/bluetooth/backend-ofono.c | 2 +
src/modules/bluetooth/bluez5-util.h | 2 +
3 files changed, 72 insertions(+), 5 deletions(-)