mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
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>
This commit is contained in:
parent
f22cfa8f81
commit
4444ecad6f
3 changed files with 72 additions and 5 deletions
|
|
@ -219,6 +219,7 @@ static int card_acquire(struct hf_audio_card *card) {
|
|||
return -1;
|
||||
}
|
||||
card->transport->bt_codec = pa_bluetooth_get_hf_codec("CVSD");
|
||||
card->transport->setsockopt = NULL;
|
||||
card->fd = fd;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -687,6 +688,7 @@ static DBusMessage *hf_audio_agent_new_connection(DBusConnection *c, DBusMessage
|
|||
card->connecting = false;
|
||||
card->fd = fd;
|
||||
card->transport->bt_codec = pa_bluetooth_get_hf_codec("CVSD");
|
||||
card->transport->setsockopt = NULL;
|
||||
|
||||
pa_bluetooth_transport_set_state(card->transport, PA_BLUETOOTH_TRANSPORT_STATE_PLAYING);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue