dai-zephyr: Use params channels

Use the params channels directly instead of using the local_buffer to
get the channel count. This is in preparation for optimizing the
multiple endpoint DAIs where the local_buffer will not be used.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
Ranjani Sridharan 2023-05-13 17:33:44 -07:00 committed by Ranjani Sridharan
parent 48910da79d
commit 0b0ef4a445
1 changed files with 1 additions and 6 deletions

View File

@ -873,13 +873,8 @@ int dai_zephyr_params(struct dai_data *dd, struct comp_dev *dev,
return -EINVAL;
}
buffer_c = buffer_acquire(dd->local_buffer);
/* calculate frame size */
frame_size = get_frame_bytes(dev->ipc_config.frame_fmt,
audio_stream_get_channels(&buffer_c->stream));
buffer_release(buffer_c);
frame_size = get_frame_bytes(dev->ipc_config.frame_fmt, params->channels);
/* calculate period size */
period_bytes = dev->frames * frame_size;