From 0b0ef4a445ed5bddfa9ea7a4ff3cb3986cced1a9 Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Sat, 13 May 2023 17:33:44 -0700 Subject: [PATCH] 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 --- src/audio/dai-zephyr.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/audio/dai-zephyr.c b/src/audio/dai-zephyr.c index 962fa3115..864ec8a75 100644 --- a/src/audio/dai-zephyr.c +++ b/src/audio/dai-zephyr.c @@ -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;