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

Commit ee2ff962 authored by wjiang's avatar wjiang
Browse files

post_proc: disable Bassboost and Virtualizer for certain devices

WFD, Hdmi and usb audio are not intended to be applied with
SA+ bassboost and virtualizer, so add into invalid device list.

Change-Id: Ifcf9cdffb6657cf82bf903d16d4a3ae8471590f0
CRs-Fixed: 630408
parent 767e35d9
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
 * Not a Contribution.
 *
 * Copyright (C) 2013 The Android Open Source Project
@@ -153,7 +153,10 @@ int bassboost_set_device(effect_context_t *context, uint32_t device)
    bass_ctxt->device = device;
    if((device == AUDIO_DEVICE_OUT_SPEAKER) ||
       (device == AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT) ||
       (device == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER)) {
       (device == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER) ||
       (device == AUDIO_DEVICE_OUT_PROXY) ||
       (device == AUDIO_DEVICE_OUT_AUX_DIGITAL) ||
       (device == AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET)) {
        if (offload_bassboost_get_enable_flag(&(bass_ctxt->offload_bass))) {
            offload_bassboost_set_enable_flag(&(bass_ctxt->offload_bass), false);
            bass_ctxt->temp_disabled = true;
+5 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
 * Not a Contribution.
 *
 * Copyright (C) 2013 The Android Open Source Project
@@ -153,7 +153,10 @@ int virtualizer_set_device(effect_context_t *context, uint32_t device)
    virt_ctxt->device = device;
    if((device == AUDIO_DEVICE_OUT_SPEAKER) ||
       (device == AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT) ||
       (device == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER)) {
       (device == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER) ||
       (device == AUDIO_DEVICE_OUT_PROXY) ||
       (device == AUDIO_DEVICE_OUT_AUX_DIGITAL) ||
       (device == AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET)) {
        if (offload_virtualizer_get_enable_flag(&(virt_ctxt->offload_virt))) {
            offload_virtualizer_set_enable_flag(&(virt_ctxt->offload_virt), false);
            virt_ctxt->temp_disabled = true;