diff options
Diffstat (limited to 'bluetooth/audio/aidl')
15 files changed, 53 insertions, 14 deletions
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecCapabilities.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecCapabilities.aidl index e2a08a0e6d..948c04a513 100644 --- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecCapabilities.aidl +++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecCapabilities.aidl @@ -37,11 +37,16 @@ parcelable CodecCapabilities { android.hardware.bluetooth.audio.CodecType codecType; android.hardware.bluetooth.audio.CodecCapabilities.Capabilities capabilities; @VintfStability + parcelable VendorCapabilities { + ParcelableHolder extension; + } + @VintfStability union Capabilities { android.hardware.bluetooth.audio.SbcCapabilities sbcCapabilities; android.hardware.bluetooth.audio.AacCapabilities aacCapabilities; android.hardware.bluetooth.audio.LdacCapabilities ldacCapabilities; android.hardware.bluetooth.audio.AptxCapabilities aptxCapabilities; android.hardware.bluetooth.audio.Lc3Capabilities lc3Capabilities; + android.hardware.bluetooth.audio.CodecCapabilities.VendorCapabilities vendorCapabilities; } } diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecConfiguration.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecConfiguration.aidl index 34ebd60530..32bccd8501 100644 --- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecConfiguration.aidl +++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecConfiguration.aidl @@ -40,11 +40,18 @@ parcelable CodecConfiguration { boolean isScmstEnabled; android.hardware.bluetooth.audio.CodecConfiguration.CodecSpecific config; @VintfStability + parcelable VendorConfiguration { + int vendorId; + char codecId; + ParcelableHolder codecConfig; + } + @VintfStability union CodecSpecific { android.hardware.bluetooth.audio.SbcConfiguration sbcConfig; android.hardware.bluetooth.audio.AacConfiguration aacConfig; android.hardware.bluetooth.audio.LdacConfiguration ldacConfig; android.hardware.bluetooth.audio.AptxConfiguration aptxConfig; android.hardware.bluetooth.audio.Lc3Configuration lc3Config; + android.hardware.bluetooth.audio.CodecConfiguration.VendorConfiguration vendorConfig; } } diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecType.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecType.aidl index 44b434bbd7..3a5f951005 100644 --- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecType.aidl +++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecType.aidl @@ -41,4 +41,5 @@ enum CodecType { APTX_HD = 4, LDAC = 5, LC3 = 6, + VENDOR = 7, } diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecCapabilities.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecCapabilities.aidl index 5bf0252bf8..41e243168c 100644 --- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecCapabilities.aidl +++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecCapabilities.aidl @@ -30,12 +30,17 @@ import android.hardware.bluetooth.audio.SbcCapabilities; @VintfStability parcelable CodecCapabilities { @VintfStability + parcelable VendorCapabilities { + ParcelableHolder extension; + } + @VintfStability union Capabilities { SbcCapabilities sbcCapabilities; AacCapabilities aacCapabilities; LdacCapabilities ldacCapabilities; AptxCapabilities aptxCapabilities; Lc3Capabilities lc3Capabilities; + VendorCapabilities vendorCapabilities; } CodecType codecType; Capabilities capabilities; diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecConfiguration.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecConfiguration.aidl index 9e43f2244a..3679537af7 100644 --- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecConfiguration.aidl +++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecConfiguration.aidl @@ -30,12 +30,19 @@ import android.hardware.bluetooth.audio.SbcConfiguration; @VintfStability parcelable CodecConfiguration { @VintfStability + parcelable VendorConfiguration { + int vendorId; + char codecId; + ParcelableHolder codecConfig; + } + @VintfStability union CodecSpecific { SbcConfiguration sbcConfig; AacConfiguration aacConfig; LdacConfiguration ldacConfig; AptxConfiguration aptxConfig; Lc3Configuration lc3Config; + VendorConfiguration vendorConfig; } CodecType codecType; /** diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecType.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecType.aidl index 68c60f548e..9c3308194e 100644 --- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecType.aidl +++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecType.aidl @@ -26,4 +26,5 @@ enum CodecType { APTX_HD, LDAC, LC3, + VENDOR, } diff --git a/bluetooth/audio/aidl/default/A2dpSoftwareAudioProvider.cpp b/bluetooth/audio/aidl/default/A2dpSoftwareAudioProvider.cpp index 7e4907409e..5a413e07a8 100644 --- a/bluetooth/audio/aidl/default/A2dpSoftwareAudioProvider.cpp +++ b/bluetooth/audio/aidl/default/A2dpSoftwareAudioProvider.cpp @@ -88,8 +88,9 @@ ndk::ScopedAStatus A2dpSoftwareAudioProvider::onSessionReady( return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); } *_aidl_return = data_mq_->dupeDesc(); + auto desc = data_mq_->dupeDesc(); BluetoothAudioSessionReport::OnSessionStarted(session_type_, stack_iface_, - _aidl_return, *audio_config_); + &desc, *audio_config_); return ndk::ScopedAStatus::ok(); } diff --git a/bluetooth/audio/aidl/default/Android.bp b/bluetooth/audio/aidl/default/Android.bp index 846702fa0e..fc882d4cef 100644 --- a/bluetooth/audio/aidl/default/Android.bp +++ b/bluetooth/audio/aidl/default/Android.bp @@ -8,7 +8,7 @@ package { } cc_library_shared { - name: "android.hardware.bluetooth.audio-V1-impl", + name: "android.hardware.bluetooth.audio-impl", vendor: true, vintf_fragments: ["bluetooth_audio.xml"], srcs: [ diff --git a/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.cpp b/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.cpp index 8e6cee7b2f..1e55a0bf7c 100644 --- a/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.cpp +++ b/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "BTAudioProvidersFactory" +#define LOG_TAG "BTAudioProviderFactoryAIDL" #include "BluetoothAudioProviderFactory.h" diff --git a/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.h b/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.h index 96d888c166..b38cfd2520 100644 --- a/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.h +++ b/bluetooth/audio/aidl/default/BluetoothAudioProviderFactory.h @@ -18,13 +18,6 @@ #include <aidl/android/hardware/bluetooth/audio/BnBluetoothAudioProviderFactory.h> -#include "A2dpOffloadAudioProvider.h" -#include "A2dpSoftwareAudioProvider.h" -#include "BluetoothAudioProvider.h" -#include "HearingAidAudioProvider.h" -#include "LeAudioOffloadAudioProvider.h" -#include "LeAudioSoftwareAudioProvider.h" - namespace aidl { namespace android { namespace hardware { diff --git a/bluetooth/audio/aidl/default/HearingAidAudioProvider.cpp b/bluetooth/audio/aidl/default/HearingAidAudioProvider.cpp index a993059b65..66ce93bd35 100644 --- a/bluetooth/audio/aidl/default/HearingAidAudioProvider.cpp +++ b/bluetooth/audio/aidl/default/HearingAidAudioProvider.cpp @@ -81,10 +81,10 @@ ndk::ScopedAStatus HearingAidAudioProvider::onSessionReady( *_aidl_return = DataMQDesc(); return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); } + *_aidl_return = data_mq_->dupeDesc(); auto desc = data_mq_->dupeDesc(); BluetoothAudioSessionReport::OnSessionStarted(session_type_, stack_iface_, &desc, *audio_config_); - *_aidl_return = data_mq_->dupeDesc(); return ndk::ScopedAStatus::ok(); } diff --git a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp index 4078783c99..72ac9bdede 100644 --- a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp +++ b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "BTAudioProviderLeAudioSW" +#define LOG_TAG "BTAudioProviderLeAudioHW" #include "LeAudioOffloadAudioProvider.h" diff --git a/bluetooth/audio/aidl/default/LeAudioSoftwareAudioProvider.cpp b/bluetooth/audio/aidl/default/LeAudioSoftwareAudioProvider.cpp index f9962fd9d9..67b7d60c0c 100644 --- a/bluetooth/audio/aidl/default/LeAudioSoftwareAudioProvider.cpp +++ b/bluetooth/audio/aidl/default/LeAudioSoftwareAudioProvider.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "BTAudioProviderLeAudioHW" +#define LOG_TAG "BTAudioProviderLeAudioSW" #include "LeAudioSoftwareAudioProvider.h" @@ -88,6 +88,16 @@ ndk::ScopedAStatus LeAudioSoftwareAudioProvider::startSession( channel_mode_to_channel_count(pcm_config.channelMode) * (pcm_config.bitsPerSample / 8) * (pcm_config.dataIntervalUs / 1000) * buffer_modifier; + if (data_mq_size <= 0) { + LOG(ERROR) << __func__ << "Unexpected audio buffer size: " << data_mq_size + << ", SampleRateHz: " << pcm_config.sampleRateHz + << ", ChannelMode: " << toString(pcm_config.channelMode) + << ", BitsPerSample: " + << static_cast<int>(pcm_config.bitsPerSample) + << ", DataIntervalUs: " << pcm_config.dataIntervalUs + << ", SessionType: " << toString(session_type_); + return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); + } LOG(INFO) << __func__ << " - size of audio buffer " << data_mq_size << " byte(s)"; @@ -113,8 +123,9 @@ ndk::ScopedAStatus LeAudioSoftwareAudioProvider::onSessionReady( return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); } *_aidl_return = data_mq_->dupeDesc(); + auto desc = data_mq_->dupeDesc(); BluetoothAudioSessionReport::OnSessionStarted(session_type_, stack_iface_, - _aidl_return, *audio_config_); + &desc, *audio_config_); return ndk::ScopedAStatus::ok(); } diff --git a/bluetooth/audio/aidl/default/OWNERS b/bluetooth/audio/aidl/default/OWNERS new file mode 100644 index 0000000000..17ea46424f --- /dev/null +++ b/bluetooth/audio/aidl/default/OWNERS @@ -0,0 +1,4 @@ +include platform/packages/modules/Bluetooth:/OWNERS + +cheneyni@google.com +aliceypkuo@google.com
\ No newline at end of file diff --git a/bluetooth/audio/aidl/vts/OWNERS b/bluetooth/audio/aidl/vts/OWNERS new file mode 100644 index 0000000000..17ea46424f --- /dev/null +++ b/bluetooth/audio/aidl/vts/OWNERS @@ -0,0 +1,4 @@ +include platform/packages/modules/Bluetooth:/OWNERS + +cheneyni@google.com +aliceypkuo@google.com
\ No newline at end of file |