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

Commit 894644da authored by Sidipotu Ashok's avatar Sidipotu Ashok Committed by Gerrit - the friendly Code Review server
Browse files

hal: Enhance log msgs for 44.1 Native Feature.

- add log msgs at important places.

Change-Id: I5689b27552c8bf603b25ae37673b6918030adc34
parent 4dcf1f45
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -646,7 +646,7 @@ static void check_usecases_codec_backend(struct audio_device *adev,
                (usecase->out_snd_device != snd_device || force_routing)  &&
                usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND &&
                usecase_backend_idx == backend_idx) {
            ALOGV("%s: Usecase (%s) is active on (%s) - disabling ..", __func__,
            ALOGD("%s: Usecase (%s) is active on (%s) - disabling ..", __func__,
                  use_case_table[usecase->id],
                  platform_get_snd_device_name(usecase->out_snd_device));
            disable_audio_route(adev, usecase);
+13 −7
Original line number Diff line number Diff line
@@ -1717,7 +1717,7 @@ int platform_set_native_support(bool codec_support)
{
    na_props.platform_na_prop_enabled = na_props.ui_na_prop_enabled
        = codec_support;
    ALOGV("%s: na_props.platform_na_prop_enabled: %d", __func__,
    ALOGD("%s: na_props.platform_na_prop_enabled: %d", __func__,
           na_props.platform_na_prop_enabled);
    return 0;
}
@@ -1768,10 +1768,15 @@ int native_audio_set_params(struct platform_data *platform,
                             value, len);
    if (ret >= 0) {
        if (na_props.platform_na_prop_enabled) {
            if (!strncmp("true", value, sizeof("true")))
            if (!strncmp("true", value, sizeof("true"))) {
                na_props.ui_na_prop_enabled = true;
            else
                ALOGD("%s: native audio feature enabled from UI",__func__);
            }
            else {
                na_props.ui_na_prop_enabled = false;
                ALOGD("%s: native audio feature disabled from UI",__func__);

            }

            str_parms_del(parms, AUDIO_PARAMETER_KEY_NATIVE_AUDIO);

@@ -1784,14 +1789,15 @@ int native_audio_set_params(struct platform_data *platform,
                    (usecase->stream.out->devices & AUDIO_DEVICE_OUT_WIRED_HEADPHONE ||
                    usecase->stream.out->devices & AUDIO_DEVICE_OUT_WIRED_HEADSET) &&
                    OUTPUT_SAMPLING_RATE_44100 == usecase->stream.out->sample_rate) {
                         select_devices(platform->adev, usecase->id);
                         ALOGV("%s: triggering dynamic device switch for usecase: "
                               "%d, device: %d", __func__, usecase->id,
                         ALOGD("%s: triggering dynamic device switch for usecase(%d: %s)"
                               " stream(%p), device(%d)", __func__, usecase->id,
                               use_case_table[usecase->id], usecase->stream,
                               usecase->stream.out->devices);
                         select_devices(platform->adev, usecase->id);
                 }
            }
        } else {
              ALOGV("%s: native audio not supported: %d", __func__,
              ALOGD("%s: native audio not supported: %d", __func__,
                     na_props.platform_na_prop_enabled);
        }
    }
+13 −7
Original line number Diff line number Diff line
@@ -1665,7 +1665,7 @@ int platform_set_native_support(bool codec_support)
    int ret = 0;
    na_props.platform_na_prop_enabled = na_props.ui_na_prop_enabled
        = codec_support;
    ALOGV("%s: na_props.platform_na_prop_enabled: %d", __func__,
    ALOGD("%s: na_props.platform_na_prop_enabled: %d", __func__,
           na_props.platform_na_prop_enabled);
    return ret;
}
@@ -1716,10 +1716,15 @@ int native_audio_set_params(struct platform_data *platform,
                             value, len);
    if (ret >= 0) {
        if (na_props.platform_na_prop_enabled) {
            if (!strncmp("true", value, sizeof("true")))
            if (!strncmp("true", value, sizeof("true"))) {
                na_props.ui_na_prop_enabled = true;
            else
                ALOGD("%s: native audio feature enabled from UI",__func__);
            }
            else {
                na_props.ui_na_prop_enabled = false;
                ALOGD("%s: native audio feature disabled from UI",__func__);

            }

            str_parms_del(parms, AUDIO_PARAMETER_KEY_NATIVE_AUDIO);

@@ -1734,14 +1739,15 @@ int native_audio_set_params(struct platform_data *platform,
                    (usecase->stream.out->devices & AUDIO_DEVICE_OUT_WIRED_HEADPHONE ||
                    usecase->stream.out->devices & AUDIO_DEVICE_OUT_WIRED_HEADSET) &&
                    OUTPUT_SAMPLING_RATE_44100 == usecase->stream.out->sample_rate) {
                         select_devices(platform->adev, usecase->id);
                         ALOGV("%s: triggering dynamic device switch for usecase: "
                               "%d, device: %d", __func__, usecase->id,
                         ALOGD("%s: triggering dynamic device switch for usecase(%d: %s)"
                               " stream(%p), device(%d)", __func__, usecase->id,
                               use_case_table[usecase->id], usecase->stream,
                               usecase->stream.out->devices);
                         select_devices(platform->adev, usecase->id);
                 }
            }
        } else {
              ALOGV("%s: native audio not supported: %d", __func__,
              ALOGD("%s: native audio not supported: %d", __func__,
                     na_props.platform_na_prop_enabled);
        }
    }