hal: Fix compile issues for android U.
Also extend platform versions.
Change-Id: Ieb42602550dbcd8bff8c67d4568852244beb5985
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 9a6c387..32150db 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -9914,7 +9914,7 @@
}
if (audio_extn_compr_cap_enabled() &&
- audio_extn_compr_cap_format_supported(in->config.format))
+ audio_extn_compr_cap_format_supported(pcm_format_to_audio_format((in->config).format)))
audio_extn_compr_cap_deinit();
if (audio_extn_cin_attached_usecase(in))
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 178d166..5f37c35 100755
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -343,7 +343,7 @@
/* Audio calibration related functions */
void *acdb_handle;
int voice_feature_set;
- acdb_init_t acdb_init;
+ acdb_init_v2_t acdb_init;
acdb_init_v3_t acdb_init_v3;
acdb_init_v4_t acdb_init_v4;
acdb_deallocate_t acdb_deallocate;
@@ -3742,10 +3742,10 @@
ALOGE("%s: dlsym error %s for acdb_loader_init_v3", __func__, dlerror());
}
- my_data->acdb_init = (acdb_init_t)dlsym(my_data->acdb_handle,
- "acdb_loader_init_v3");
+ my_data->acdb_init = (acdb_init_v2_t)dlsym(my_data->acdb_handle,
+ "acdb_loader_init_v2");
if (my_data->acdb_init == NULL) {
- ALOGE("%s: dlsym error %s for acdb_loader_init_v3", __func__, dlerror());
+ ALOGE("%s: dlsym error %s for acdb_loader_init_v2", __func__, dlerror());
goto acdb_init_fail;
}
diff --git a/hal/voice.c b/hal/voice.c
index e2218e6..355dea7 100644
--- a/hal/voice.c
+++ b/hal/voice.c
@@ -502,7 +502,7 @@
switch (in->source) {
case AUDIO_SOURCE_VOICE_UPLINK:
if (audio_extn_compr_cap_enabled() &&
- audio_extn_compr_cap_format_supported(in->config.format)) {
+ audio_extn_compr_cap_format_supported(pcm_format_to_audio_format(in->config.format))) {
in->usecase = USECASE_INCALL_REC_UPLINK_COMPRESS;
} else
in->usecase = USECASE_INCALL_REC_UPLINK;
@@ -510,7 +510,7 @@
break;
case AUDIO_SOURCE_VOICE_DOWNLINK:
if (audio_extn_compr_cap_enabled() &&
- audio_extn_compr_cap_format_supported(in->config.format)) {
+ audio_extn_compr_cap_format_supported(pcm_format_to_audio_format(in->config.format))) {
in->usecase = USECASE_INCALL_REC_DOWNLINK_COMPRESS;
} else
in->usecase = USECASE_INCALL_REC_DOWNLINK;
@@ -518,7 +518,7 @@
break;
case AUDIO_SOURCE_VOICE_CALL:
if (audio_extn_compr_cap_enabled() &&
- audio_extn_compr_cap_format_supported(in->config.format)) {
+ audio_extn_compr_cap_format_supported(pcm_format_to_audio_format(in->config.format))) {
in->usecase = USECASE_INCALL_REC_UPLINK_AND_DOWNLINK_COMPRESS;
} else
in->usecase = USECASE_INCALL_REC_UPLINK_AND_DOWNLINK;