All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Baluta <daniel.baluta@oss.nxp.com>
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: linux-imx@nxp.com, linux-kernel@vger.kernel.org,
	festevam@gmail.com, shengjiu.wang@nxp.com
Subject: [PATCH 7/7] ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs
Date: Mon, 20 Jul 2020 10:20:46 +0300	[thread overview]
Message-ID: <20200720072046.8152-8-daniel.baluta@oss.nxp.com> (raw)
In-Reply-To: <20200720072046.8152-1-daniel.baluta@oss.nxp.com>

From: Daniel Baluta <daniel.baluta@nxp.com>

Fixup BE DAI links rate/channels parameters to match any values
from topology.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
 sound/soc/sof/pcm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

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);
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: Daniel Baluta <daniel.baluta@oss.nxp.com>
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: shengjiu.wang@nxp.com, festevam@gmail.com, linux-imx@nxp.com,
	linux-kernel@vger.kernel.org
Subject: [PATCH 7/7] ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs
Date: Mon, 20 Jul 2020 10:20:46 +0300	[thread overview]
Message-ID: <20200720072046.8152-8-daniel.baluta@oss.nxp.com> (raw)
In-Reply-To: <20200720072046.8152-1-daniel.baluta@oss.nxp.com>

From: Daniel Baluta <daniel.baluta@nxp.com>

Fixup BE DAI links rate/channels parameters to match any values
from topology.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
 sound/soc/sof/pcm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

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);
-- 
2.17.1


  parent reply	other threads:[~2020-07-20  7:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20  7:20 [PATCH 0/7] SOF IMX fixes Daniel Baluta
2020-07-20  7:20 ` Daniel Baluta
2020-07-20  7:20 ` [PATCH 1/7] ASoC: SOF: define INFO_ flags in dsp_ops for imx8 Daniel Baluta
2020-07-20  7:20   ` Daniel Baluta
2020-07-20  7:20 ` [PATCH 2/7] ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value Daniel Baluta
2020-07-20  7:20   ` Daniel Baluta
2020-07-20  7:20 ` [PATCH 3/7] ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X Daniel Baluta
2020-07-20  7:20   ` Daniel Baluta
2020-07-20  7:20 ` [PATCH 4/7] ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M Daniel Baluta
2020-07-20  7:20   ` Daniel Baluta
2020-07-20  7:20 ` [PATCH 5/7] ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X Daniel Baluta
2020-07-20  7:20   ` Daniel Baluta
2020-07-20  7:20 ` [PATCH 6/7] ASoC: SOF: topology: Update SAI config bclk/fsync rate Daniel Baluta
2020-07-20  7:20   ` Daniel Baluta
2020-07-20  7:20 ` Daniel Baluta [this message]
2020-07-20  7:20   ` [PATCH 7/7] ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs Daniel Baluta
2020-07-22 13:44 ` [PATCH 0/7] SOF IMX fixes Mark Brown
2020-07-22 13:44   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200720072046.8152-8-daniel.baluta@oss.nxp.com \
    --to=daniel.baluta@oss.nxp.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shengjiu.wang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.