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

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

Merge "hal : Send drain to the driver if next track returns error"

parents 6878144b d4f1d131
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -835,6 +835,7 @@ static void *offload_thread_loop(void *context)
{
    struct stream_out *out = (struct stream_out *) context;
    struct listnode *item;
    int ret = 0;

    setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_AUDIO);
    set_sched_policy(0, SP_FOREGROUND);
@@ -884,8 +885,14 @@ static void *offload_thread_loop(void *context)
            event = STREAM_CBK_EVENT_WRITE_READY;
            break;
        case OFFLOAD_CMD_PARTIAL_DRAIN:
            compress_next_track(out->compr);
            ret = compress_next_track(out->compr);
            if(ret == 0)
                compress_partial_drain(out->compr);
            else if(ret == -ETIMEDOUT)
                compress_drain(out->compr);
            else
                ALOGE("%s: Next track returned error %d",__func__, ret);

            send_callback = true;
            event = STREAM_CBK_EVENT_DRAIN_READY;
            break;