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

Commit 317cbf17 authored by Garmond Leung's avatar Garmond Leung
Browse files

audio: hal: Fixing compilation errors

Fixed type cast errors.

CRs-Fixed: 2106059

Change-Id: Iee7c2a176d1d928f7d0672fcb2363385ce553de9
parent becba2d5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -517,6 +517,7 @@ enum {
#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 @@ bool audio_extn_passthru_should_standby(struct stream_out *out);
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
+1 −1
Original line number Diff line number Diff line
@@ -413,7 +413,7 @@ bool audio_extn_passthru_is_passt_supported(struct audio_device *adev,

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__);
+2 −2
Original line number Diff line number Diff line
@@ -3769,7 +3769,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer,
                }
            }

            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 @@ exit:
                            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;
        }
    }