drivers: imx: sai: Use rate from topology

So far we only used topologies with rate set
to 48KHz. This is no longer true now when
we enabled KWD pipelines.

So, use rate from parameters passed from kernel.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This commit is contained in:
Daniel Baluta 2020-11-23 15:51:39 +02:00 committed by Daniel Baluta
parent f5441a1cf7
commit 3c5c7b848d
1 changed files with 3 additions and 1 deletions

View File

@ -361,8 +361,10 @@ static int sai_get_hw_params(struct dai *dai,
struct sof_ipc_stream_params *params,
int dir)
{
struct sai_pdata *sai = dai_get_drvdata(dai);
/* SAI only currently supports these parameters */
params->rate = 48000;
params->rate = sai->params.fsync_rate;
params->channels = 2;
params->buffer_fmt = 0;
params->frame_fmt = SOF_IPC_FRAME_S32_LE;