From: Nicolin Chen <nicoleotsuka@gmail.com>
To: broonie@kernel.org, b02247@freescale.com
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
alsa-devel@alsa-project.org, timur@tabi.org,
Li.Xiubo@freescale.com, lgirdwood@gmail.com
Subject: [PATCH] ASoC: fsl-asoc-card: Don't bypass settings if cpu-dai is Master
Date: Fri, 24 Oct 2014 16:48:11 -0700 [thread overview]
Message-ID: <1414194502-14052-1-git-send-email-nicoleotsuka@gmail.com> (raw)
In-Reply-To: <cover.1414193668.git.nicoleotsuka@gmail.com>
When cpu-dai is the DAI Master (CBM_CFx), it may need some configurations,
set_sysclk() call for eample, for cpu-dai side in the hw_params(), even if
the set_bias_level() has already taken care of the codec-dai side.
So this patch just simply adds an additional condition.
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
---
sound/soc/fsl/fsl-asoc-card.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index 007c772..14572e6 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -125,7 +125,12 @@ static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream,
priv->sample_rate = params_rate(params);
priv->sample_format = params_format(params);
- if (priv->card.set_bias_level)
+ /*
+ * If codec-dai is DAI Master and all configurations are already in the
+ * set_bias_level(), bypass the remaining settings in hw_params().
+ * Note: (dai_fmt & CBM_CFM) includes CBM_CFM and CBM_CFS.
+ */
+ if (priv->card.set_bias_level && priv->dai_fmt & SND_SOC_DAIFMT_CBM_CFM)
return 0;
/* Specific configurations of DAIs starts from here */
--
1.9.1
next prev parent reply other threads:[~2014-10-24 23:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 23:48 [PATCH 0/2] ASoC: fsl: Use dynamic slot width for ESAI Nicolin Chen
2014-10-24 23:48 ` Nicolin Chen [this message]
2014-10-27 17:30 ` [PATCH] ASoC: fsl-asoc-card: Don't bypass settings if cpu-dai is Master Mark Brown
2014-10-27 17:42 ` Nicolin Chen
2014-10-28 16:05 ` Mark Brown
2014-10-24 23:48 ` [PATCH 1/2] ASoC: fsl_esai: Use dynamic slot width as default Nicolin Chen
2014-10-24 23:48 ` [PATCH 2/2] ASoC: fsl-asoc-card: Add slot_width setting for cpu-dai Nicolin Chen
2014-10-31 18:12 ` [PATCH 0/2] ASoC: fsl: Use dynamic slot width for ESAI Mark Brown
2014-10-31 18:16 ` Nicolin Chen
2014-11-25 12:47 ` 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=1414194502-14052-1-git-send-email-nicoleotsuka@gmail.com \
--to=nicoleotsuka@gmail.com \
--cc=Li.Xiubo@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=b02247@freescale.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=timur@tabi.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®