summaryrefslogtreecommitdiff
path: root/hal
AgeCommit message (Collapse)Author
2021-04-28audio_hw_usb: reduce the number of the retries in usb_get_capabilityandroid-12.1.0_r9android-12.1.0_r8android-12.1.0_r7android-12.1.0_r22android-12.1.0_r21android-12.1.0_r20android-12.1.0_r19android-12.1.0_r11android-12.1.0_r10android-12.0.0_r32android-12.0.0_r29android-12.0.0_r28android-12.0.0_r27android-12.0.0_r26android-12.0.0_r21android-12.0.0_r20android-12.0.0_r19android-12.0.0_r18android-12.0.0_r16android12L-devandroid12-qpr3-s7-releaseandroid12-qpr3-s6-releaseandroid12-qpr3-s5-releaseandroid12-qpr3-s4-releaseandroid12-qpr3-s3-releaseandroid12-qpr3-s2-releaseandroid12-qpr3-s1-releaseandroid12-qpr3-releaseandroid12-qpr1-releaseandroid12-qpr1-d-s3-releaseandroid12-qpr1-d-s2-releaseandroid12-qpr1-d-s1-releaseandroid12-qpr1-d-releaseandroid12-devllololo
reduce the number of the retries to avoid hitting timecheck timeout 5s. Bug: 172888755 Test: usb audio function simple test Change-Id: I0a30b3246e13e440acf89b6b9f05480ca796259b
2021-02-20Merge "[LSC] Add LOCAL_LICENSE_KINDS to hardware/qcom/audio" am: 92b972b08f ↵Bob Badour
am: 4d21b82ae9 am: fbc7cb969a Original change: https://android-review.googlesource.com/c/platform/hardware/qcom/audio/+/1588196 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I14b8c1b072a1d34de18da7acbb081bec2a9e8093
2021-02-19Merge "[LSC] Add LOCAL_LICENSE_KINDS to hardware/qcom/audio" am: 92b972b08f ↵Bob Badour
am: 4d21b82ae9 Original change: https://android-review.googlesource.com/c/platform/hardware/qcom/audio/+/1588196 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ie0b85bfc15859b4a4bbb3b5d4937d6641e62c1a0
2021-02-16[LSC] Add LOCAL_LICENSE_KINDS to hardware/qcom/audioBob Badour
Added SPDX-license-identifier-Apache-2.0 to: hal/Android.mk post_proc/Android.mk visualizer/Android.mk voice_processing/Android.mk Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: legacy/alsa_sound/Android.mk Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-LGPL to: legacy/libalsa-intf/Android.mk Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I2ffc382d8a925e559275dc2c0a4359d54fa87e09
2021-02-16Merge "Specify version for aidl_interface explicitly" am: 79d73c138a am: ↵Treehugger Robot
2651b854c7 am: fc76f54175 Original change: https://android-review.googlesource.com/c/platform/hardware/qcom/audio/+/1589292 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I77be964eea368259509f6766ce18da714fd87125
2021-02-16Merge "Specify version for aidl_interface explicitly" am: 79d73c138a am: ↵Treehugger Robot
2651b854c7 Original change: https://android-review.googlesource.com/c/platform/hardware/qcom/audio/+/1589292 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I9ed596fa1f74d99d55efaa9f63e88fab067374ce
2021-02-15Specify version for aidl_interface explicitlyJeongik Cha
Bug: 150578172 Test: m Change-Id: I9714cd4416fe0ce23e57cd7db162bfb45b0f84d5
2021-01-05audio_hal: Ensure input buffer size represents an integral number ofllololo
frames. Update get input buffer size logic for record use cases such that the size is also a multiple of bytes per sample period. For 1 channel 24 bit recording the computed value was not a multiple of bytes per sample and this mismatches with the computed value by ALSA causing buffer invalid errors because the use case pointers difference was reaching stop threshold. Bug: 152727483 Test: repro steps in the bug. Merged-In: I953366e09d98352d30b82f40c18a261d2355cf2c Change-Id: I953366e09d98352d30b82f40c18a261d2355cf2c
2021-01-04audio_hal: Ensure input buffer size represents an integral number ofllololo
frames. Update get input buffer size logic for record use cases such that the size is also a multiple of bytes per sample period. For 1 channel 24 bit recording the computed value was not a multiple of bytes per sample and this mismatches with the computed value by ALSA causing buffer invalid errors because the use case pointers difference was reaching stop threshold. Bug: 152727483 Test: repro steps in the bug. Change-Id: I953366e09d98352d30b82f40c18a261d2355cf2c
2020-09-25hal: remove out_standby_l when usb headset is unplugged during playback of ↵Lei Pi
compress-offload am: 9e85e402af am: c2510cab63 Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/qcom/audio/+/12628350 Change-Id: If972db65bbf33d132cb14b0ba4f8ed5fcaa68c3f
2020-09-20hal: remove out_standby_l when usb headset is unplugged during playback of ↵android-11.0.0_r37android-11.0.0_r36android-11.0.0_r35android-11.0.0_r34android-11.0.0_r33android-11.0.0_r32android-11.0.0_r30android11-qpr2-releaseandroid11-qpr1-c-releaseLei Pi
compress-offload Remove the standby patch which was workaround for b/37551929 but impacting basic usecases. Bug: 162394465 Test: Test music playback with and without usb headset. Change-Id: I0c5e0ff162475f3958de79fa851018669edb4998
2020-09-08audio hal: fix voip volume update in check_and_route_playback_usecases() am: ↵Eric Laurent
16240d402b am: cdc9b25709 Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/qcom/audio/+/12516726 Change-Id: Icc4114fac95fb2cbbbd31f149ee5fb81baee14be
2020-09-02audio hal: fix voip volume update in check_and_route_playback_usecases()Eric Laurent
When audio-playback-voip use case device shares the same backend as the new device, audio-playback-voip device is switched, and voip volume must be re-applied. Bug: 167288716 Test: repro steps in bug. Change-Id: I61692d7d5acf5d3147c32fc22761d1ed75c487a2
2020-08-06hal: retry a2dp path start up when failedPreetam Singh
Check if a2dp path start failed and do retry from out_write to recover the path is possible, which can avoid blocking write if path set up failed. Bug: 148926518 Test: manual test Change-Id: If0df472ca0fb6454588fe2b58f1b0cc53bb6e650 Signed-off-by: Eric Huang <ericsphuang@google.com>
2020-06-09hal: add gapless offload playback control am: 7e30a80912 am: 318258f2c3 am: ↵Robert Lee
efff023555 am: b286e42949 Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/qcom/audio/+/11690442 Change-Id: I0c2ecf8f248e1ea9ef3185927aeecb714e027817
2020-06-03hal: add gapless offload playback controlandroid11-devRobert Lee
-Set the property-vendor.audio.offload.gapless.enabled to true to enable gapless playback by default. -Set mixer control to the driver to decide if gapless playback needs to be used or not -If gapless playback is not enabled then partial drain from HAL is treated as full drain. Bug: 157046086 Test: Test with Play Music Change-Id: If010b7f730cc70dd55c2d4ff77ac272e60f3c4e2 Signed-off-by: Robert Lee <lerobert@google.com>
2020-05-28audio hal: fix audio leak when disconnecting A2DP sink am: f030fe8ae0 am: ↵Eric Laurent
d620d11473 am: 3a77e5cd6a am: aaad8cf5af Change-Id: I91428621f2d3430131a27f307b67f3279f9ea7e5
2020-05-20audio hal: fix audio leak when disconnecting A2DP sinkEric Laurent
When A2DP sink is disconnected, the A2DP offload path may be disabled before the audio framework pauses the output stream, in which case the HAL forces the audio route to speaker. When this happens, the front end must be muted to avoid audio leaking over speaker path potentially at full volume if A2DP absolute volume is enabled. Bug: 156044862 Test: repro steps in the bug. Change-Id: I90de8729ac862ca794dbdcf85fc1fa9dfabbf23b
2020-05-04Fix invalid implicit declaration of function 'open'.Rajeev Kumar
Bug: 155495129 Test: built crosshatch_svelte successfully. Change-Id: I00c6932865f773b0a7393addc45d0acf149a9d44
2020-04-30hal: Fix AudioRecord and AudioTrack timestamps incorrectmillerliang
Add delay from xml, add platform capture delay with audio source for AudioRecord, and add more delay in platform_render_latency for playback usecases. Bug: 137600762 Test: Manual test with Clarity test apk Change-Id: I95088fc1826cbb0ecaf2409d6e184dbaaaae7c12 Signed-off-by: millerliang <millerliang@google.com>
2020-04-30Merge "audio: support more channel condition for stereo recording" into rvc-devTreeHugger Robot
2020-04-17Remove log spam when placing power hint callWei Wang
Bug: 154338876 Test: build Change-Id: I93b858a1991b18e281ca488351d2526d5f5dd4d8
2020-04-14audio: support more channel condition for stereo recordingJasmine Cha
- To select correct sound device for recording with AUDIO_SOURCE_VOICE_RECOGNITION and AUDIO_SOURCE_UNPROCESSED, adding more conditions to determine sound device. Bug: 153704905 Bug: 153854533 Test: solotester for unprocessed with ch mask 2,3,4 Test: solotester for voice_recognition with ch mask 2,3,4 Signed-off-by: Jasmine Cha <chajasmine@google.com> Change-Id: I87ffaacd54ca2a5a5b9918948d73a9583e74b0dd
2020-03-04Probe PowerHAL HIDL firstWei Wang
Right now AIDL doesn't provide an API for vendor code to query if the AIDL HAL declared. This will lead to 1) long blocking call for device doesn't have the AIDL HAL and also 2) potential problem if the service starts late after 5s timeout. This is a workaround for addressing 1) on devices having HIDL, but still affects device that doesn't have HIDL service. Bug: 149797408 Test: build Change-Id: I60aada1ab1a044db965987bca5f6eee5b6262b20
2020-02-11Support Power HAL AIDL serviceWei Wang
Bug: 148798433 Test: Build Change-Id: Ie14d90bf17faad68beb16a9916e2fab9627b1eb4
2019-12-06audio: free and assign NULL to global static device pointer am: 506fd42a89Automerger Merge Worker
Change-Id: Ie5298d1d83de872c5a2eb64c35ca2a8fcfac0c75
2019-11-26audio: free and assign NULL to global static device pointerAniket Kumar Lata
Free and assign NULL to global static device pointer instead of local pointer to avoid free after use issue. Bug: 144583303 Signed-off-by: Harrison Lingren <hlingren@google.com> Change-Id: Idfdef719320efcd792c7d2ebd7ec2dfe5d3fbfbd
2019-11-22Merge "Fix Pixel HAL for Audio VTS V6.0" am: d00fb92a51Mikhail Naganov
am: 7a6a02c8e2 Change-Id: I598b7bf1837c9203b3a6701df105dc1cebe123d5
2019-11-21Fix Pixel HAL for Audio VTS V6.0Mikhail Naganov
Fix error codes returned by stream pause and resume methods for the offload case. Fix mmap buffer size check. Bug: 144575694 Test: atest VtsHalAudioV6_0TargetTest Change-Id: Iead2ed737a1994fd36f7b0f69ad107afcf14ddd6 Merged-In: Iead2ed737a1994fd36f7b0f69ad107afcf14ddd6
2019-11-15audio: free and assign NULL to global static device pointerCarter Hsu
am: 73d6b59977 Change-Id: I44632c224c6ee9edca73fda24593362379220fff
2019-11-15audio: free and assign NULL to global static device pointerCarter Hsu
From: Preetam Singh Ranawat <apranawat@codeaurora.org> Date: Mon, 24 Jun 2019 15:11:28 +0530 Subject: audio: free and assign NULL to global static device pointer -free and assign NULL to global static device pointer instead of local pointer to avoid use after free issue. Bug: 142267478 Test: manual Change-Id: I6f64fe0f6034844279c9a481726426dc5b989b41
2019-10-03Merge "Remove libhwbinder/libhidltransport deps"Steven Moreland
am: 32bbb9a379 Change-Id: Iadbf380c97bcd6e0cd3b30222a724f1c93989b9a
2019-10-01Remove libhwbinder/libhidltransport depsSteven Moreland
Since these were combined into libhidlbase. Bug: 135686713 Test: build only (libhwbinder/libhidltransport are empty) Change-Id: If2f4ffb73967cfdba61d0aeecb75a6c5d70e7fde
2019-08-09Fix incorrect sysprop nameJiyong Park
Starting from Q-launching devices, sysprops defined by vendor should start with vendor. or ro.vendor. Therefore, renaming ro.qc.sdk.audio.fluencetype to ro.vendor.audio.sdk.fluencetype. For legacy compatibility, the HAL reads both sysprops; first the new one and then falls back to the old one. Bug: 139108926 Test: making a video call via Duo, make sure sound works Test: vol adjust during a phone call works Change-Id: I54babf96de702a142cbe860f59d6b5b011bfa374
2019-08-09Revert "Revert "Read both vendor.audio_hal.* and audio_hal.* sysprops""Jiyong Park
This reverts commit 25054b7a665f02f441169353514116fa9d772953. Bug: 139108926 Test: making a video call via Duo, make sure sound works Test: vol adjust during a phone call works Change-Id: Iea2371c79aa8061009a4f26f0574f1e1ea5742c9
2019-08-08Revert "Read both vendor.audio_hal.* and audio_hal.* sysprops"Andrew Chant
This reverts commit 83fde0ec25e15f4aa94deae1e53738c2fe039775. Reason for revert: No vol adjust on calls No audio in duo vid calls. Bug: 139108926 Change-Id: I21a6f81d1880251fd5bf9269363fbfda59674fd3
2019-07-29Read both vendor.audio_hal.* and audio_hal.* syspropsJiyong Park
Starting from Q-launching devices, all vendor-defined sysprops should be prefixed with "vendor.". To support such new devices as well as old devices where the renamining isn't required, audio HAL is using both properties: vendor.audio_hal.* is read first and then fall backs to audio_hal.*. Bug: b/138278883 Test: play some audio Test: run VtsTrebleSysProp Change-Id: I15158467f81ac99c36c40f6ca0a6c00cbca7fb24
2019-06-21Merge "audio_hw: close mmap file descriptor to fix leak" into qt-devandroid10-devEric Laurent
2019-06-20audio_hw: close mmap file descriptor to fix leakPhil Burk
The file descriptor for MMAP shared memory was created and passed to AudioFlinger but never closed. Now the FD is closed when the stream is goes to standby. Bug: 134381208 Test: Get HAL pid. Test: adb shell ps | grep audio Test: adb shell ls -l /proc/{halpid}/fd | wc Test: Run Oboetester or other app that uses MMAP Test: Completely close the app. Test: adb shell ls -l /proc/{halpid}/fd | wc Test: Count should NOT grow each time. Change-Id: Ieaaf1c6bdc96e7ecf01cee23215fb39f79662111
2019-06-13audio: set hotword input for soundtrigger onlyCarter Hsu
The sound_trigger session might have been paused while soundtrigger client starts to record. In this corner case, this input won't be detected as soundtrigger input in audio HAL since the st_session handle has been removed because the st_session is in pause state. Then soundtrigger input will try to open pcm driver and act as normal audio record, it will cause race condition on pcm node. To fix this, set the input with AUDIO_INPUT_FLAG_HW_HOTWORD flag to be always soundtrigger input. Bug: 135059114 Test: hotword/music detection works Change-Id: I4475bfb1d3e2c9b998c583e9244c0aa4f07b2134 Signed-off-by: Carter Hsu <carterhsu@google.com>
2019-06-09audio: Add support for DSDS for incall music featureVignesh Kulothungan
Add support for incall-music-uplink2 usecase to enable Dual Sim Dual Standby (DSDS) voice scenarios Bug: 132080107 Test: Local test Change-Id: I26206b1887f002bb58fcfb3378600ef81e111662 Signed-off-by: BubbleFang <bubblefang@google.com>
2019-05-29audio: fix AEC/NS effect controlCarter Hsu
Android Q supports concurrent capture and will create more than one AEC/NS effects if app creates over 1 voice record tracks. Refine the AEC/NS control to support mutilple AEC/NS effects. Also correct the voice-call stream type in STHAL. Bug: 129111371 Bug: 128456220 Test: manual Change-Id: Icd0863f54e17cd6a5ee765f9bb5fe1b4580743a4 Signed-off-by: Carter Hsu <carterhsu@google.com>
2019-05-29audio: fix control flowCarter Hsu
1. Audio HAL should notified STHAL before sending audio calibration of audio usecase to kernel. 2. Fix the condition logic of pcm_capture, the stream.out and stream.in are union, so we can't check if it's NULL. Bug: 129111371 Test: manual Change-Id: I39676410555f7f528c0705059c312a1250d489f0 Signed-off-by: Carter Hsu <carterhsu@google.com>
2019-05-15Merge "audio: fix resume music not smooth after press end call with touch ↵TreeHugger Robot
sound" into qt-dev
2019-05-09Merge "hal: Modify A2DP output routing post releaseAudioPatch" into qt-devEric Laurent
2019-05-08hal: Modify A2DP output routing post releaseAudioPatchAniket Kumar Lata
HAL routes A2DP stream to speaker on releaseAudioPatch from APM until the stream is put to standby from framework. APM may releaseAudioPatch for an output where A2DP is suspended and SCO is active leading to HAL switching all streams to speaker. Fix this behavior by routing streams to speaker only if both SCO and A2DP are not active. Bug: 126848701 Test: repro steps in bug Change-Id: Ic315b16480fe6d0c81c45716534a42b800e2d9da
2019-05-08Merge "audio: don't start voice call when voice path is not ready." into qt-devJuyu Chen
2019-05-01audio hal: report index channel masks for USBEric Laurent
Report only index channel masks for USB output profiles supporting more than two channels. Bug: 120947396 Test: play multichannel audio over USB Change-Id: I10f6d4751a5a17674d24fb0d074f1dd6a71a06e1
2019-04-29audio: don't start voice call when voice path is not ready.juyuchen
Bug: 130443032 Test: voice call test. Change-Id: Icb9b92a1f6be23cbf93970d6b10777856127dcc5
2019-04-19audio: fix resume music not smooth after press end call with touch soundRobert Lee
There are three usecases, the first is low-latency-playback(touch sound), the second is audio-playback-voip(end call tone), the third is deep-buffer-playback or compress-offload-playback(Music). When low-latency-playback stop, it will trigger reroute to handset for audio-playback-voip first then reroute to speaker for deep-buffer-playback or compress-offload-playback. The fix is to trigger reroute only when audio-playback-voip stop. Bug: 130128135 Test: Music resume smoothly after press end call button w/ touch sound Change-Id: Id5e8cefd53a852d0ce98a9f5ce095bee5832cb5a Signed-off-by: Robert Lee <lerobert@google.com>