audio: hal: Fixing compilation errors
Fixed type cast errors.
CRs-Fixed: 2106059
Change-Id: Iee7c2a176d1d928f7d0672fcb2363385ce553de9
diff --git a/hal/audio_extn/audio_extn.h b/hal/audio_extn/audio_extn.h
index 1b3c5bb..2726d40 100644
--- a/hal/audio_extn/audio_extn.h
+++ b/hal/audio_extn/audio_extn.h
@@ -517,6 +517,7 @@
#define audio_extn_passthru_should_standby(o) (1)
#define audio_extn_passthru_get_channel_count(out) (0)
#define audio_extn_passthru_update_dts_stream_configuration(out, buffer, bytes) (-ENOSYS)
+#define audio_extn_passthru_is_direct_passthrough(out) (0)
#else
bool audio_extn_passthru_is_convert_supported(struct audio_device *adev,
struct stream_out *out);
@@ -543,6 +544,7 @@
int audio_extn_passthru_get_channel_count(struct stream_out *out);
int audio_extn_passthru_update_dts_stream_configuration(struct stream_out *out,
const void *buffer, size_t bytes);
+bool audio_extn_passthru_is_direct_passthrough(struct stream_out *out);
#endif
#ifndef HFP_ENABLED
diff --git a/hal/audio_extn/passthru.c b/hal/audio_extn/passthru.c
index e106ef9..701084a 100644
--- a/hal/audio_extn/passthru.c
+++ b/hal/audio_extn/passthru.c
@@ -413,7 +413,7 @@
void audio_extn_passthru_update_stream_configuration(
struct audio_device *adev, struct stream_out *out,
- const void *buffer, size_t bytes)
+ const void *buffer __unused, size_t bytes __unused)
{
if (audio_extn_passthru_is_passt_supported(adev, out)) {
ALOGV("%s:PASSTHROUGH", __func__);
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 7154141..12bc76b 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -3769,7 +3769,7 @@
}
}
- if ((channels < audio_channel_count_from_out_mask(out->channel_mask)) &&
+ if ((channels < (int)audio_channel_count_from_out_mask(out->channel_mask)) &&
(out->compr_config.codec->compr_passthr == PASSTHROUGH) &&
(out->is_iec61937_info_available == true)) {
ALOGE("%s: ERROR: Unsupported channel config in passthrough mode", __func__);
@@ -3983,7 +3983,7 @@
out_get_sample_rate(&out->stream.common));
if (audio_extn_passthru_is_passthrough_stream(out)) {
- ALOGE("%s: write error, ret = %d", __func__, ret);
+ ALOGE("%s: write error, ret = %ld", __func__, ret);
return ret;
}
}