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 struct audio_usecase *get_usecase_from_id(struct audio_device *adev,
 audio_usecase_t uc_id)
{
 struct audio_usecase *usecase;
 struct listnode *node;

    list_for_each(node, &adev->usecase_list) {
        usecase = node_to_item(node, struct audio_usecase, adev_list_node);
 if (usecase->id == uc_id)
 return usecase;
 }
 return NULL;
}

static struct audio_usecase *get_usecase_from_id(struct audio_device *adev,
 audio_usecase_t uc_id)
{
 struct audio_usecase *usecase;
 struct listnode *node;

    list_for_each(node, &adev->usecase_list) {
        usecase = node_to_item(node, struct audio_usecase, adev_list_node);
 if (usecase->id == uc_id)
 return usecase;
 }
 return NULL;
}
