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

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

Merge "hal: Enhance log msgs for 44.1 Native Feature."

parents 36cc9e64 894644da
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -649,7 +649,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
@@ -1773,7 +1773,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;
}
@@ -1824,10 +1824,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);

@@ -1840,14 +1845,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
@@ -1737,7 +1737,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;
}
@@ -1788,10 +1788,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);

@@ -1806,14 +1811,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);
        }
    }