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

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

Merge "post_proc: send ENABLE_FLAG directly to offload effect driver"

parents a372462d d45948e2
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -211,9 +211,14 @@ int bassboost_enable(effect_context_t *context)
    bassboost_context_t *bass_ctxt = (bassboost_context_t *)context;

    ALOGV("%s", __func__);

    if (!offload_bassboost_get_enable_flag(&(bass_ctxt->offload_bass)))
    if (!offload_bassboost_get_enable_flag(&(bass_ctxt->offload_bass))) {
        offload_bassboost_set_enable_flag(&(bass_ctxt->offload_bass), true);
        if (bass_ctxt->ctl && bass_ctxt->strength)
            offload_bassboost_send_params(bass_ctxt->ctl,
                                          bass_ctxt->offload_bass,
                                          OFFLOAD_SEND_BASSBOOST_ENABLE_FLAG |
                                          OFFLOAD_SEND_BASSBOOST_STRENGTH);
    }
    return 0;
}

+7 −2
Original line number Diff line number Diff line
@@ -210,9 +210,14 @@ int virtualizer_enable(effect_context_t *context)
    virtualizer_context_t *virt_ctxt = (virtualizer_context_t *)context;

    ALOGV("%s", __func__);

    if (!offload_virtualizer_get_enable_flag(&(virt_ctxt->offload_virt)))
    if (!offload_virtualizer_get_enable_flag(&(virt_ctxt->offload_virt))) {
        offload_virtualizer_set_enable_flag(&(virt_ctxt->offload_virt), true);
        if (virt_ctxt->ctl && virt_ctxt->strength)
            offload_virtualizer_send_params(virt_ctxt->ctl,
                                          virt_ctxt->offload_virt,
                                          OFFLOAD_SEND_VIRTUALIZER_ENABLE_FLAG |
                                          OFFLOAD_SEND_BASSBOOST_STRENGTH);
    }
    return 0;
}