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

Commit 86ad3d10 authored by Takeshi Oishi's avatar Takeshi Oishi
Browse files

Add USB MIC in case of AUDIO_SOURCE_CAMCORDER

A device which supports USB camera cannot record audio stream
because there is no definition of USB audio input device when
specifying CAMCORDER. For getting audio from USB camera,
AUDIO_DEVICE_IN_USB_DEVICE should be added as an audio input device
in case of CAMCORDER.

Test: run cts -m CtsCameraTestCases
Change-Id: I47140a4ae3c6a8c1b5ee1d4b302c97d860cb18d6
parent cd17b745
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -680,6 +680,9 @@ audio_devices_t Engine::getDeviceForInputSource(audio_source_t inputSource) cons
            device = AUDIO_DEVICE_IN_BACK_MIC;
        } else if (availableDeviceTypes & AUDIO_DEVICE_IN_BUILTIN_MIC) {
            device = AUDIO_DEVICE_IN_BUILTIN_MIC;
        } else if (availableDeviceTypes & AUDIO_DEVICE_IN_USB_DEVICE) {
            // This is specifically for a device without built-in mic
            device = AUDIO_DEVICE_IN_USB_DEVICE;
        }
        break;
    case AUDIO_SOURCE_VOICE_DOWNLINK: