mirror of https://github.com/thesofproject/sof.git
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:
parent
48910da79d
commit
0b0ef4a445
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue