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

Commit 1c5eb434 authored by Robert Wu's avatar Robert Wu Committed by Android (Google) Code Review
Browse files

Merge "AAudio: Add hotword and echo reference presets" into main

parents 35905c90 097c1a27
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -539,6 +539,22 @@ enum {
     * Available since API level 29.
     */
    AAUDIO_INPUT_PRESET_VOICE_PERFORMANCE = 10,

    /**
     * Use this preset for an echo canceller to capture the reference signal.
     * Reserved for system components.
     * Requires CAPTURE_AUDIO_OUTPUT permission
     * Available since API level 35.
     */
    AAUDIO_INPUT_PRESET_SYSTEM_ECHO_REFERENCE = 1997,

    /**
     * Use this preset for preemptible, low-priority software hotword detection.
     * Reserved for system components.
     * Requires CAPTURE_AUDIO_HOTWORD permission.
     * Available since API level 35.
     */
    AAUDIO_INPUT_PRESET_SYSTEM_HOTWORD = 1999,
};
typedef int32_t aaudio_input_preset_t;

+3 −1
Original line number Diff line number Diff line
@@ -184,6 +184,8 @@ aaudio_result_t AAudioStreamParameters::validate() const {
        case AAUDIO_INPUT_PRESET_VOICE_RECOGNITION:
        case AAUDIO_INPUT_PRESET_UNPROCESSED:
        case AAUDIO_INPUT_PRESET_VOICE_PERFORMANCE:
        case AAUDIO_INPUT_PRESET_SYSTEM_ECHO_REFERENCE:
        case AAUDIO_INPUT_PRESET_SYSTEM_HOTWORD:
            break; // valid
        default:
            ALOGD("input preset not valid = %d", mInputPreset);