bluez5: backend-ofono: Add mSBC support

oFono tries to use the best codec when setting up the audio connection, so
the codec to use is known during call to `acquire` function, after the
transport has been created.
To get the codec before creating the transport, an audio connection is
set-up and discarded during `ofono_audio_card_found()`. It should return
the best codec available, which should not change during the time the
remote is connected.

mSBC can be enabled by passing "bluez5.msbc-support=true" parameter to
pipewire-media-session.
mSBC is automatically selected if remote device supports it.
This commit is contained in:
Frédéric Danis 2020-12-08 15:19:17 +01:00 committed by Wim Taymans
parent bd4663b3cc
commit 8bc711ce4d
3 changed files with 119 additions and 33 deletions

View file

@ -360,6 +360,7 @@ static inline void backend_hsp_native_register_profiles(struct spa_bt_backend *b
#ifdef HAVE_BLUEZ_5_BACKEND_OFONO
struct spa_bt_backend *backend_ofono_new(struct spa_bt_monitor *monitor,
void *dbus_connection,
const struct spa_dict *info,
const struct spa_support *support,
uint32_t n_support);
void backend_ofono_free(struct spa_bt_backend *backend);
@ -367,6 +368,7 @@ void backend_ofono_add_filters(struct spa_bt_backend *backend);
#else
static inline struct spa_bt_backend *backend_ofono_new(struct spa_bt_monitor *monitor,
void *dbus_connection,
const struct spa_dict *info,
const struct spa_support *support,
uint32_t n_support) {
return NULL;