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

Commit 438932f5 authored by Garmond Leung's avatar Garmond Leung
Browse files

hal: Correct compilation errors in hal

Correct compilation errors due to merge of new changes

Change-Id: I83cea7c5d672d24b81bbb767eafc3e1564be561a
parent 003ee757
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -535,7 +535,7 @@ bool audio_extn_passthru_is_supported_backend_edid_cfg(struct audio_device *adev
          platform_get_snd_device_name(out_snd_device));

    /* Check if the channels are supported */
    if (max_edid_channels < backend_cfg.channels) {
    if (max_edid_channels < (int)backend_cfg.channels) {

        ALOGE("%s: ERROR: Unsupported channels in passthru mode!!!"
              " max_edid_channels - %d backend_channels - %d",
+2 −13
Original line number Diff line number Diff line
@@ -2060,12 +2060,9 @@ int start_input_stream(struct stream_in *in)
    int ret = 0;
    struct audio_usecase *uc_info;
    struct audio_device *adev = in->dev;
    int snd_card_status;
    struct pcm_config config = in->config;
    int usecase;
    int usecase = platform_update_usecase_from_source(in->source,in->usecase);

    snd_card_status = get_snd_card_state(adev);
    usecase = platform_update_usecase_from_source(in->source,in->usecase);
    if (get_usecase_from_list(adev, usecase) == NULL)
        in->usecase = usecase;
    ALOGD("%s: enter: stream(%p)usecase(%d: %s)",
@@ -2166,7 +2163,7 @@ int start_input_stream(struct stream_in *in)

        while (1) {
            in->pcm = pcm_open(adev->snd_card, in->pcm_device_id,
                               flags, &in->config);
                               flags, &config);
            if (in->pcm == NULL || !pcm_is_ready(in->pcm)) {
                ALOGE("%s: %s", __func__, pcm_get_error(in->pcm));
                if (in->pcm != NULL) {
@@ -3773,13 +3770,6 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer,
        goto exit;
    }

    if (out->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL) {
        channels = platform_edid_get_max_channels(out->dev->platform);
        if (audio_extn_passthru_is_enabled() &&
            !out->is_iec61937_info_available &&
            audio_extn_passthru_is_passthrough_stream(out)) {
            audio_extn_passthru_update_stream_configuration(adev, out,
                    buffer, bytes);
    if ((out->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL) &&
         !out->is_iec61937_info_available) {

@@ -3825,7 +3815,6 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer,
            }
        }
    }
    }

    if ((out->devices & AUDIO_DEVICE_OUT_ALL_A2DP) &&
        (audio_extn_a2dp_is_suspended())) {
+0 −8
Original line number Diff line number Diff line
@@ -444,12 +444,4 @@ struct audio_device_to_audio_interface {
    char interface_name[100];
};

struct audio_backend_cfg {
    unsigned int   sample_rate;
    unsigned int   channels;
    unsigned int   bit_width;
    bool           passthrough_enabled;
    audio_format_t format;
};

#endif // QCOM_AUDIO_PLATFORM_H
+0 −8
Original line number Diff line number Diff line
@@ -562,12 +562,4 @@ struct audio_device_to_audio_interface {
    char interface_name[100];
};

struct audio_backend_cfg {
    unsigned int   sample_rate;
    unsigned int   channels;
    unsigned int   bit_width;
    bool           passthrough_enabled;
    audio_format_t format;
};

#endif // QCOM_AUDIO_PLATFORM_H
+11 −0
Original line number Diff line number Diff line
@@ -37,6 +37,14 @@ typedef enum {
    ACDB_EXTN,
} caller_t;

struct audio_backend_cfg {
    unsigned int   sample_rate;
    unsigned int   channels;
    unsigned int   bit_width;
    bool           passthrough_enabled;
    audio_format_t format;
};

struct amp_db_and_gain_table {
    float amp;
    float db;
@@ -153,6 +161,9 @@ void platform_snd_card_update(void *platform, card_status_t scard_status);

struct audio_offload_info_t;
uint32_t platform_get_compress_offload_buffer_size(audio_offload_info_t* info);
int platform_get_codec_backend_cfg(struct audio_device* adev,
                                   snd_device_t snd_device,
                                   struct audio_backend_cfg *backend_cfg);

bool platform_check_and_set_codec_backend_cfg(struct audio_device* adev,
                   struct audio_usecase *usecase, snd_device_t snd_device);