bluetooth: add wideband audio codec negotiation to HFP
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Wed, 17 Feb 2021 06:44:35 +0000 (09:44 +0300)
committerPulseAudio Marge Bot <pulseaudio-maintainers@lists.freedesktop.org>
Mon, 5 Apr 2021 15:43:32 +0000 (15:43 +0000)
commit4444ecad6f929563816f5eeb438bc5ce33ca75ef
tree113e713e06a778eff068123f8b672afa5fcae089
parentf22cfa8f811f4f67a5aee38a610da72ad28fe083
bluetooth: add wideband audio codec negotiation to HFP

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.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
src/modules/bluetooth/backend-native.c
src/modules/bluetooth/backend-ofono.c
src/modules/bluetooth/bluez5-util.h