devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olivier Moysan <olivier.moysan@st.com>
To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
	tiwai@suse.com, mcoquelin.stm32@gmail.com,
	alexandre.torgue@st.com, alsa-devel@alsa-project.org,
	robh@kernel.org, mark.rutland@arm.com,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-kernel@vger.kernel.org, olivier.moysan@st.com,
	arnaud.pouliquen@st.com, benjamin.gaignard@st.com
Subject: [PATCH 4/4] ASoC: cs42l51: add mclk support
Date: Mon, 15 Oct 2018 16:03:36 +0200	[thread overview]
Message-ID: <1539612216-12602-5-git-send-email-olivier.moysan@st.com> (raw)
In-Reply-To: <1539612216-12602-1-git-send-email-olivier.moysan@st.com>

Add MCLK dapm to allow configuration of cirrus CS42l51
codec as a master clock consumer.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
---
 sound/soc/codecs/cs42l51.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 5080d7a3c279..eb40bff54cec 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -237,6 +237,10 @@ static const struct snd_soc_dapm_widget cs42l51_dapm_widgets[] = {
 		&cs42l51_adcr_mux_controls),
 };
 
+static const struct snd_soc_dapm_widget cs42l51_dapm_mclk_widgets[] = {
+	SND_SOC_DAPM_CLOCK_SUPPLY("MCLK")
+};
+
 static const struct snd_soc_dapm_route cs42l51_routes[] = {
 	{"HPL", NULL, "Left DAC"},
 	{"HPR", NULL, "Right DAC"},
@@ -487,6 +491,10 @@ static struct snd_soc_dai_driver cs42l51_dai = {
 static int cs42l51_component_probe(struct snd_soc_component *component)
 {
 	int ret, reg;
+	struct snd_soc_dapm_context *dapm;
+
+	dapm = snd_soc_component_get_dapm(component);
+	snd_soc_dapm_new_controls(dapm, cs42l51_dapm_mclk_widgets, 1);
 
 	/*
 	 * DAC configuration
-- 
2.7.4

  parent reply	other threads:[~2018-10-15 14:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-15 14:03 [PATCH 0/4] ASoC: stm32: sai: add mclk clock provider Olivier Moysan
2018-10-15 14:03 ` [PATCH 1/4] ASoC: dt-bindings: add mclk provider support to stm32 sai Olivier Moysan
2018-10-19 12:26   ` Applied "ASoC: dt-bindings: add mclk provider support to stm32 sai" to the asoc tree Mark Brown
2018-10-19 12:34   ` Mark Brown
2018-10-15 14:03 ` [PATCH 2/4] ASoC: dt-bindings: add mclk support to cs42l51 Olivier Moysan
2018-10-19 12:26   ` Applied "ASoC: dt-bindings: add mclk support to cs42l51" to the asoc tree Mark Brown
2018-10-19 12:34   ` Mark Brown
2018-10-15 14:03 ` [PATCH 3/4] ASoC: stm32: sai: set sai as mclk clock provider Olivier Moysan
2018-10-19 12:26   ` Applied "ASoC: stm32: sai: set sai as mclk clock provider" to the asoc tree Mark Brown
2018-10-19 12:33   ` Mark Brown
2018-10-15 14:03 ` Olivier Moysan [this message]
2018-10-19 12:26   ` Applied "ASoC: cs42l51: add mclk support" " Mark Brown
2018-10-19 12:33   ` 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=1539612216-12602-5-git-send-email-olivier.moysan@st.com \
    --to=olivier.moysan@st.com \
    --cc=alexandre.torgue@st.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnaud.pouliquen@st.com \
    --cc=benjamin.gaignard@st.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mark.rutland@arm.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=perex@perex.cz \
    --cc=robh@kernel.org \
    --cc=tiwai@suse.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 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).