bluez5: lc3: handle multiple PACs in capabilities

BlueZ may send multiple PACs in the capabilities delimited by zero LTV.
Handle this case by selecting the "best" one.

The configuration size may also for BAP generally be different from PAC
size.
This commit is contained in:
Pauli Virtanen 2023-01-16 22:54:27 +02:00
parent 37a5dca31e
commit a372c89544
3 changed files with 124 additions and 48 deletions

View file

@ -78,7 +78,10 @@ bool media_codec_check_caps(const struct media_codec *codec, unsigned int codec_
if (res < 0)
return false;
return ((size_t)res == caps_size);
if (codec->bap)
return true;
else
return ((size_t)res == caps_size);
}
#ifdef CODEC_PLUGIN