I am updating Bluez 4.97 to 5.35 in my embedded device.
For A2DP connection, we have to share SBC codec capabilities. In ideal case the capablity will look like figure 1 . In Bluez 4.97 code, I am getting SBC codec capability from sbc_getcap_ind() function in AVDTP layer. In sbc_getcap_ind(), both sbc_codec_cap and avdtp_media_codec_capability are initialized. So this capability packet I can send back to Phone.
In 5.35, sbc_getcap_ind() function is not available. avdtp_media_codec_capability are set in endpoint_getcap_ind() function in AVDTP layer, which is as per my expectation. But sbc_codec_cap is not initialized. So I am getting packect like in figure2.
In blueZ 5.35 there comes the new package android/hal-audio-sbc.c, in this package SBC coded capability are set.
My embedded device is RTOS based and I have nothing to do with android. So I have following doubt:
1) Why there is new android package in blueZ stack? What's the development idea behind this?
2) Why SBC capabilities are initialized in android/hal-audio-sbc.c, how non-android device will access SBC capabilities?
3) How in my embedded environment, I can use android/hal-audio-sbc.c to get SBC capabilities?
I think I am not able to resolve this issue because I am missing understanding of new 5.35 architecture. And there are not enough documents to understand BlueZ architecture. I hope by getting answer of these question I can understand significance of android folder in 5.35 BlueZ package.