diff options
author | Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com> | 2014-05-26 15:16:42 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-05-30 14:54:56 +0300 |
commit | e1c7dddd0dd2f5e23e4d4cf98a9dde713fe6dd53 (patch) | |
tree | 7e7a38911916bdd9659177fe818ebd00aa1b8d05 /android/a2dp.c | |
parent | d8354e8e635399768a51efb12784d6ee31ff3f7c (diff) | |
download | bluez-e1c7dddd0dd2f5e23e4d4cf98a9dde713fe6dd53.tar.gz |
android/a2dp: Fix SEP selection
When matching remote SEP to local SEP we do not match vendor codecs
properly, i.e. neither vendor ID not codec ID are checked, which may
cause wrong endpoint to be selected in case there are more that one
endpoints using vendor codec on remote.
This patch fixes this by assinging vendor codec indentification to
local SEP after it's registered and uses this information when matching
SEPs.
Diffstat (limited to 'android/a2dp.c')
-rw-r--r-- | android/a2dp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/android/a2dp.c b/android/a2dp.c index e65e5a303..c1938735f 100644 --- a/android/a2dp.c +++ b/android/a2dp.c @@ -1226,6 +1226,14 @@ static uint8_t register_endpoint(const uint8_t *uuid, uint8_t codec, endpoint->caps = presets->data; endpoint->presets = g_slist_copy(g_slist_nth(presets, 1)); + if (endpoint->codec == A2DP_CODEC_VENDOR) { + a2dp_vendor_codec_t *vndcodec = (void *) endpoint->caps->data; + + avdtp_sep_set_vendor_codec(endpoint->sep, + btohl(vndcodec->vendor_id), + btohs(vndcodec->codec_id)); + } + endpoints = g_slist_append(endpoints, endpoint); return endpoint->id; |