aboutsummaryrefslogtreecommitdiff
path: root/system/audio_hal_interface/aidl
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-13.0.0_r52' of ↵George Zacharia2023-07-021-9/+7
|\ | | | | | | | | | | | | | | https://android.googlesource.com/platform/packages/modules/Bluetooth into t13.0 Android 13.0.0 Release 52 (TQ3A.230605.012) Change-Id: I379845946815b7c623f83a1d33036ae615f090fb
| * audio client: Use AServiceManager_waitForServiceMyles Watson2023-02-081-9/+7
| | | | | | | | | | | | | | | | | | | | AServiceManager_getService is deprecated. Bug: 264611736 Test: atest pts-bot Change-Id: If7022e9726b91990723922408284f2a885abbf3a (cherry picked from commit 84b8cf7eaaf7a3ddba984e2f59fab04dd63c7f64) Merged-In: If7022e9726b91990723922408284f2a885abbf3a
* | audio_hal/aidl: Don't fallback to SW encoding when HW is supportedHans Månsson2023-04-181-0/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | | The following commit: 29d38ad3c2 Add support for Opus in BT Audio HAL Added BTAV_A2DP_CODEC_INDEX_SOURCE_LC3 BTAV_A2DP_CODEC_INDEX_SOURCE_OPUS BTAV_A2DP_CODEC_INDEX_SINK_OPUS to the available codecs. This causes UpdateOffloadingCapabilities to return early with failure when handling BTAV_A2DP_CODEC_INDEX_SOURCE_LC3 which casues fallback to SW encoding even when other codecs than lc3 is available for HW offloading. Also add case for BTAV_A2DP_CODEC_INDEX_SINK_OPUS for completeness. The following can be observed in the log: [ERROR:codec_status_aidl.cc(558)] UpdateOffloadingCapabilities: Unknown codec_type=5 Test: See issue Bug: 266208838 Change-Id: I7b145a6f74a3540ca2083630afb97fcc154c841d
* le_audio_software_aidl: Fix race condition on start request confirmJakub Tyszkowski2022-12-121-8/+17
| | | | | | | | | | | | | Uses atomic compare and exchange to avoid cases where the confirmed stream request is not registered and overwritten. This happens when the other thread confirms the request after we already checked the state, but before it is set here. Bug: 258127534 Test: Manual testing Change-Id: I3528e97d6944949bf5031975b9f8e436db68aa3c Merged-In: I3528e97d6944949bf5031975b9f8e436db68aa3c (cherry picked from commit cb1b6c8f4d26c27820212afe5dd4dbd32cc5a947)
* leaudio: Fix Audio HAL startRequestŁukasz Rymanowski2022-09-072-23/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fix possible race on startRequest. It could happen that ConfirmStreamingRequest is called in the main thread before, StartRequest() ends and sets pending flag. That could lead to incorrect Bluetooth Audio Hal state - stay in STARTING state. 08-30 11:14:06.921114 8896 11089 I bt_stack: [INFO:le_audio_software_aidl.cc(69)] StartRequest 08-30 11:14:06.921221 8896 8965 I bt_stack: [INFO:client.cc(2967)] OnAudioSinkResume 08-30 11:14:06.921272 8896 8965 I bt_stack: audio_receiver_state: IDLE 08-30 11:14:06.921272 8896 8965 I bt_stack: audio_sender_state: READY_TO_RELEASE 08-30 11:14:06.921272 8896 8965 I bt_stack: configuration_context_type_: 4 08-30 11:14:06.921299 8896 8965 I bt_stack: [INFO:client_audio.cc(428)] ConfirmStreamingRequest 08-30 11:14:06.921314 8896 8965 I bt_stack: [INFO:le_audio_software.cc(197)] ConfirmStreamingRequest 08-30 11:14:06.921327 8896 8965 W bt_stack: [WARNING:le_audio_software.cc(212)] , no pending start stream request <snip> 08-30 11:14:11.421940 817 12545 E BTAudioHalDeviceProxyAIDL: Start: session_type=LE_AUDIO_SOFTWARE_ENCODING_DATAPATH, cookie=0x400, state=STARTING failure 08-30 11:14:11.422137 817 12545 E BTAudioHalStream: out_write: state=STARTING failed to resume 08-30 11:14:11.438755 817 12545 I BTAudioHalStream: out_write: state=STARTING first time bytes=1920 08-30 11:14:11.438829 817 12545 W BTAudioHalStream: out_resume: state=STARTING NOT ready to resume?! 08-30 11:14:11.438852 817 12545 E BTAudioHalStream: out_write: state=STARTING failed to resume Bug: 244299911 Bug: 244384741 Test: atest BluetoothInstrumentationTests Test: manual testing media -> phone call->media switch Tag: #feature Merged-In: I55e7c9d4301bc027e6f1dd505813bb2b05799629 Change-Id: I55e7c9d4301bc027e6f1dd505813bb2b05799629 (cherry picked from commit ed42483ca2dcb037317956eb2f5d3535553c32b1)
* Merge changes I05ecf07a,I3e771473,Id94a7f8f into tm-qpr-devOmer Osman2022-08-113-2/+88
|\ | | | | | | | | | | | | * changes: Add support for Opus over A2DP Add support for Opus in BT Audio HAL Add support for Opus in BT Java Service
| * Add support for Opus in BT Audio HALOmer Osman2022-08-103-3/+89
| | | | | | | | | | | | | | | | | | | | Provide support for software codec and DSP offload Bug: 226441860 Test: Verification using bds-dev sink device Tag: #feature Ignore-AOSP-First: TM QPR1 Feature Change-Id: I3e771473294ab59cc6e9513835ce0d54b72a8f84
* | Merge changes from topic "bt-controller-low-latency" into tm-qpr-devRobert Dalton2022-08-107-8/+35
|\ \ | |/ |/| | | | | | | * changes: Support setting BT controller Low Latency mode(2/2) Support setting BT controller Low Latency mode(1/2)
| * Support setting BT controller Low Latency mode(1/2)kuanyuhuang2022-08-107-8/+35
| | | | | | | | | | | | | | | | | | | | | | | | Handle audio api StartRequest and SetLatencyMode in a2dp to send stream latency through btif_av to bta event. Bug: 240637363 Bug: 223126227 Tag: #feature Ignore-AOSP-First: TM QPR1 feature Test: test on sink device support dynamic spatial audio Change-Id: I9ad4a23a58eeca6128a9f04a530ae6c90c773da5
* | Merge "Check if need codec switching before start streaming" into tm-qpr-devTreeHugger Robot2022-08-101-1/+2
|\ \ | |/ |/|
| * Check if need codec switching before start streamingTed Wang2022-08-021-1/+2
| | | | | | | | | | | | | | | | Bug: 226441860 Test: run sink device using bds-dev Tag: #feature Ignore-AOSP-First: TM QPR1 Feature Change-Id: Ic7bccdc29abcb3861eda4620904e9372e3814d3c
* | Add broadcast offload audio config update to halAlice Kuo2022-07-312-0/+46
|/ | | | | | | | | | | | | 1. Control the broadcast offload audio config in codec_manager 2. Gather the stream handle from BIG event 3. Bring the braodcast offload audio config as broadcast offload session start Bug: 210987580 Test: verify broadcast offload stream with broadcast sink Change-Id: I4b1210a68aedcc14b0df6094ec446b5d2652931f Merged-In: I4b1210a68aedcc14b0df6094ec446b5d2652931f (cherry picked from commit 954fe539bbe8d825bb8e227cb5ec679c6ede9665)
* Merge changes I49269a50,Ic4731fbd into tm-qpr-devTreeHugger Robot2022-07-181-7/+12
|\ | | | | | | | | | | * changes: Check the broadcast offload audio configuraiton and session type Set broadcast ISO data path based on the codecLocation
| * Check the broadcast offload audio configuraiton and session typeAlice Kuo2022-07-121-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | We should check the audio configuration mapping is correct for the unicast and the broadcast offload session respectively Bug: 210987580 Test: start the broadcast for the offload, check the configuration checker Change-Id: I49269a504fc423d03826657ad363cfe9ca09bfcd Merged-In: I49269a504fc423d03826657ad363cfe9ca09bfcd (cherry picked from commit 49fe7aca6efdc41f5be69fd4edfa34989a75b869)
* | Start broadcast offload session without checking data mqAlice Kuo2022-07-131-2/+7
|/ | | | | | | | | | | | | For the broadcast offload, the audio data wouldn't go throught via bluetooth stack, so we don't need to setup the data mq and flush the audio Bug: 210987580 Test: start the offload broadcast source, check the session could be started Change-Id: I51078755363d1546b088405a1eede80a3a09e870 Merged-In: I51078755363d1546b088405a1eede80a3a09e870 (cherry picked from commit eb4b018aed5a62abbd49ff8011aecb93ecf46d16)
* Merge "HAL: Avoid FATAL log on expected transaction status" into tm-dev am: ↵Zach Johnson2022-06-231-2/+8
|\ | | | | | | | | | | | | | | | | e880d2196e Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/19000753 Change-Id: I14f055aef19324fc1d8ec166468806867f1ecd7c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| * HAL: Avoid FATAL log on expected transaction statusJosh Wu2022-06-221-2/+8
| | | | | | | | | | | | | | | | Ignore-AOSP-First: QPR update Bug: 232865497 Tag: #stability Test: atest BluetoothInstrumentationTests Change-Id: I945f8c4820c50bd8712b77e09d5743a3588afdfb
* | BTAudio HAL: Init and check for factory providerSunny Kapdi2022-06-141-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | Initialize factory_provider_ and check for its validity before attempting to unlinkToDeath Bug: 233961816 Tag: #refactor Test: atest BluetoothInstrumentationTests Change-Id: If0a883968a563da3df56aecfb97b2d97f6bbc4e5 Merged-In: If0a883968a563da3df56aecfb97b2d97f6bbc4e5 (cherry picked from commit bb8637682c99fd7693b5aa0ca473acc65d6e4c96)
* | BTAudio HAL: Store factory provider handleSunny Kapdi2022-06-022-6/+12
|/ | | | | | | | | | | | | | Ensure that the object to the factory provider is stored in the BluetoothAudio client interface because the death receipt would be received on that object from the AIDL framework if the server were to crash. Bug: 233961816 Tag: #refactor Test: atest BluetoothInstrumentationTests Change-Id: Id9769b13d59653d1aa4a8e5cff4edfb2b0f1276c Merged-In: Id9769b13d59653d1aa4a8e5cff4edfb2b0f1276c (cherry picked from commit 8b314973c1e505f1075f831809af36a8c7093b71)
* [LE Audio] Add the support for 32k configPatty2022-05-121-0/+1
| | | | | | | | | | | Add 32_2 config support for conversational Bug: 230402180 Tag: #feature Test: atest --host bluetooth_le_audio_test Change-Id: I7325490dc3063f21c503911682c802daec0dc3de (cherry picked from commit 160e3295b8847e9f88a903ed60299b3149267bde) Merged-In: I7325490dc3063f21c503911682c802daec0dc3de
* [LE Audio] Add the support for 24k configPatty2022-05-041-0/+1
| | | | | | | | | | | Add 24_2 config support for media Bug: 230402180 Tag: #feature Test: atest --host bluetooth_le_audio_test Change-Id: I281a49aff32cc331a69fc4882bc6a50e410de01c (cherry picked from commit fda369f325129910f4b2e04d8812a24fbadf3bfc) Merged-In: I281a49aff32cc331a69fc4882bc6a50e410de01c
* le_audio: Add support for Broadcaster session for Bluetoot stackGrzegorz Kołodziejczyk2022-04-153-17/+38
| | | | | | | | | | | Patch extends possibility for stack, Bluetooth Audio Hal part to use Broadcaster session for broadcasting. Tag: #feature Test: atest bluetooth_le_audio_client_test bluetooth_test_broadcaster Sponsor: jpawlowski@ Bug: 210986334 Change-Id: I4d5402f060a853456751e348072b941173848e04
* Merge "open stereo to audio framework"Jakub Pawłowski2022-04-141-1/+1
|\
| * open stereo to audio frameworkJakub Pawlowski2022-04-111-1/+1
| | | | | | | | Change-Id: Ic5a873f16ae6e72c519202fc47deb21429353a0f
* | Merge "HAL: Bypass binder check when refetching"Jakub Pawłowski2022-04-121-3/+5
|\ \
| * | HAL: Bypass binder check when refetchingJosh Wu2022-04-121-3/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | Binder check is to check whether AIDL should be used, so it's no necessary when refetching. Also, when the binder process crashes, it will take some time until recovering, so binder check usually fails here. Tag: #stability Bug: 224534323 Test: atest BluetoothInstrumentationTests Change-Id: Ibd1f741ad414c6e44c6b36517c966df45e86224a
* | Merge "HAL: Remove aidl_available cache"Treehugger Robot2022-04-122-7/+1
|\ \ | |/ |/|
| * HAL: Remove aidl_available cacheJosh Wu2022-04-082-7/+1
| | | | | | | | | | | | | | | | | | | | AIDL availability should be checked every time, or the client can never be initialized. Tag: #stability Bug: 225093330 Test: atest BluetoothInstrumentationTests Change-Id: Ia5fafa3ff1c4ade5276d04239138562286bf20f2
* | le_audio: Fix using audio location of 0x00Jakub Tyszkowski2022-03-291-1/+1
|/ | | | | | | | | | | The value of 0x00 is now known as NotAllowed, and should not be used in case of the mono audio signal. Bug: 150670922 Tag: #feature Test: atest --host bluetooth_le_audio_test bluetooth_le_audio_client_test Sponsor: jpawlowski@ Change-Id: Iab383209a114efa35bf1e3bb1f1b51fce0561624
* Correct the order of input parameters when creating SetConfigurationPatty2022-03-211-4/+3
| | | | | | | | | The target latency parameter should be the forth parameter Bug: 225441658 Test: Le Audio offload capabilities should support the mandatory configuration defined in the BAP spec. Change-Id: I519cdd2b9463d30833f0efd54dd5eec7a158979e
* SpatialAudio: Do not report error if audio HAL is not ready at ↵Chen Chen2022-03-151-3/+4
| | | | | | | | | setLowLatencyAllowed() because we save the value and send it to startSession Bug: 223204349 Bug: 214615268 Test: build Change-Id: Id5597afc8dbb5503945253334cfa7c0c3a24166b
* SpatialAudio: Add is_low_latency to startRequest and only handle it in a2dpChen Chen2022-03-087-14/+16
| | | | | | | Bug: 223162395 Bug: 214615268 Test: build Change-Id: I31d386c59e7cad6b7a62ad506555e98de3c9d6b7
* leaudio: Notify Audio Hal if suspended for the reconfigurationŁukasz Rymanowski2022-03-041-0/+3
| | | | | | | Bug: 150670922 Test: atest --host bluetooth_le_audio_client_test sponsor: @jpawlowski Change-Id: If3a896c98ad0723f4c28047fd77281192efa7765
* HAL: Add _aidl postfix to AIDL source filesJosh Wu2022-02-2811-14/+12
| | | | | | | Tag: #refactor Bug: 222017427 Test: atest BluetoothInstrumentationTests Change-Id: I86b0848aeef1b410a810fe62e9b73da3e2ce3286
* Merge "leaudio: Extract target latency to the json file"Jakub Pawłowski2022-02-251-1/+4
|\
| * leaudio: Extract target latency to the json fileŁukasz Rymanowski2022-02-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | With this patch we can set target latency per direction in json file. Default is balanced Bug: 150670922 Bug: 213255212 sponsor: @jpawlowski Test: atest --host bluetooth_le_audio_test Change-Id: I99529a27731b2e5bc3a9b2493fa2f1a46514a776
* | SpatialAudio: Init codec and buffer size from startStream()Chen Chen2022-02-232-2/+6
|/ | | | | | | | | | | startStream(false): 1) change buffer size 2) do nothing if codec isn't LC3; change codec if codec is LC3 startStream(true): 1) change buffer size 2) do nothing if codec is LC3; change codec if codec isn't LC3 setLatencyMode(true/false): only change buffer size. Bug: 214615268 Test: build Tag: #feature Change-Id: Ia9e6cf10052d78200cea5da468d6880bc676e8fa
* SpatialAudio: Set low latency allowed signal at startSessionChen Chen2022-02-153-2/+11
| | | | | | | | | | | | The logic is that to send FREE and LOW_LATENCY to audio at startSession, if bt receives setLowLatencyModeAllowed(true) before start session. If the parameter false, or bt doesn't receive the signal at all, then bt sends FREE to audio. Test: build Bug: 214615268 Tag: #feature Change-Id: Ie2a7b9b2b387aa7b6f6ff6b14c0ee8ab0a3fcaf7
* Merge "SpatialAudio: Remove codec interface from audio HAL. Codec switch ↵Chen Chen2022-02-142-7/+0
|\ | | | | | | logic will be inside Bluetooth"
| * SpatialAudio: Remove codec interface from audio HAL. Codec switch logic will ↵Chen Chen2022-02-112-7/+0
| | | | | | | | | | | | | | | | | | be inside Bluetooth Bug: 214615268 Test: Build Tag: #feature Change-Id: I4eb318b539c1b647b31d05d2f2a84c00d00f69f7
* | Merge "SpatialAudio: Pass buffer size switching signal from audio HAL to ↵Chen Chen2022-02-141-0/+3
|\ \ | | | | | | | | | native Bluetooth"
| * | SpatialAudio: Pass buffer size switching signal from audio HAL to native ↵Chen Chen2022-02-111-0/+3
| |/ | | | | | | | | | | | | | | | | Bluetooth Bug: 214615268 Tag: #feature Test: Build Change-Id: I2f542930fb3dfbb4da7f4627882a000e617490c4
* | Replace CodecType bitmask with setJosh Wu2022-02-141-9/+11
| | | | | | | | | | | | | | | | | | | | CodecType enum is no longer one-hot value, so we should use set instead of bitmask. Tag: #refactor Bug: 218974420 Test: atest BluetoothInstrumentationTests Change-Id: I1da328e62d9faaeb168d2880e99a08348a28fd00
* | BT: Broadcast AIDL alignmentJack He2022-02-093-13/+7
|/ | | | | | | | | | * Align Bluetooth code with latest AIDL change * Rename remote_delay to remote_delay_ms to include the unit Bug: 15067092 Test: make Tag: #feature Change-Id: I8990765f6cbb8d59e4fa6dcef3e070edaec4fdd9
* Merge changes from topic "offload_capability_selected"Treehugger Robot2022-02-091-2/+3
|\ | | | | | | | | | | * changes: Use offload capability to select a proper codec configuration. Pass the offload codec capability preference from btif layer to bta layer
| * Use offload capability to select a proper codec configuration.Patty2022-02-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Store the offload configuration in the codec manager. 2. Use the software config priority to determine the offload capability order. 3. When offload is enabled, use the offload configuration to negotiate with remote devices. Tag: #feature Bug: 203535499 Bug: 150670922 Test: When offloading the codec configuration could be selected based on the offload capability Change-Id: I47f1bec68eaebaea517f78fc71a0769e10775950
* | Merge "Spatial Audio: Move setLowLatencyModeAllowed from hidl to aidl"Treehugger Robot2022-02-094-0/+32
|\ \
| * | Spatial Audio: Move setLowLatencyModeAllowed from hidl to aidlChen Chen2022-02-084-0/+32
| |/ | | | | | | | | | | | | Bug: 214615268 Tag: #feature Test: build Change-Id: I655e07ab0f38f672bdd77cbbe4f12b7879510e25
* / Spatial Audio: Add setLatencyMode and setCodecType API with emptyChen Chen2022-02-074-0/+18
|/ | | | | | | | | implementation Bug: 216832331 Test: build Tag: #feature Change-Id: I530667f3342bfb5a6bc0c9481a52d4f95ab127f9
* HAL: Fix nullptr checkGreg Kaiser2022-01-261-2/+2
| | | | | | | | We had our null check reversed, so we fix that. Test: TreeHugger Bug: 203490261 Change-Id: I2cbe2983857d86fdc524e26b5ce342245879cf6d