Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff080742 authored by Eric Laurent's avatar Eric Laurent
Browse files

add new audio sources for audio capture

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: 118203066
Test: CTS tests for audio capture
Change-Id: Ia93550b278733ae9cc5cda731b014421002fde35
parent 9bed22a4
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -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