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

Commit fba2b46d 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 null pointer references and data initialization errors"

parents 67085289 902fc41b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -677,7 +677,9 @@ int audio_extn_sound_trigger_init(struct audio_device *adev)
        st_dev->sthal_prop_api_version = 0;
        status  = 0; /* passthru for backward compability */
    } else {
        if (sthal_prop_api_version != NULL) {
            st_dev->sthal_prop_api_version = *(int*)sthal_prop_api_version;
        }
        if (MAJOR_VERSION(st_dev->sthal_prop_api_version) !=
            MAJOR_VERSION(STHAL_PROP_API_CURRENT_VERSION)) {
            ALOGE("%s: Incompatible API versions ahal:0x%x != sthal:0x%x",
+4 −4
Original line number Diff line number Diff line
@@ -2021,10 +2021,10 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)
    struct stream_out stream_out;
    audio_usecase_t hfp_ucid;
    int status = 0;
    audio_devices_t audio_device;
    audio_channel_mask_t channel_mask;
    int sample_rate;
    int acdb_id;
    audio_devices_t audio_device = AUDIO_DEVICE_NONE;
    audio_channel_mask_t channel_mask = AUDIO_CHANNEL_NONE;
    int sample_rate = 0;
    int acdb_id = 0;

    ALOGD("%s for use case (%s)", __func__, use_case_table[uc_id]);

+2 −1
Original line number Diff line number Diff line
@@ -5113,6 +5113,7 @@ static void platform_spkr_device_set_params(struct platform_data *platform,
            platform->spkr_ch_map->num_ch = num_ch;
            for (i = 0; i < num_ch; i++) {
                opts = strtok_r(NULL, ", ", &test_r);
                if (opts != NULL)
                    platform->spkr_ch_map->chmap[i] = strtoul(opts, NULL, 16);
            }
        }
+4 −4
Original line number Diff line number Diff line
@@ -926,10 +926,10 @@ sourcetrack_error:
    /* Caution: Below ADL log shouldnt be altered without notifying automation APT since it used
     * for automation testing
     */
    if (log_file != NULL) {
        fprintf(log_file, "\n ADL: Done with hal record test \n");
        if (log_file != stdout) {
          fprintf(stdout, "\n ADL: Done with hal record test \n");
        if (log_file) {
          fclose(log_file);
          log_file = NULL;
        }
+2 −0
Original line number Diff line number Diff line
@@ -2331,6 +2331,8 @@ int main(int argc, char* argv[]) {
            fprintf(stderr, " In Device config \n");
            send_device_config = true;

            memset(&device_cfg_params, 0, sizeof(struct qahw_device_cfg_param));

            //Read Sample Rate
            if (optind < argc && *argv[optind] != '-') {
                 device_cfg_params.sample_rate = atoi(optarg);