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

Commit 7bc4841d 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 7d39dadb ce33cdc9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -626,7 +626,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
@@ -1808,7 +1808,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;
}
@@ -1859,10 +1859,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);

@@ -1875,14 +1880,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
@@ -1631,7 +1631,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;
}
@@ -1682,10 +1682,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);

@@ -1700,14 +1705,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);
        }
    }