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

Commit 65ad12de authored by vivek mehta's avatar vivek mehta Committed by Eric Laurent
Browse files

hal: set correct default value for fluence type system property

- in case fluence type system property is not present set default
  value as "none"

Bug: 23196835
Change-Id: Ic17fdb91a64471c511e5f497c9a7dd82e01b51b4
parent b6506416
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -891,6 +891,7 @@ void *platform_init(struct audio_device *adev)
    char value[PROPERTY_VALUE_MAX];
    struct platform_data *my_data;
    int retry_num = 0, snd_card_num = 0;
    bool dual_mic_config = false;
    const char *snd_card_name;
    char *cvd_version = NULL;

@@ -955,6 +956,11 @@ void *platform_init(struct audio_device *adev)
    property_get("ro.config.vc_call_vol_steps", value, TOSTRING(MAX_VOL_INDEX));
    my_data->max_vol_index = atoi(value);

    property_get("persist.audio.dualmic.config",value,"");
    if (!strcmp("endfire", value)) {
        dual_mic_config = true;
    }

    my_data->source_mic_type = SOURCE_DUAL_MIC;

    my_data->fluence_in_spkr_mode = false;
@@ -962,10 +968,10 @@ void *platform_init(struct audio_device *adev)
    my_data->fluence_in_voice_comm = false;
    my_data->fluence_in_voice_rec = false;

    property_get("ro.qc.sdk.audio.fluencetype", value, "");
    property_get("ro.qc.sdk.audio.fluencetype", value, "none");
    if (!strcmp("fluencepro", value)) {
        my_data->fluence_type = FLUENCE_PRO_ENABLE;
    } else if (!strcmp("fluence", value)) {
    } else if (!strcmp("fluence", value) || (dual_mic_config)) {
        my_data->fluence_type = FLUENCE_ENABLE;
    } else if (!strcmp("none", value)) {
        my_data->fluence_type = FLUENCE_DISABLE;