From: jeeja.kp@intel.com
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, patches.audio@intel.com, broonie@kernel.org,
liam.r.girdwood@intel.com, Jeeja KP <jeeja.kp@intel.com>
Subject: [PATCH v2 06/13] ASoC: Intel: Skylake: Add set_tristate DAI ops to enable SSP MCLK
Date: Wed, 7 Dec 2016 19:14:28 +0530 [thread overview]
Message-ID: <1481118275-30715-7-git-send-email-jeeja.kp@intel.com> (raw)
In-Reply-To: <1481118275-30715-1-git-send-email-jeeja.kp@intel.com>
From: Jeeja KP <jeeja.kp@intel.com>
Some machine requires MCLK to be enabled before SSP start up, so add
set_tristate() DAI ops to enable/disable SSP MCLK. This ops will be
called from machine which requires early MCLK and removes the usage of
enabling early MLCK in platform DAI prepare by default which is not
machine specific.
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
---
sound/soc/intel/skylake/skl-pcm.c | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index 10fa10d..3c16d41 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -396,6 +396,33 @@ static int skl_be_hw_params(struct snd_pcm_substream *substream,
return skl_tplg_be_update_params(dai, &p_params);
}
+static int skl_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate)
+{
+ struct skl *skl = get_skl_ctx(dai->dev);
+ struct skl_sst *ctx = skl->skl_sst;
+ struct skl_module_cfg *mconfig;
+ int stream;
+
+ if (dai->playback_active)
+ stream = SNDRV_PCM_STREAM_PLAYBACK;
+ else
+ stream = SNDRV_PCM_STREAM_CAPTURE;
+
+ mconfig = skl_tplg_be_get_cpr_module(dai, stream);
+ if (!mconfig)
+ return -EINVAL;
+
+ /*
+ * To enable ssp clk explicitly before gateway copier is configured,
+ * need to use dma control IPC.
+ * Disable will be done when DSP gateway copier modules are deleted.
+ */
+ if (!tristate)
+ return skl_dsp_set_dma_control(ctx, mconfig);
+
+ return 0;
+}
+
static int skl_decoupled_trigger(struct snd_pcm_substream *substream,
int cmd)
{
@@ -646,7 +673,7 @@ static struct snd_soc_dai_ops skl_dmic_dai_ops = {
static struct snd_soc_dai_ops skl_be_ssp_dai_ops = {
.hw_params = skl_be_hw_params,
- .prepare = skl_be_prepare,
+ .set_tristate = skl_soc_dai_set_tristate,
};
static struct snd_soc_dai_ops skl_link_dai_ops = {
--
2.5.0
next prev parent reply other threads:[~2016-12-07 13:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 13:44 [PATCH v2 00/13] ASoC: Intel: Skylake: Driver updates jeeja.kp
2016-12-07 13:44 ` [PATCH v2 01/13] ASoC: Intel: Skylake: Update link_index and format in pipe params jeeja.kp
2016-12-15 12:20 ` Applied "ASoC: Intel: Skylake: Update link_index and format in pipe params" to the asoc tree Mark Brown
2016-12-07 13:44 ` [PATCH v2 02/13] ASoC: Intel: Skylake: Add helper function to setup host/link dma jeeja.kp
2016-12-15 12:20 ` Applied "ASoC: Intel: Skylake: Add helper function to setup host/link dma" to the asoc tree Mark Brown
2016-12-07 13:44 ` [PATCH v2 03/13] ASoC: Intel: Skylake: Configure DMA in PRE_PMD handler of Mixer jeeja.kp
2016-12-07 13:44 ` [PATCH v2 04/13] ASoC: Intel: Skylake: Removed unused skl_get_format() jeeja.kp
2016-12-07 13:44 ` [PATCH v2 05/13] ALSA: hda: check stream decoupled register state jeeja.kp
2016-12-07 13:41 ` Takashi Iwai
2016-12-08 6:31 ` Jeeja KP
2016-12-07 13:44 ` jeeja.kp [this message]
2016-12-07 13:44 ` [PATCH v2 07/13] ASoC: Intel: Skylake: Remove unused SSP BE prepare DAI ops jeeja.kp
2016-12-07 13:44 ` [PATCH v2 08/13] ASoC: Intel: Skylake: Add supply widget as non DSP widget jeeja.kp
2016-12-07 13:44 ` [PATCH v2 09/13] ASoC: Intel: Skylake: Add supply widget in skl_nau_max machine jeeja.kp
2016-12-07 13:44 ` [PATCH v2 10/13] ASoC: Intel: Skylake: Add supply widget in bxt_da_max machine jeeja.kp
2016-12-07 13:44 ` [PATCH v2 11/13] ASoC: Intel: Skylake: Don't reset pass-through pipe in BE prepare jeeja.kp
2016-12-07 13:44 ` [PATCH v2 12/13] ASoC: Intel: Skylake: set the resume point to LPIB jeeja.kp
2016-12-07 13:44 ` [PATCH v2 13/13] ASoC: hdac_hdmi: Enable pin and converter in prepare jeeja.kp
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=1481118275-30715-7-git-send-email-jeeja.kp@intel.com \
--to=jeeja.kp@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@intel.com \
--cc=patches.audio@intel.com \
--cc=tiwai@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).