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

Commit e23d1fe4 authored by Eric Laurent's avatar Eric Laurent Committed by Android Git Automerger
Browse files

am daf92cc8: audio policy: fix hotword capture

* commit 'daf92cc8':
  audio policy: fix hotword capture
parents c4467f5f daf92cc8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3833,6 +3833,11 @@ status_t AudioPolicyManager::setInputDevice(audio_io_handle_t input,
        if (!deviceList.isEmpty()) {
            struct audio_patch patch;
            inputDesc->toAudioPortConfig(&patch.sinks[0]);
            // AUDIO_SOURCE_HOTWORD is for internal use only:
            // handled as AUDIO_SOURCE_VOICE_RECOGNITION by the audio HAL
            if (patch.sinks[0].ext.mix.usecase.source == AUDIO_SOURCE_HOTWORD) {
                patch.sinks[0].ext.mix.usecase.source = AUDIO_SOURCE_VOICE_RECOGNITION;
            }
            patch.num_sinks = 1;
            //only one input device for now
            deviceList.itemAt(0)->toAudioPortConfig(&patch.sources[0]);