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

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

Merge "hal: Update FM record usecase in open input stream." into audio-hal.lnx.6.0

parents c53786af 0aa07ab8
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -8043,6 +8043,16 @@ static int adev_open_input_stream(struct audio_hw_device *dev,
    in->format = config->format;

    in->usecase = USECASE_AUDIO_RECORD;

    if (in->source == AUDIO_SOURCE_FM_TUNER) {
        if(!get_usecase_from_list(adev, USECASE_AUDIO_RECORD_FM_VIRTUAL))
            in->usecase = USECASE_AUDIO_RECORD_FM_VIRTUAL;
        else {
            ret = -EINVAL;
            goto err_open;
        }
    }

    if (config->sample_rate == LOW_LATENCY_CAPTURE_SAMPLE_RATE &&
            (flags & AUDIO_INPUT_FLAG_FAST) != 0) {
        is_low_latency = true;