bluez5: add Opus as a (Pipewire-specific) A2DP vendor codec

Support Opus as A2DP vendor codec.

The specification for vendor A2DP codec is our Pipewire-specific one, so
it is compatible only with devices running Pipewire.
This commit is contained in:
Pauli Virtanen 2022-05-21 14:40:26 +03:00 committed by Wim Taymans
parent bf52b2acff
commit 434cc6a90b
7 changed files with 1397 additions and 1 deletions

View file

@ -63,6 +63,11 @@ static int codec_order(const struct a2dp_codec *c)
SPA_BLUETOOTH_AUDIO_CODEC_APTX_LL_DUPLEX,
SPA_BLUETOOTH_AUDIO_CODEC_FASTSTREAM,
SPA_BLUETOOTH_AUDIO_CODEC_FASTSTREAM_DUPLEX,
SPA_BLUETOOTH_AUDIO_CODEC_OPUS_05,
SPA_BLUETOOTH_AUDIO_CODEC_OPUS_05_51,
SPA_BLUETOOTH_AUDIO_CODEC_OPUS_05_71,
SPA_BLUETOOTH_AUDIO_CODEC_OPUS_05_DUPLEX,
SPA_BLUETOOTH_AUDIO_CODEC_OPUS_05_PRO,
};
size_t i;
for (i = 0; i < SPA_N_ELEMENTS(order); ++i)
@ -174,7 +179,8 @@ const struct a2dp_codec * const *load_a2dp_codecs(struct spa_plugin_loader *load
A2DP_CODEC_FACTORY_LIB("faststream"),
A2DP_CODEC_FACTORY_LIB("ldac"),
A2DP_CODEC_FACTORY_LIB("sbc"),
A2DP_CODEC_FACTORY_LIB("lc3plus")
A2DP_CODEC_FACTORY_LIB("lc3plus"),
A2DP_CODEC_FACTORY_LIB("opus")
#undef A2DP_CODEC_FACTORY_LIB
};