hal: Enhance log msgs for 44.1 Native Feature.
- add log msgs at important places.
Change-Id: I5689b27552c8bf603b25ae37673b6918030adc34
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 8ce8595..2c18128 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -626,7 +626,7 @@
(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);
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index e6503dd..6f565b2 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -1811,7 +1811,7 @@
{
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;
}
@@ -1862,10 +1862,15 @@
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);
@@ -1878,14 +1883,15 @@
(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);
}
}
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 5b339a7..0a5edab 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -1634,7 +1634,7 @@
{
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;
}
@@ -1685,10 +1685,15 @@
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);
@@ -1703,14 +1708,15 @@
(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);
}
}