From c1aea3238f2f228de1cbfbd96a3a30fabbd50e9f Mon Sep 17 00:00:00 2001 From: Rongxuan Liu Date: Thu, 26 Jan 2023 17:14:54 +0000 Subject: [PATCH] Add new field 'pcmStreamId' in LeAudioBroadcastConfiguration This field is used to indicate the PCM stream source for given stream handle Tag: #feature Bug: 264692800 Test: m android.hardware.bluetooth.audio-update-api Change-Id: I3df9066e98ca552329bb58ae5fbc5346d1021b10 Merged-In: I3df9066e98ca552329bb58ae5fbc5346d1021b10 --- .../bluetooth/audio/LeAudioBroadcastConfiguration.aidl | 1 + .../bluetooth/audio/LeAudioBroadcastConfiguration.aidl | 4 ++++ bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioBroadcastConfiguration.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioBroadcastConfiguration.aidl index 7d53b0ca8e..2945710c26 100644 --- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioBroadcastConfiguration.aidl +++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/LeAudioBroadcastConfiguration.aidl @@ -41,5 +41,6 @@ parcelable LeAudioBroadcastConfiguration { char streamHandle; int audioChannelAllocation; android.hardware.bluetooth.audio.LeAudioCodecConfiguration leAudioCodecConfig; + char pcmStreamId; } } diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioBroadcastConfiguration.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioBroadcastConfiguration.aidl index e9a1a0c6e9..16503fb36a 100644 --- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioBroadcastConfiguration.aidl +++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/LeAudioBroadcastConfiguration.aidl @@ -35,6 +35,10 @@ parcelable LeAudioBroadcastConfiguration { */ int audioChannelAllocation; LeAudioCodecConfiguration leAudioCodecConfig; + /* + * Pcm stream id to identify the source for given streamHandle. + */ + char pcmStreamId; } CodecType codecType; BroadcastStreamMap[] streamMap; diff --git a/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp index 128ef61403..6a913f7b1e 100644 --- a/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp +++ b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp @@ -1570,6 +1570,10 @@ TEST_P(BluetoothAudioProviderLeAudioBroadcastHardwareAidl, le_audio_broadcast_config.streamMap[0] .leAudioCodecConfig.set( lc3_config); + le_audio_broadcast_config.streamMap[0].streamHandle = 0x0; + le_audio_broadcast_config.streamMap[0].pcmStreamId = 0x0; + le_audio_broadcast_config.streamMap[0].audioChannelAllocation = 0x1 << 0; + DataMQDesc mq_desc; auto aidl_retval = audio_provider_->startSession( audio_port_, AudioConfiguration(le_audio_broadcast_config),