Fix audio record pre-processing

proc_buf_out consistently initialized.
intermediate scratch buffers consistently initialized.
prevent read failure from overwriting memory.

Test: POC, CTS, camera record
Bug: 62873231
Change-Id: Ie26e12a419a5819c1c5c3a0bcf1876d6d7aca686
(cherry picked from commit 6d7b330c27efba944817e647955da48e54fd74eb)

static int disable_output_path_l(struct stream_out *out)
{
 struct audio_device *adev = out->dev;
 struct audio_usecase *uc_info;

    uc_info = get_usecase_from_id(adev, out->usecase);
 if (uc_info == NULL) {
        ALOGE("%s: Could not find the usecase (%d) in the list",
             __func__, out->usecase);
 return -EINVAL;
 }
    disable_snd_device(adev, uc_info, uc_info->out_snd_device, true);
    uc_release_pcm_devices(uc_info);
    list_remove(&uc_info->adev_list_node);
    free(uc_info);

 return 0;
}

static int disable_output_path_l(struct stream_out *out)
{
 struct audio_device *adev = out->dev;
 struct audio_usecase *uc_info;

    uc_info = get_usecase_from_id(adev, out->usecase);
 if (uc_info == NULL) {
        ALOGE("%s: Could not find the usecase (%d) in the list",
             __func__, out->usecase);
 return -EINVAL;
 }
    disable_snd_device(adev, uc_info, uc_info->out_snd_device, true);
    uc_release_pcm_devices(uc_info);
    list_remove(&uc_info->adev_list_node);
    free(uc_info);

 return 0;
}
