Merge "hal: update bt-sco sample rate before device enable"
diff --git a/hal/Android.mk b/hal/Android.mk
index d3d909d..87ebeea 100644
--- a/hal/Android.mk
+++ b/hal/Android.mk
@@ -41,6 +41,10 @@
LOCAL_CFLAGS += -DANC_HEADSET_ENABLED
endif
+ifneq ($(strip $(AUDIO_FEATURE_DISABLED_FLUENCE)),true)
+ LOCAL_CFLAGS += -DFLUENCE_ENABLED
+endif
+
ifneq ($(strip $(AUDIO_FEATURE_DISABLED_PROXY_DEVICE)),true)
LOCAL_CFLAGS += -DAFE_PROXY_ENABLED
endif
@@ -86,7 +90,7 @@
endif
ifneq ($(strip, $(AUDIO_FEATURE_DISABLED_SPKR_PROTECTION)),true)
-ifneq ($(filter msm8974,$(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter msm8974 apq8084,$(TARGET_BOARD_PLATFORM)),)
LOCAL_CFLAGS += -DSPKR_PROT_ENABLED
LOCAL_SRC_FILES += audio_extn/spkr_protection.c
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
diff --git a/hal/audio_extn/audio_extn.c b/hal/audio_extn/audio_extn.c
index 31a6353..d0caccb 100644
--- a/hal/audio_extn/audio_extn.c
+++ b/hal/audio_extn/audio_extn.c
@@ -28,6 +28,8 @@
#include "audio_hw.h"
#include "audio_extn.h"
+#include "platform.h"
+#include "platform_api.h"
#define MAX_SLEEP_RETRY 100
#define WIFI_INIT_WAIT_SLEEP 50
@@ -173,6 +175,60 @@
}
#endif /* ANC_HEADSET_ENABLED */
+#ifndef FLUENCE_ENABLED
+#define audio_extn_set_fluence_parameters(adev, parms) (0)
+#define audio_extn_get_fluence_parameters(adev, query, reply) (0)
+#else
+void audio_extn_set_fluence_parameters(struct audio_device *adev,
+ struct str_parms *parms)
+{
+ int ret = 0, err;
+ char value[32];
+ struct listnode *node;
+ struct audio_usecase *usecase;
+
+ err = str_parms_get_str(parms, AUDIO_PARAMETER_KEY_FLUENCE,
+ value, sizeof(value));
+ ALOGV_IF(err >= 0, "%s: Set Fluence Type to %s", __func__, value);
+ if (err >= 0) {
+ ret = platform_set_fluence_type(adev->platform, value);
+ if (ret != 0) {
+ ALOGE("platform_set_fluence_type returned error: %d", ret);
+ } else {
+ /*
+ *If the fluence is manually set/reset, devices
+ *need to get updated for all the usecases
+ *i.e. audio and voice.
+ */
+ list_for_each(node, &adev->usecase_list) {
+ usecase = node_to_item(node, struct audio_usecase, list);
+ select_devices(adev, usecase->id);
+ }
+ }
+ }
+}
+
+int audio_extn_get_fluence_parameters(struct audio_device *adev,
+ struct str_parms *query, struct str_parms *reply)
+{
+ int ret = 0, err;
+ char value[256] = {0};
+
+ err = str_parms_get_str(query, AUDIO_PARAMETER_KEY_FLUENCE, value,
+ sizeof(value));
+ if (err >= 0) {
+ ret = platform_get_fluence_type(adev->platform, value, sizeof(value));
+ if (ret >= 0) {
+ ALOGV("%s: Fluence Type is %s", __func__, value);
+ str_parms_add_str(reply, AUDIO_PARAMETER_KEY_FLUENCE, value);
+ } else
+ goto done;
+ }
+done:
+ return ret;
+}
+#endif /* FLUENCE_ENABLED */
+
#ifndef AFE_PROXY_ENABLED
#define audio_extn_set_afe_proxy_parameters(adev, parms) (0)
#define audio_extn_get_afe_proxy_parameters(query, reply) (0)
@@ -372,6 +428,7 @@
struct str_parms *parms)
{
audio_extn_set_anc_parameters(adev, parms);
+ audio_extn_set_fluence_parameters(adev, parms);
audio_extn_set_afe_proxy_parameters(adev, parms);
audio_extn_fm_set_parameters(adev, parms);
audio_extn_listen_set_parameters(adev, parms);
@@ -386,6 +443,7 @@
{
char *kv_pairs = NULL;
audio_extn_get_afe_proxy_parameters(query, reply);
+ audio_extn_get_fluence_parameters(adev, query, reply);
kv_pairs = str_parms_to_str(reply);
ALOGD_IF(kv_pairs != NULL, "%s: returns %s", __func__, kv_pairs);
diff --git a/hal/audio_extn/audio_extn.h b/hal/audio_extn/audio_extn.h
index 8bbd2cf..c7b0c0b 100644
--- a/hal/audio_extn/audio_extn.h
+++ b/hal/audio_extn/audio_extn.h
@@ -39,6 +39,16 @@
bool audio_extn_should_use_handset_anc(int in_channels);
#endif
+#ifndef FLUENCE_ENABLED
+#define audio_extn_set_fluence_parameters(adev, parms) (0)
+#define audio_extn_get_fluence_parameters(adev, query, reply) (0)
+#else
+void audio_extn_set_fluence_parameters(struct audio_device *adev,
+ struct str_parms *parms);
+int audio_extn_get_fluence_parameters(struct audio_device *adev,
+ struct str_parms *query, struct str_parms *reply);
+#endif
+
#ifndef AFE_PROXY_ENABLED
#define audio_extn_set_afe_proxy_channel_mixer(adev,channel_count) (0)
#define audio_extn_read_afe_proxy_channel_masks(out) (0)
@@ -166,7 +176,7 @@
#endif
#ifndef DS1_DOLBY_DDP_ENABLED
-#define audio_extn_dolby_set_endpoint() (0)
+#define audio_extn_dolby_set_endpoint(adev) (0)
#else
void audio_extn_dolby_set_endpoint(struct audio_device *adev);
#endif
@@ -174,7 +184,7 @@
#ifndef DS1_DOLBY_DDP_ENABLED
#define audio_extn_ddp_set_parameters(adev, parms) (0)
#define audio_extn_is_dolby_format(format) (0)
-#define audio_extn_dolby_get_snd_codec_id(format) (0)
+#define audio_extn_dolby_get_snd_codec_id(adev, out, format) (0)
#define audio_extn_dolby_send_ddp_endp_params(adev) (0)
#else
bool audio_extn_is_dolby_format(audio_format_t format);
diff --git a/hal/audio_extn/spkr_protection.c b/hal/audio_extn/spkr_protection.c
index 5ec7eba..6c0eec0 100644
--- a/hal/audio_extn/spkr_protection.c
+++ b/hal/audio_extn/spkr_protection.c
@@ -633,7 +633,11 @@
ret = -EINVAL;
}
}
+
exit:
+ /* Clear VI feedback cal and replace with handset MIC */
+ platform_send_audio_calibration(adev->platform,
+ SND_DEVICE_IN_HANDSET_MIC);
if (ret) {
if (handle.pcm_tx)
pcm_close(handle.pcm_tx);
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 3d07782..9f76d31 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -317,13 +317,14 @@
if(SND_DEVICE_IN_USB_HEADSET_MIC == snd_device)
audio_extn_usb_start_capture(adev);
- if (snd_device == SND_DEVICE_OUT_SPEAKER &&
+ if ((snd_device == SND_DEVICE_OUT_SPEAKER ||
+ snd_device == SND_DEVICE_OUT_VOICE_SPEAKER) &&
audio_extn_spkr_prot_is_enabled()) {
- if (audio_extn_spkr_prot_start_processing(snd_device)) {
- ALOGE("%s: spkr_start_processing failed", __func__);
- return -EINVAL;
- }
- } else {
+ if (audio_extn_spkr_prot_start_processing(snd_device)) {
+ ALOGE("%s: spkr_start_processing failed", __func__);
+ return -EINVAL;
+ }
+ } else {
ALOGV("%s: snd_device(%d: %s)", __func__,
snd_device, device_name);
if (platform_send_audio_calibration(adev->platform, snd_device) < 0) {
@@ -376,7 +377,8 @@
if(SND_DEVICE_IN_USB_HEADSET_MIC == snd_device)
audio_extn_usb_stop_capture(adev);
- if (snd_device == SND_DEVICE_OUT_SPEAKER &&
+ if ((snd_device == SND_DEVICE_OUT_SPEAKER ||
+ snd_device == SND_DEVICE_OUT_VOICE_SPEAKER) &&
audio_extn_spkr_prot_is_enabled()) {
audio_extn_spkr_prot_stop_processing();
} else
@@ -563,21 +565,6 @@
return ret;
}
-static void update_devices_for_all_voice_usecases(struct audio_device *adev)
-{
- struct listnode *node;
- struct audio_usecase *usecase;
-
- list_for_each(node, &adev->usecase_list) {
- usecase = node_to_item(node, struct audio_usecase, list);
- if (usecase->type == VOICE_CALL) {
- ALOGV("%s: updating device for usecase:%s", __func__,
- use_case_table[usecase->id]);
- select_devices(adev, usecase->id);
- }
- }
-}
-
static audio_usecase_t get_voice_usecase_id_from_list(struct audio_device *adev)
{
struct audio_usecase *usecase;
@@ -1479,7 +1466,7 @@
} else if ((adev->mode == AUDIO_MODE_IN_CALL) &&
voice_is_in_call(adev) &&
(out == adev->primary_output)) {
- update_devices_for_all_voice_usecases(adev);
+ voice_update_devices_for_all_voice_usecases(adev);
}
}
diff --git a/hal/audio_hw.h b/hal/audio_hw.h
index 3cec0f5..7a79a1f 100644
--- a/hal/audio_hw.h
+++ b/hal/audio_hw.h
@@ -35,13 +35,15 @@
#define BT_SCO_WB_SAMPLE_RATE "bt-sco-wb-samplerate"
/* Flags used to initialize acdb_settings variable that goes to ACDB library */
-#define DMIC_FLAG 0x00000002
-#define QMIC_FLAG 0x00000004
-#define TTY_MODE_OFF 0x00000010
-#define TTY_MODE_FULL 0x00000020
-#define TTY_MODE_VCO 0x00000040
-#define TTY_MODE_HCO 0x00000080
-#define TTY_MODE_CLEAR 0xFFFFFF0F
+#define NONE_FLAG 0x00000000
+#define DMIC_FLAG 0x00000002
+#define QMIC_FLAG 0x00000004
+#define TTY_MODE_OFF 0x00000010
+#define TTY_MODE_FULL 0x00000020
+#define TTY_MODE_VCO 0x00000040
+#define TTY_MODE_HCO 0x00000080
+#define TTY_MODE_CLEAR 0xFFFFFF0F
+#define FLUENCE_MODE_CLEAR 0xFFFFFFF0
#define ACDB_DEV_TYPE_OUT 1
#define ACDB_DEV_TYPE_IN 2
diff --git a/hal/msm8916/hw_info.c b/hal/msm8916/hw_info.c
index d002a3f..7b955ba 100644
--- a/hal/msm8916/hw_info.c
+++ b/hal/msm8916/hw_info.c
@@ -131,14 +131,8 @@
hw_info->snd_devices = NULL;
hw_info->num_snd_devices = 0;
strlcpy(hw_info->dev_extn, "", sizeof(hw_info->dev_extn));
- } else if (!strcmp(snd_card_name, "msm8x16-skuab-snd-card")) {
- strlcpy(hw_info->type, "skuab", sizeof(hw_info->type));
- strlcpy(hw_info->name, "msm8x16", sizeof(hw_info->name));
- hw_info->snd_devices = (snd_device_t *)helicon_skuab_variant_devices;
- hw_info->num_snd_devices = ARRAY_SIZE(helicon_skuab_variant_devices);
- strlcpy(hw_info->dev_extn, "-skuab", sizeof(hw_info->dev_extn));
- } else if (!strcmp(snd_card_name, "msm8x16-skuaa-snd-card")) {
- strlcpy(hw_info->type, " skuaa", sizeof(hw_info->type));
+ } else if (!strcmp(snd_card_name, "msm8x16-skuh-snd-card")) {
+ strlcpy(hw_info->type, "skuh", sizeof(hw_info->type));
strlcpy(hw_info->name, "msm8x16", sizeof(hw_info->name));
hw_info->snd_devices = NULL;
hw_info->num_snd_devices = 0;
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index 70e8c55..8cb2599 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -105,6 +105,7 @@
bool fluence_in_voice_rec;
bool fluence_in_audio_rec;
int fluence_type;
+ char fluence_cap[PROPERTY_VALUE_MAX];
int btsco_sample_rate;
bool slowtalk;
/* Audio calibration related functions */
@@ -605,10 +606,10 @@
my_data->fluence_in_audio_rec = false;
my_data->fluence_type = FLUENCE_NONE;
- property_get("ro.qc.sdk.audio.fluencetype", value, "");
- if (!strncmp("fluencepro", value, sizeof("fluencepro"))) {
+ property_get("ro.qc.sdk.audio.fluencetype", my_data->fluence_cap, "");
+ if (!strncmp("fluencepro", my_data->fluence_cap, sizeof("fluencepro"))) {
my_data->fluence_type = FLUENCE_QUAD_MIC | FLUENCE_DUAL_MIC;
- } else if (!strncmp("fluence", value, sizeof("fluence"))) {
+ } else if (!strncmp("fluence", my_data->fluence_cap, sizeof("fluence"))) {
my_data->fluence_type = FLUENCE_DUAL_MIC;
} else {
my_data->fluence_type = FLUENCE_NONE;
@@ -787,6 +788,63 @@
return ret;
}
+int platform_set_fluence_type(void *platform, char *value)
+{
+ int ret = 0;
+ int fluence_type = FLUENCE_NONE;
+ int fluence_flag = NONE_FLAG;
+ struct platform_data *my_data = (struct platform_data *)platform;
+ struct audio_device *adev = my_data->adev;
+
+ ALOGV("%s: fluence type:%d", __func__, my_data->fluence_type);
+
+ /* only dual mic turn on and off is supported as of now through setparameters */
+ if (!strncmp(AUDIO_PARAMETER_VALUE_DUALMIC,value, sizeof(AUDIO_PARAMETER_VALUE_DUALMIC))) {
+ if (!strncmp("fluencepro", my_data->fluence_cap, sizeof("fluencepro")) ||
+ !strncmp("fluence", my_data->fluence_cap, sizeof("fluence"))) {
+ ALOGV("fluence dualmic feature enabled \n");
+ fluence_type = FLUENCE_DUAL_MIC;
+ fluence_flag = DMIC_FLAG;
+ } else {
+ ALOGE("%s: Failed to set DUALMIC", __func__);
+ ret = -1;
+ goto done;
+ }
+ } else if (!strncmp(AUDIO_PARAMETER_KEY_NO_FLUENCE, value, sizeof(AUDIO_PARAMETER_KEY_NO_FLUENCE))) {
+ ALOGV("fluence disabled");
+ fluence_type = FLUENCE_NONE;
+ } else {
+ ALOGE("Invalid fluence value : %s",value);
+ ret = -1;
+ goto done;
+ }
+
+ if (fluence_type != my_data->fluence_type) {
+ ALOGV("%s: Updating fluence_type to :%d", __func__, fluence_type);
+ my_data->fluence_type = fluence_type;
+ adev->acdb_settings = (adev->acdb_settings & FLUENCE_MODE_CLEAR) | fluence_flag;
+ }
+done:
+ return ret;
+}
+
+int platform_get_fluence_type(void *platform, char *value, uint32_t len)
+{
+ int ret = 0;
+ struct platform_data *my_data = (struct platform_data *)platform;
+
+ if (my_data->fluence_type == FLUENCE_QUAD_MIC) {
+ strlcpy(value, "quadmic", len);
+ } else if (my_data->fluence_type == FLUENCE_DUAL_MIC) {
+ strlcpy(value, "dualmic", len);
+ } else if (my_data->fluence_type == FLUENCE_NONE) {
+ strlcpy(value, "none", len);
+ } else
+ ret = -1;
+
+ return ret;
+}
+
int platform_set_snd_device_acdb_id(snd_device_t snd_device, unsigned int acdb_id)
{
int ret = 0;
@@ -1708,23 +1766,7 @@
char *str = NULL;
char value[256] = {0};
int ret;
- int fluence_type;
- ret = str_parms_get_str(query, AUDIO_PARAMETER_KEY_FLUENCE_TYPE,
- value, sizeof(value));
- if (ret >= 0) {
- if (my_data->fluence_type & FLUENCE_QUAD_MIC) {
- strlcpy(value, "fluencepro", sizeof(value));
- } else if (my_data->fluence_type & FLUENCE_DUAL_MIC) {
- strlcpy(value, "fluence", sizeof(value));
- } else {
- strlcpy(value, "none", sizeof(value));
- }
-
- str_parms_add_str(reply, AUDIO_PARAMETER_KEY_FLUENCE_TYPE, value);
- }
-
- memset(value, 0, sizeof(value));
ret = str_parms_get_str(query, AUDIO_PARAMETER_KEY_SLOWTALK,
value, sizeof(value));
if (ret >= 0) {
diff --git a/hal/msm8974/hw_info.c b/hal/msm8974/hw_info.c
index 6920efe..f43a3b0 100644
--- a/hal/msm8974/hw_info.c
+++ b/hal/msm8974/hw_info.c
@@ -92,6 +92,11 @@
SND_DEVICE_IN_QUAD_MIC,
};
+static const snd_device_t taiko_apq8084_sbc_variant_devices[] = {
+ SND_DEVICE_IN_HANDSET_MIC,
+ SND_DEVICE_IN_SPEAKER_MIC,
+};
+
static const snd_device_t tapan_lite_variant_devices[] = {
SND_DEVICE_OUT_SPEAKER,
SND_DEVICE_OUT_HEADPHONES,
@@ -157,6 +162,12 @@
hw_info->snd_devices = (snd_device_t *)taiko_liquid_variant_devices;
hw_info->num_snd_devices = ARRAY_SIZE(taiko_liquid_variant_devices);
strlcpy(hw_info->dev_extn, "-liquid", sizeof(hw_info->dev_extn));
+ } else if (!strcmp(snd_card_name, "apq8084-taiko-sbc-snd-card")) {
+ strlcpy(hw_info->type, " sbc", sizeof(hw_info->type));
+ strlcpy(hw_info->name, "apq8084", sizeof(hw_info->name));
+ hw_info->snd_devices = (snd_device_t *)taiko_apq8084_sbc_variant_devices;
+ hw_info->num_snd_devices = ARRAY_SIZE(taiko_apq8084_sbc_variant_devices);
+ strlcpy(hw_info->dev_extn, "-sbc", sizeof(hw_info->dev_extn));
} else {
ALOGW("%s: Not an 8084 device", __func__);
}
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index d079e34..aa49c7b 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -112,6 +112,8 @@
bool fluence_in_voice_rec;
bool fluence_in_audio_rec;
int fluence_type;
+ int fluence_mode;
+ char fluence_cap[PROPERTY_VALUE_MAX];
int btsco_sample_rate;
bool slowtalk;
bool is_i2s_ext_modem;
@@ -245,6 +247,11 @@
[SND_DEVICE_IN_HANDSET_STEREO_DMIC] = "handset-stereo-dmic-ef",
[SND_DEVICE_IN_SPEAKER_STEREO_DMIC] = "speaker-stereo-dmic-ef",
[SND_DEVICE_IN_CAPTURE_VI_FEEDBACK] = "vi-feedback",
+ [SND_DEVICE_IN_VOICE_SPEAKER_DMIC_BROADSIDE] = "voice-speaker-dmic-broadside",
+ [SND_DEVICE_IN_SPEAKER_DMIC_BROADSIDE] = "speaker-dmic-broadside",
+ [SND_DEVICE_IN_SPEAKER_DMIC_AEC_BROADSIDE] = "speaker-dmic-broadside",
+ [SND_DEVICE_IN_SPEAKER_DMIC_NS_BROADSIDE] = "speaker-dmic-broadside",
+ [SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS_BROADSIDE] = "speaker-dmic-broadside",
};
/* ACDB IDs (audio DSP path configuration IDs) for each sound device */
@@ -318,6 +325,11 @@
[SND_DEVICE_IN_HANDSET_STEREO_DMIC] = 34,
[SND_DEVICE_IN_SPEAKER_STEREO_DMIC] = 35,
[SND_DEVICE_IN_CAPTURE_VI_FEEDBACK] = 102,
+ [SND_DEVICE_IN_VOICE_SPEAKER_DMIC_BROADSIDE] = 12,
+ [SND_DEVICE_IN_SPEAKER_DMIC_BROADSIDE] = 12,
+ [SND_DEVICE_IN_SPEAKER_DMIC_AEC_BROADSIDE] = 119,
+ [SND_DEVICE_IN_SPEAKER_DMIC_NS_BROADSIDE] = 121,
+ [SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS_BROADSIDE] = 120,
};
struct snd_device_index {
@@ -396,6 +408,11 @@
{TO_NAME_INDEX(SND_DEVICE_IN_HANDSET_STEREO_DMIC)},
{TO_NAME_INDEX(SND_DEVICE_IN_SPEAKER_STEREO_DMIC)},
{TO_NAME_INDEX(SND_DEVICE_IN_CAPTURE_VI_FEEDBACK)},
+ {TO_NAME_INDEX(SND_DEVICE_IN_VOICE_SPEAKER_DMIC_BROADSIDE)},
+ {TO_NAME_INDEX(SND_DEVICE_IN_SPEAKER_DMIC_BROADSIDE)},
+ {TO_NAME_INDEX(SND_DEVICE_IN_SPEAKER_DMIC_AEC_BROADSIDE)},
+ {TO_NAME_INDEX(SND_DEVICE_IN_SPEAKER_DMIC_NS_BROADSIDE)},
+ {TO_NAME_INDEX(SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS_BROADSIDE)},
};
#define DEEP_BUFFER_PLATFORM_DELAY (29*1000LL)
@@ -663,11 +680,12 @@
my_data->fluence_in_voice_rec = false;
my_data->fluence_in_audio_rec = false;
my_data->fluence_type = FLUENCE_NONE;
+ my_data->fluence_mode = FLUENCE_ENDFIRE;
- property_get("ro.qc.sdk.audio.fluencetype", value, "");
- if (!strncmp("fluencepro", value, sizeof("fluencepro"))) {
+ property_get("ro.qc.sdk.audio.fluencetype", my_data->fluence_cap, "");
+ if (!strncmp("fluencepro", my_data->fluence_cap, sizeof("fluencepro"))) {
my_data->fluence_type = FLUENCE_QUAD_MIC | FLUENCE_DUAL_MIC;
- } else if (!strncmp("fluence", value, sizeof("fluence"))) {
+ } else if (!strncmp("fluence", my_data->fluence_cap, sizeof("fluence"))) {
my_data->fluence_type = FLUENCE_DUAL_MIC;
} else {
my_data->fluence_type = FLUENCE_NONE;
@@ -693,6 +711,11 @@
if (!strncmp("true", value, sizeof("true"))) {
my_data->fluence_in_spkr_mode = true;
}
+
+ property_get("persist.audio.fluence.mode",value,"");
+ if (!strncmp("broadside", value, sizeof("broadside"))) {
+ my_data->fluence_mode = FLUENCE_BROADSIDE;
+ }
}
my_data->voice_feature_set = VOICE_FEATURE_SET_DEFAULT;
@@ -816,6 +839,13 @@
strlcat(mixer_path, " capture-fm", MIXER_PATH_MAX_LENGTH);
else if (snd_device == SND_DEVICE_OUT_TRANSMISSION_FM)
strlcat(mixer_path, " transmission-fm", MIXER_PATH_MAX_LENGTH);
+ else if (snd_device == SND_DEVICE_OUT_VOICE_SPEAKER &&
+ audio_extn_spkr_prot_is_enabled() ) {
+ char platform[PROPERTY_VALUE_MAX];
+ property_get("ro.board.platform", platform, "");
+ if (!strncmp("apq8084", platform, sizeof("apq8084")))
+ strlcat(mixer_path, " speaker-protected", MIXER_PATH_MAX_LENGTH);
+ }
}
int platform_get_pcm_device_id(audio_usecase_t usecase, int device_type)
@@ -852,6 +882,63 @@
return ret;
}
+int platform_set_fluence_type(void *platform, char *value)
+{
+ int ret = 0;
+ int fluence_type = FLUENCE_NONE;
+ int fluence_flag = NONE_FLAG;
+ struct platform_data *my_data = (struct platform_data *)platform;
+ struct audio_device *adev = my_data->adev;
+
+ ALOGV("%s: fluence type:%d", __func__, my_data->fluence_type);
+
+ /* only dual mic turn on and off is supported as of now through setparameters */
+ if (!strncmp(AUDIO_PARAMETER_VALUE_DUALMIC,value, sizeof(AUDIO_PARAMETER_VALUE_DUALMIC))) {
+ if (!strncmp("fluencepro", my_data->fluence_cap, sizeof("fluencepro")) ||
+ !strncmp("fluence", my_data->fluence_cap, sizeof("fluence"))) {
+ ALOGV("fluence dualmic feature enabled \n");
+ fluence_type = FLUENCE_DUAL_MIC;
+ fluence_flag = DMIC_FLAG;
+ } else {
+ ALOGE("%s: Failed to set DUALMIC", __func__);
+ ret = -1;
+ goto done;
+ }
+ } else if (!strncmp(AUDIO_PARAMETER_KEY_NO_FLUENCE, value, sizeof(AUDIO_PARAMETER_KEY_NO_FLUENCE))) {
+ ALOGV("fluence disabled");
+ fluence_type = FLUENCE_NONE;
+ } else {
+ ALOGE("Invalid fluence value : %s",value);
+ ret = -1;
+ goto done;
+ }
+
+ if (fluence_type != my_data->fluence_type) {
+ ALOGV("%s: Updating fluence_type to :%d", __func__, fluence_type);
+ my_data->fluence_type = fluence_type;
+ adev->acdb_settings = (adev->acdb_settings & FLUENCE_MODE_CLEAR) | fluence_flag;
+ }
+done:
+ return ret;
+}
+
+int platform_get_fluence_type(void *platform, char *value, uint32_t len)
+{
+ int ret = 0;
+ struct platform_data *my_data = (struct platform_data *)platform;
+
+ if (my_data->fluence_type == FLUENCE_QUAD_MIC) {
+ strlcpy(value, "quadmic", len);
+ } else if (my_data->fluence_type == FLUENCE_DUAL_MIC) {
+ strlcpy(value, "dualmic", len);
+ } else if (my_data->fluence_type == FLUENCE_NONE) {
+ strlcpy(value, "none", len);
+ } else
+ ret = -1;
+
+ return ret;
+}
+
int platform_set_snd_device_acdb_id(snd_device_t snd_device, unsigned int acdb_id)
{
int ret = 0;
@@ -917,21 +1004,28 @@
int acdb_rx_id, acdb_tx_id;
int ret = 0;
- acdb_rx_id = acdb_device_table[out_snd_device];
+ if (my_data->csd == NULL)
+ return ret;
+
+ if (out_snd_device == SND_DEVICE_OUT_VOICE_SPEAKER &&
+ audio_extn_spkr_prot_is_enabled())
+ acdb_rx_id = acdb_device_table[SND_DEVICE_OUT_SPEAKER_PROTECTED];
+ else
+ acdb_rx_id = acdb_device_table[out_snd_device];
+
acdb_tx_id = acdb_device_table[in_snd_device];
- if (my_data->csd != NULL) {
- if (acdb_rx_id > 0 && acdb_tx_id > 0) {
- ret = my_data->csd->enable_device_config(acdb_rx_id, acdb_tx_id);
- if (ret < 0) {
- ALOGE("%s: csd_enable_device_config, failed, error %d",
- __func__, ret);
- }
- } else {
- ALOGE("%s: Incorrect ACDB IDs (rx: %d tx: %d)", __func__,
- acdb_rx_id, acdb_tx_id);
+ if (acdb_rx_id > 0 && acdb_tx_id > 0) {
+ ret = my_data->csd->enable_device_config(acdb_rx_id, acdb_tx_id);
+ if (ret < 0) {
+ ALOGE("%s: csd_enable_device_config, failed, error %d",
+ __func__, ret);
}
+ } else {
+ ALOGE("%s: Incorrect ACDB IDs (rx: %d tx: %d)", __func__,
+ acdb_rx_id, acdb_tx_id);
}
+
return ret;
}
@@ -966,22 +1060,28 @@
int acdb_rx_id, acdb_tx_id;
int ret = 0;
- acdb_rx_id = acdb_device_table[out_snd_device];
+ if (my_data->csd == NULL)
+ return ret;
+
+ if (out_snd_device == SND_DEVICE_OUT_VOICE_SPEAKER &&
+ audio_extn_spkr_prot_is_enabled())
+ acdb_rx_id = acdb_device_table[SND_DEVICE_OUT_SPEAKER_PROTECTED];
+ else
+ acdb_rx_id = acdb_device_table[out_snd_device];
+
acdb_tx_id = acdb_device_table[in_snd_device];
- if (my_data->csd != NULL) {
- if (acdb_rx_id > 0 && acdb_tx_id > 0) {
- ret = my_data->csd->enable_device(acdb_rx_id, acdb_tx_id,
- my_data->adev->acdb_settings);
- if (ret < 0) {
- ALOGE("%s: csd_enable_device, failed, error %d",
- __func__, ret);
- }
- } else {
- ALOGE("%s: Incorrect ACDB IDs (rx: %d tx: %d)", __func__,
- acdb_rx_id, acdb_tx_id);
+ if (acdb_rx_id > 0 && acdb_tx_id > 0) {
+ ret = my_data->csd->enable_device(acdb_rx_id, acdb_tx_id,
+ my_data->adev->acdb_settings);
+ if (ret < 0) {
+ ALOGE("%s: csd_enable_device, failed, error %d", __func__, ret);
}
+ } else {
+ ALOGE("%s: Incorrect ACDB IDs (rx: %d tx: %d)", __func__,
+ acdb_rx_id, acdb_tx_id);
}
+
return ret;
}
@@ -1054,7 +1154,8 @@
mixer_ctl_set_array(ctl, set_values, ARRAY_SIZE(set_values));
if (my_data->csd != NULL) {
- ret = my_data->csd->volume(ALL_SESSION_VSID, volume);
+ ret = my_data->csd->volume(ALL_SESSION_VSID, volume,
+ DEFAULT_VOLUME_RAMP_DURATION_MS);
if (ret < 0) {
ALOGE("%s: csd_volume error %d", __func__, ret);
}
@@ -1071,7 +1172,7 @@
int ret = 0;
uint32_t set_values[ ] = {0,
ALL_SESSION_VSID,
- DEFAULT_VOLUME_RAMP_DURATION_MS};
+ DEFAULT_MUTE_RAMP_DURATION_MS};
set_values[0] = state;
ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
@@ -1084,7 +1185,8 @@
mixer_ctl_set_array(ctl, set_values, ARRAY_SIZE(set_values));
if (my_data->csd != NULL) {
- ret = my_data->csd->mic_mute(ALL_SESSION_VSID, state);
+ ret = my_data->csd->mic_mute(ALL_SESSION_VSID, state,
+ DEFAULT_MUTE_RAMP_DURATION_MS);
if (ret < 0) {
ALOGE("%s: csd_mic_mute error %d", __func__, ret);
}
@@ -1344,7 +1446,10 @@
snd_device = SND_DEVICE_IN_VOICE_SPEAKER_QMIC;
} else {
adev->acdb_settings |= DMIC_FLAG;
- snd_device = SND_DEVICE_IN_VOICE_SPEAKER_DMIC;
+ if (my_data->fluence_mode == FLUENCE_BROADSIDE)
+ snd_device = SND_DEVICE_IN_VOICE_SPEAKER_DMIC_BROADSIDE;
+ else
+ snd_device = SND_DEVICE_IN_VOICE_SPEAKER_DMIC;
}
} else {
snd_device = SND_DEVICE_IN_VOICE_SPEAKER_MIC;
@@ -1379,7 +1484,10 @@
if (in_device & AUDIO_DEVICE_IN_BACK_MIC) {
if (my_data->fluence_type & FLUENCE_DUAL_MIC &&
my_data->fluence_in_spkr_mode) {
- snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS;
+ if (my_data->fluence_mode == FLUENCE_BROADSIDE)
+ snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS_BROADSIDE;
+ else
+ snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS;
adev->acdb_settings |= DMIC_FLAG;
} else
snd_device = SND_DEVICE_IN_SPEAKER_MIC_AEC_NS;
@@ -1395,8 +1503,12 @@
set_echo_reference(adev->mixer, EC_REF_RX);
} else if (adev->active_input->enable_aec) {
if (in_device & AUDIO_DEVICE_IN_BACK_MIC) {
- if (my_data->fluence_type & FLUENCE_DUAL_MIC) {
- snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC;
+ if (my_data->fluence_type & FLUENCE_DUAL_MIC &&
+ my_data->fluence_in_spkr_mode) {
+ if (my_data->fluence_mode == FLUENCE_BROADSIDE)
+ snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC_BROADSIDE;
+ else
+ snd_device = SND_DEVICE_IN_SPEAKER_DMIC_AEC;
adev->acdb_settings |= DMIC_FLAG;
} else
snd_device = SND_DEVICE_IN_SPEAKER_MIC_AEC;
@@ -1412,8 +1524,12 @@
set_echo_reference(adev->mixer, EC_REF_RX);
} else if (adev->active_input->enable_ns) {
if (in_device & AUDIO_DEVICE_IN_BACK_MIC) {
- if (my_data->fluence_type & FLUENCE_DUAL_MIC) {
- snd_device = SND_DEVICE_IN_SPEAKER_DMIC_NS;
+ if (my_data->fluence_type & FLUENCE_DUAL_MIC &&
+ my_data->fluence_in_spkr_mode) {
+ if (my_data->fluence_mode == FLUENCE_BROADSIDE)
+ snd_device = SND_DEVICE_IN_SPEAKER_DMIC_NS_BROADSIDE;
+ else
+ snd_device = SND_DEVICE_IN_SPEAKER_DMIC_NS;
adev->acdb_settings |= DMIC_FLAG;
} else
snd_device = SND_DEVICE_IN_SPEAKER_MIC_NS;
@@ -1783,24 +1899,8 @@
char *str = NULL;
char value[256] = {0};
int ret;
- int fluence_type;
char *kv_pairs = NULL;
- ret = str_parms_get_str(query, AUDIO_PARAMETER_KEY_FLUENCE_TYPE,
- value, sizeof(value));
- if (ret >= 0) {
- if (my_data->fluence_type & FLUENCE_QUAD_MIC) {
- strlcpy(value, "fluencepro", sizeof(value));
- } else if (my_data->fluence_type & FLUENCE_DUAL_MIC) {
- strlcpy(value, "fluence", sizeof(value));
- } else {
- strlcpy(value, "none", sizeof(value));
- }
-
- str_parms_add_str(reply, AUDIO_PARAMETER_KEY_FLUENCE_TYPE, value);
- }
-
- memset(value, 0, sizeof(value));
ret = str_parms_get_str(query, AUDIO_PARAMETER_KEY_SLOWTALK,
value, sizeof(value));
if (ret >= 0) {
diff --git a/hal/msm8974/platform.h b/hal/msm8974/platform.h
index a6c32c9..db58bf1 100644
--- a/hal/msm8974/platform.h
+++ b/hal/msm8974/platform.h
@@ -1,5 +1,5 @@
/*
- * 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
@@ -26,6 +26,11 @@
FLUENCE_QUAD_MIC = 0x2,
};
+enum {
+ FLUENCE_ENDFIRE = 0x1,
+ FLUENCE_BROADSIDE = 0x2,
+};
+
/*
* Below are the devices for which is back end is same, SLIMBUS_0_RX.
* All these devices are handled by the internal HW codec. We can
@@ -120,6 +125,11 @@
SND_DEVICE_IN_HANDSET_STEREO_DMIC,
SND_DEVICE_IN_SPEAKER_STEREO_DMIC,
SND_DEVICE_IN_CAPTURE_VI_FEEDBACK,
+ SND_DEVICE_IN_VOICE_SPEAKER_DMIC_BROADSIDE,
+ SND_DEVICE_IN_SPEAKER_DMIC_BROADSIDE,
+ SND_DEVICE_IN_SPEAKER_DMIC_AEC_BROADSIDE,
+ SND_DEVICE_IN_SPEAKER_DMIC_NS_BROADSIDE,
+ SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS_BROADSIDE,
SND_DEVICE_IN_END,
SND_DEVICE_MAX = SND_DEVICE_IN_END,
@@ -129,7 +139,7 @@
#define DEFAULT_OUTPUT_SAMPLING_RATE 48000
#define ALL_SESSION_VSID 0xFFFFFFFF
-#define DEFAULT_MUTE_RAMP_DURATION 500
+#define DEFAULT_MUTE_RAMP_DURATION_MS 20
#define DEFAULT_VOLUME_RAMP_DURATION_MS 20
#define MIXER_PATH_MAX_LENGTH 100
@@ -170,7 +180,15 @@
#define HFP_PCM_RX 5
#define INCALL_MUSIC_UPLINK_PCM_DEVICE 1
+
+#ifdef PLATFORM_MSM8610
+#define INCALL_MUSIC_UPLINK2_PCM_DEVICE 14
+#elif PLATFORM_MSM8x26
#define INCALL_MUSIC_UPLINK2_PCM_DEVICE 16
+#else
+#define INCALL_MUSIC_UPLINK2_PCM_DEVICE 35
+#endif
+
#define SPKR_PROT_CALIB_RX_PCM_DEVICE 5
#define SPKR_PROT_CALIB_TX_PCM_DEVICE 25
#define PLAYBACK_OFFLOAD_DEVICE 9
@@ -230,8 +248,8 @@
typedef int (*disable_device_t)();
typedef int (*enable_device_config_t)(int, int);
typedef int (*enable_device_t)(int, int, uint32_t);
-typedef int (*volume_t)(uint32_t, int);
-typedef int (*mic_mute_t)(uint32_t, int);
+typedef int (*volume_t)(uint32_t, int, uint16_t);
+typedef int (*mic_mute_t)(uint32_t, int, uint16_t);
typedef int (*slow_talk_t)(uint32_t, uint8_t);
typedef int (*start_voice_t)(uint32_t);
typedef int (*stop_voice_t)(uint32_t);
diff --git a/hal/platform_api.h b/hal/platform_api.h
index 03890e9..bf6bdcb 100644
--- a/hal/platform_api.h
+++ b/hal/platform_api.h
@@ -28,6 +28,8 @@
void platform_add_backend_name(char *mixer_path, snd_device_t snd_device);
int platform_get_pcm_device_id(audio_usecase_t usecase, int device_type);
int platform_get_snd_device_index(char *snd_device_index_name);
+int platform_set_fluence_type(void *platform, char *value);
+int platform_get_fluence_type(void *platform, char *value, uint32_t len);
int platform_set_snd_device_acdb_id(snd_device_t snd_device, unsigned int acdb_id);
int platform_send_audio_calibration(void *platform, snd_device_t snd_device);
int platform_switch_voice_call_device_pre(void *platform);
diff --git a/hal/voice.c b/hal/voice.c
index 1c3ab38..ac067a3 100644
--- a/hal/voice.c
+++ b/hal/voice.c
@@ -405,8 +405,7 @@
adev->voice.tty_mode = tty_mode;
adev->acdb_settings = (adev->acdb_settings & TTY_MODE_CLEAR) | tty_mode;
if (voice_is_in_call(adev))
- //todo: what about voice2, volte and qchat usecases?
- select_devices(adev, USECASE_VOICE_CALL);
+ voice_update_devices_for_all_voice_usecases(adev);
}
}
@@ -446,4 +445,19 @@
voice_extn_init(adev);
}
+void voice_update_devices_for_all_voice_usecases(struct audio_device *adev)
+{
+ struct listnode *node;
+ struct audio_usecase *usecase;
+
+ list_for_each(node, &adev->usecase_list) {
+ usecase = node_to_item(node, struct audio_usecase, list);
+ if (usecase->type == VOICE_CALL) {
+ ALOGV("%s: updating device for usecase:%s", __func__,
+ use_case_table[usecase->id]);
+ select_devices(adev, usecase->id);
+ }
+ }
+}
+
diff --git a/hal/voice.h b/hal/voice.h
index 5e4ce7f..d160569 100644
--- a/hal/voice.h
+++ b/hal/voice.h
@@ -86,4 +86,5 @@
struct stream_out *out);
int voice_check_and_stop_incall_rec_usecase(struct audio_device *adev,
struct stream_in *in);
+void voice_update_devices_for_all_voice_usecases(struct audio_device *adev);
#endif //VOICE_H
diff --git a/post_proc/bass_boost.c b/post_proc/bass_boost.c
index 9e6c1fc..657195d 100644
--- a/post_proc/bass_boost.c
+++ b/post_proc/bass_boost.c
@@ -1,5 +1,5 @@
/*
- * 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,16 +153,27 @@
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;
+ if (bass_ctxt->ctl)
+ offload_bassboost_send_params(bass_ctxt->ctl,
+ bass_ctxt->offload_bass,
+ OFFLOAD_SEND_BASSBOOST_ENABLE_FLAG);
}
} else {
if (!offload_bassboost_get_enable_flag(&(bass_ctxt->offload_bass)) &&
bass_ctxt->temp_disabled) {
offload_bassboost_set_enable_flag(&(bass_ctxt->offload_bass), true);
bass_ctxt->temp_disabled = false;
+ if (bass_ctxt->ctl)
+ offload_bassboost_send_params(bass_ctxt->ctl,
+ bass_ctxt->offload_bass,
+ OFFLOAD_SEND_BASSBOOST_ENABLE_FLAG);
}
}
offload_bassboost_set_device(&(bass_ctxt->offload_bass), device);
@@ -211,7 +222,9 @@
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)) &&
+ !(bass_ctxt->temp_disabled)) {
offload_bassboost_set_enable_flag(&(bass_ctxt->offload_bass), true);
if (bass_ctxt->ctl && bass_ctxt->strength)
offload_bassboost_send_params(bass_ctxt->ctl,
diff --git a/post_proc/effect_api.c b/post_proc/effect_api.c
index 0b77969..b7cf469 100644
--- a/post_proc/effect_api.c
+++ b/post_proc/effect_api.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -391,7 +391,7 @@
{
ALOGV("%s", __func__);
if (preset && (preset <= NUM_OSL_REVERB_PRESETS_SUPPORTED))
- reverb->preset = map_reverb_opensl_preset_2_offload_preset[preset][1];
+ reverb->preset = map_reverb_opensl_preset_2_offload_preset[preset-1][1];
}
void offload_reverb_set_wet_mix(struct reverb_params *reverb, int wet_mix)
diff --git a/post_proc/reverb.c b/post_proc/reverb.c
index 4c7fe25..7c50430 100644
--- a/post_proc/reverb.c
+++ b/post_proc/reverb.c
@@ -309,6 +309,7 @@
return -EINVAL;
*(uint16_t *)value = reverb_ctxt->next_preset;
ALOGV("get REVERB_PARAM_PRESET, preset %d", reverb_ctxt->next_preset);
+ return 0;
}
switch (param) {
case REVERB_PARAM_ROOM_LEVEL:
@@ -464,6 +465,7 @@
return -EINVAL;
}
reverb_set_preset(reverb_ctxt, preset);
+ return 0;
}
switch (param) {
case REVERB_PARAM_PROPERTIES:
@@ -603,6 +605,14 @@
ALOGV("%s", __func__);
reverb_ctxt->ctl = output->ctl;
+ if (offload_reverb_get_enable_flag(&(reverb_ctxt->offload_reverb))) {
+ if (reverb_ctxt->ctl && reverb_ctxt->preset) {
+ offload_reverb_send_params(reverb_ctxt->ctl, reverb_ctxt->offload_reverb,
+ OFFLOAD_SEND_REVERB_ENABLE_FLAG |
+ OFFLOAD_SEND_REVERB_PRESET);
+ }
+ }
+
return 0;
}
diff --git a/post_proc/virtualizer.c b/post_proc/virtualizer.c
index 4190129..54bca07 100644
--- a/post_proc/virtualizer.c
+++ b/post_proc/virtualizer.c
@@ -1,5 +1,5 @@
/*
- * 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,16 +153,27 @@
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;
+ if (virt_ctxt->ctl)
+ offload_virtualizer_send_params(virt_ctxt->ctl,
+ virt_ctxt->offload_virt,
+ OFFLOAD_SEND_VIRTUALIZER_ENABLE_FLAG);
}
} else {
if (!offload_virtualizer_get_enable_flag(&(virt_ctxt->offload_virt)) &&
virt_ctxt->temp_disabled) {
offload_virtualizer_set_enable_flag(&(virt_ctxt->offload_virt), true);
virt_ctxt->temp_disabled = false;
+ if (virt_ctxt->ctl)
+ offload_virtualizer_send_params(virt_ctxt->ctl,
+ virt_ctxt->offload_virt,
+ OFFLOAD_SEND_VIRTUALIZER_ENABLE_FLAG);
}
}
offload_virtualizer_set_device(&(virt_ctxt->offload_virt), device);
@@ -210,7 +221,9 @@
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)) &&
+ !(virt_ctxt->temp_disabled)) {
offload_virtualizer_set_enable_flag(&(virt_ctxt->offload_virt), true);
if (virt_ctxt->ctl && virt_ctxt->strength)
offload_virtualizer_send_params(virt_ctxt->ctl,