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

Commit ae9ad12d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "audio: Reject incall record request when mode is not IN_CALL"

parents 6c59b0a4 c862f71d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3367,6 +3367,10 @@ static int adev_open_input_stream(struct audio_hw_device *dev,
    in->format = config->format;

    if (in->device == AUDIO_DEVICE_IN_TELEPHONY_RX) {
        if (adev->mode != AUDIO_MODE_IN_CALL) {
            ret = -EINVAL;
            goto err_open;
        }
        if (config->sample_rate == 0)
            config->sample_rate = AFE_PROXY_SAMPLING_RATE;
        if (config->sample_rate != 48000 && config->sample_rate != 16000 &&