bluez5: tell the codec whether endpoint is sink or source

Add a flag A2DP_CODEC_FLAG_SINK to incidate a sink endpoint.

Also enum_config and caps_preference_cmp may need to know whether the
codec is being configured for SRC or SNK. Also add the flags argument to
init_props.

Bump codec API version.
This commit is contained in:
Pauli Virtanen 2022-05-21 13:18:38 +03:00 committed by Wim Taymans
parent 8d66b2b2f7
commit a8eb146d39
10 changed files with 63 additions and 34 deletions

View file

@ -129,7 +129,7 @@ static int codec_select_config(const struct a2dp_codec *codec, uint32_t flags,
return sizeof(conf);
}
static int codec_enum_config(const struct a2dp_codec *codec,
static int codec_enum_config(const struct a2dp_codec *codec, uint32_t flags,
const void *caps, size_t caps_size, uint32_t id, uint32_t idx,
struct spa_pod_builder *b, struct spa_pod **param)
{
@ -372,7 +372,7 @@ static SPA_UNUSED int codec_decode(void *data,
* When connected as SRC to SNK, FastStream sink may send back SBC data.
*/
static int duplex_enum_config(const struct a2dp_codec *codec,
static int duplex_enum_config(const struct a2dp_codec *codec, uint32_t flags,
const void *caps, size_t caps_size, uint32_t id, uint32_t idx,
struct spa_pod_builder *b, struct spa_pod **param)
{