From: Andrejs Cainikovs <andrejs.cainikovs@gmail.com>
To: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
Subject: [PATCH v1 1/2] ASoC: nau8822: move nau8822_set_dai_sysclk()
Date: Tue, 9 Apr 2024 14:17:18 +0200 [thread overview]
Message-ID: <20240409121719.337709-2-andrejs.cainikovs@gmail.com> (raw)
In-Reply-To: <20240409121719.337709-1-andrejs.cainikovs@gmail.com>
From: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
Next commit in series makes a change which calls nau8822_set_pll() from
nau8822_set_dai_sysclk(). Moving latter after the former would avoid a
forward declaration, and this is exactly what this change does.
Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
---
sound/soc/codecs/nau8822.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/sound/soc/codecs/nau8822.c b/sound/soc/codecs/nau8822.c
index 7199d734c79f..1046801a41ef 100644
--- a/sound/soc/codecs/nau8822.c
+++ b/sound/soc/codecs/nau8822.c
@@ -612,20 +612,6 @@ static const struct snd_soc_dapm_route nau8822_dapm_routes[] = {
{"Right DAC", NULL, "Digital Loopback"},
};
-static int nau8822_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
- unsigned int freq, int dir)
-{
- struct snd_soc_component *component = dai->component;
- struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component);
-
- nau8822->div_id = clk_id;
- nau8822->sysclk = freq;
- dev_dbg(component->dev, "master sysclk %dHz, source %s\n", freq,
- clk_id == NAU8822_CLK_PLL ? "PLL" : "MCLK");
-
- return 0;
-}
-
static int nau8822_calc_pll(unsigned int pll_in, unsigned int fs,
struct nau8822_pll *pll_param)
{
@@ -782,6 +768,20 @@ static int nau8822_set_pll(struct snd_soc_dai *dai, int pll_id, int source,
return 0;
}
+static int nau8822_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
+ unsigned int freq, int dir)
+{
+ struct snd_soc_component *component = dai->component;
+ struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component);
+
+ nau8822->div_id = clk_id;
+ nau8822->sysclk = freq;
+ dev_dbg(component->dev, "master sysclk %dHz, source %s\n", freq,
+ clk_id == NAU8822_CLK_PLL ? "PLL" : "MCLK");
+
+ return 0;
+}
+
static int nau8822_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{
struct snd_soc_component *component = dai->component;
--
2.34.1
next prev parent reply other threads:[~2024-04-09 12:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-09 12:17 [PATCH v1 0/2] ASoC: nau8822: add MCLK support Andrejs Cainikovs
2024-04-09 12:17 ` Andrejs Cainikovs [this message]
2024-04-09 12:17 ` [PATCH v1 2/2] " Andrejs Cainikovs
2024-05-22 13:07 ` Francesco Dolcini
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=20240409121719.337709-2-andrejs.cainikovs@gmail.com \
--to=andrejs.cainikovs@gmail.com \
--cc=andrejs.cainikovs@toradex.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--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