summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2019-01-15 18:31:49 -0800
committerKevin Rocard <krocard@google.com>2019-02-15 01:51:23 +0000
commitc32a993999f661c53853d6edaa8643ebdb291993 (patch)
treeae50be5917f6901b1e7fe070152bb072adff501f /audio
parent9c140b452a082071d145fcc31637de9d2d2f1be5 (diff)
downloadplatform_hardware_interfaces-c32a993999f661c53853d6edaa8643ebdb291993.tar.gz
platform_hardware_interfaces-c32a993999f661c53853d6edaa8643ebdb291993.tar.bz2
platform_hardware_interfaces-c32a993999f661c53853d6edaa8643ebdb291993.zip
[Master port]Add new audio sources for audio capture
This patch ports a change to the HAL interfaces done in master in order to have the same Audio common HAL interface in both AOSP and master. This is needed as the Bluetooth HAL uses the audio common HAL and needs to be frozen in the same state in both AOSP and MASTER. This commit adds the following audio capture sources: - AUDIO_SOURCE_VOICE_PERFORMANCE: for real time live performances like Karaoke. - AUDIO_SOURCE_ECHO_REFERENCE: for capturing the reference signal to suppress by an echo canceller. Protected by privileged permission CAPTURE_AUDIO_OUTPUT. Also added device AUDIO_DEVICE_IN_ECHO_REFERENCE selected when the requested capture source is AUDIO_SOURCE_ECHO_REFERENCE. Bug: 124247199 Bug: 118203066 Test: CTS tests for audio capture Change-Id: Ia93550b278733ae9cc5cda731b014421002fde35 Merged-In: Ia93550b278733ae9cc5cda731b014421002fde35
Diffstat (limited to 'audio')
-rw-r--r--audio/common/5.0/types.hal14
1 files changed, 13 insertions, 1 deletions
diff --git a/audio/common/5.0/types.hal b/audio/common/5.0/types.hal
index dab74645ff..b4e947096f 100644
--- a/audio/common/5.0/types.hal
+++ b/audio/common/5.0/types.hal
@@ -133,7 +133,18 @@ enum AudioSource : int32_t {
* and raw signal analysis.
*/
UNPROCESSED = 9,
-
+ /**
+ * Source for capturing audio meant to be processed in real time and played back for live
+ * performance (e.g karaoke). The capture path will minimize latency and coupling with
+ * playback path.
+ */
+ VOICE_PERFORMANCE = 10,
+ /**
+ * Source for an echo canceller to capture the reference signal to be cancelled.
+ * The echo reference signal will be captured as close as possible to the DAC in order
+ * to include all post processing applied to the playback path.
+ */
+ ECHO_REFERENCE = 1997,
FM_TUNER = 1998,
};
@@ -598,6 +609,7 @@ enum AudioDevice : uint32_t {
IN_PROXY = BIT_IN | 0x1000000,
IN_USB_HEADSET = BIT_IN | 0x2000000,
IN_BLUETOOTH_BLE = BIT_IN | 0x4000000,
+ IN_ECHO_REFERENCE = BIT_IN | 0x10000000,
IN_DEFAULT = BIT_IN | BIT_DEFAULT,
// Note that the 2.0 IN_ALL* have been moved to helper functions