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

Unverified Commit 871e939f authored by Narsinga Rao Chella's avatar Narsinga Rao Chella Committed by Michael Bestas
Browse files

HAL: Restrict calls to ADM for low-latency usecase



Stream must be registered for AUDIO_OUTPUT_FLAG_FAST and AUDIO_INPUT_FLAG_FAST.
The others are not intended to take this path. If all streams are registered,
they wait for focus which leads to underruns.

Change-Id: I7304a09ee9a6f60b10394a2ed206e365e3b8090e
Signed-off-by: default avatarNarsinga Rao Chella <nrchella@codeaurora.org>
parent b324a86d
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -3320,6 +3320,7 @@ int start_input_stream(struct stream_in *in)
            in->pcm = NULL;
            in->pcm = NULL;
            goto error_open;
            goto error_open;
        }
        }
        if (in->flags == AUDIO_INPUT_FLAG_FAST)
            register_in_stream(in);
            register_in_stream(in);
        if (in->realtime) {
        if (in->realtime) {
            ATRACE_BEGIN("pcm_in_start");
            ATRACE_BEGIN("pcm_in_start");
@@ -4174,6 +4175,7 @@ int start_output_stream(struct stream_out *out)
    }
    }


    if (ret == 0) {
    if (ret == 0) {
        if (out->flags == AUDIO_OUTPUT_FLAG_FAST)
            register_out_stream(out);
            register_out_stream(out);
        if (out->realtime) {
        if (out->realtime) {
            if (out->pcm == NULL || !pcm_is_ready(out->pcm)) {
            if (out->pcm == NULL || !pcm_is_ready(out->pcm)) {