From: Daniel Baluta Date: Mon, 20 Jul 2020 07:20:46 +0000 (+0300) Subject: ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs X-Git-Tag: Ubuntu-5.10.0-12.13~2061^2~2^2~61^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=51b0243aefaa554ca57817562da8eb269280d4ae;hp=72bb9564fd97cd4f6dec88c8363acc3ab642673f;p=mirror_ubuntu-hirsute-kernel.git ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs Fixup BE DAI links rate/channels parameters to match any values from topology. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200720072046.8152-8-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c index 22fe9d5e932b..5cfd2611b252 100644 --- a/sound/soc/sof/pcm.c +++ b/sound/soc/sof/pcm.c @@ -718,17 +718,25 @@ static int sof_pcm_dai_link_fixup(struct snd_soc_pcm_runtime *rtd, /* do nothing for ALH dai_link */ break; case SOF_DAI_IMX_ESAI: + rate->min = dai->dai_config->esai.fsync_rate; + rate->max = dai->dai_config->esai.fsync_rate; channels->min = dai->dai_config->esai.tdm_slots; channels->max = dai->dai_config->esai.tdm_slots; + dev_dbg(component->dev, + "rate_min: %d rate_max: %d\n", rate->min, rate->max); dev_dbg(component->dev, "channels_min: %d channels_max: %d\n", channels->min, channels->max); break; case SOF_DAI_IMX_SAI: + rate->min = dai->dai_config->sai.fsync_rate; + rate->max = dai->dai_config->sai.fsync_rate; channels->min = dai->dai_config->sai.tdm_slots; channels->max = dai->dai_config->sai.tdm_slots; + dev_dbg(component->dev, + "rate_min: %d rate_max: %d\n", rate->min, rate->max); dev_dbg(component->dev, "channels_min: %d channels_max: %d\n", channels->min, channels->max);