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

Commit 24975285 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: fix klockwork failures in audio hal"

parents e16571de 7b762e7c
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -1966,7 +1966,7 @@ static char* out_get_parameters(const struct audio_stream *stream, const char *k
    } else {
        voice_extn_out_get_parameters(out, query, reply);
        str = str_parms_to_str(reply);
        if (!strncmp(str, "", sizeof(""))) {
        if (str && !strncmp(str, "", sizeof(""))) {
            free(str);
            str = strdup(keys);
        }
@@ -3066,14 +3066,13 @@ static void adev_close_output_stream(struct audio_hw_device *dev __unused,

static void close_compress_sessions(struct audio_device *adev)
{
    struct stream_out *out = NULL;
    struct listnode *node = NULL;
    struct listnode *tmp = NULL;
    struct audio_usecase *usecase = NULL;
    struct stream_out *out;
    struct listnode *node;
    struct audio_usecase *usecase;
    pthread_mutex_lock(&adev->lock);
    list_for_each_safe(node, tmp, &adev->usecase_list) {
    list_for_each(node, &adev->usecase_list) {
        usecase = node_to_item(node, struct audio_usecase, list);
        if (is_offload_usecase(usecase->id)) {
        if (usecase && is_offload_usecase(usecase->id)) {
            if (usecase && usecase->stream.out) {
                ALOGI(" %s closing compress session %d on OFFLINE state", __func__, usecase->id);
                out = usecase->stream.out;

hal/msm8974/platform.c

100755 → 100644
+8 −1
Original line number Diff line number Diff line
@@ -2490,6 +2490,12 @@ int platform_set_parameters(void *platform, struct str_parms *parms)
    int ret = 0, err;
    char *kv_pairs = str_parms_to_str(parms);

    if(kv_pairs == NULL) {
        ret = -ENOMEM;
        ALOGE("[%s] key-value pair is NULL",__func__);
        goto done;
    }

    ALOGV_IF(kv_pairs != NULL, "%s: enter: %s", __func__, kv_pairs);

    len = strlen(kv_pairs);
@@ -2569,6 +2575,7 @@ int platform_set_parameters(void *platform, struct str_parms *parms)

done:
    ALOGV("%s: exit with code(%d)", __func__, ret);
    if(kv_pairs != NULL)
        free(kv_pairs);
    if(value != NULL)
        free(value);