From: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
To: <broonie@kernel.org>, <alsa-devel@alsa-project.org>
Cc: <Alexander.Deucher@amd.com>, <Sunil-kumar.Dommati@amd.com>,
<krisman@collabora.com>, <wtli@nuvoton.com>,
Vijendar Mukunda <Vijendar.Mukunda@amd.com>,
Liam Girdwood <lgirdwood@gmail.com>,
"Jaroslav Kysela" <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
open list <linux-kernel@vger.kernel.org>
Subject: [PATCH 4/9] ASoC: amd: vg: update platform clock control sequence
Date: Wed, 23 Feb 2022 12:49:33 +0530 [thread overview]
Message-ID: <20220223071959.13539-4-Vijendar.Mukunda@amd.com> (raw)
In-Reply-To: <20220223071959.13539-1-Vijendar.Mukunda@amd.com>
Add pre power on widget event.
Based on this event update platform clock control sequence.
This will fix Codec clock and pll restoration issue during
system level resume.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
sound/soc/amd/vangogh/acp5x-mach.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/vangogh/acp5x-mach.c b/sound/soc/amd/vangogh/acp5x-mach.c
index 14cf325e4b23..e610616d796c 100644
--- a/sound/soc/amd/vangogh/acp5x-mach.c
+++ b/sound/soc/amd/vangogh/acp5x-mach.c
@@ -33,6 +33,8 @@
#define DUAL_CHANNEL 2
#define ACP5X_NUVOTON_CODEC_DAI "nau8821-hifi"
#define VG_JUPITER 1
+#define ACP5X_NUVOTON_BCLK 3072000
+#define ACP5X_NAU8821_FREQ_OUT 12288000
static unsigned long acp5x_machine_id;
static struct snd_soc_jack vg_headset;
@@ -274,6 +276,15 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
dev_err(card->dev, "set sysclk err = %d\n", ret);
return -EIO;
}
+ } else {
+ ret = snd_soc_dai_set_sysclk(codec_dai, NAU8821_CLK_FLL_BLK, 0,
+ SND_SOC_CLOCK_IN);
+ if (ret < 0)
+ dev_err(codec_dai->dev, "can't set BLK clock %d\n", ret);
+ ret = snd_soc_dai_set_pll(codec_dai, 0, 0, ACP5X_NUVOTON_BCLK,
+ ACP5X_NAU8821_FREQ_OUT);
+ if (ret < 0)
+ dev_err(codec_dai->dev, "can't set FLL: %d\n", ret);
}
return ret;
}
@@ -289,7 +300,7 @@ static const struct snd_soc_dapm_widget acp5x_8821_widgets[] = {
SND_SOC_DAPM_MIC("Headset Mic", NULL),
SND_SOC_DAPM_MIC("Int Mic", NULL),
SND_SOC_DAPM_SUPPLY("Platform Clock", SND_SOC_NOPM, 0, 0,
- platform_clock_control, SND_SOC_DAPM_POST_PMD),
+ platform_clock_control, SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
};
static const struct snd_soc_dapm_route acp5x_8821_audio_route[] = {
--
2.17.1
next prev parent reply other threads:[~2022-02-23 7:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-23 7:19 [PATCH 1/9] ASoC: amd: vg: fix for pm resume callback sequence Vijendar Mukunda
2022-02-23 7:19 ` [PATCH 2/9] ASoC: amd: vangogh: refactor i2s master mode clock sequence code Vijendar Mukunda
2022-02-23 7:19 ` [PATCH 3/9] ASoC: nau8821: enable no_capture_mute flag Vijendar Mukunda
2022-02-23 7:19 ` Vijendar Mukunda [this message]
2022-02-23 7:19 ` [PATCH 5/9] ASoC: amd: vg: apply sample bits pcm constraint Vijendar Mukunda
2022-02-23 7:19 ` [PATCH 6/9] ASoC: amd: vg: update acp init and deinit sequence Vijendar Mukunda
2022-02-23 7:19 ` [PATCH 7/9] ASoC: amd: vg: update DAI link name Vijendar Mukunda
2022-02-23 7:19 ` [PATCH 8/9] ASoC: amd: vg: remove warnings and erros pointed out by checkpatch pl Vijendar Mukunda
2022-02-23 7:19 ` [PATCH 9/9] ASoC: amd: vangogh: fix uninitialized symbol warning in machine driver Vijendar Mukunda
2022-02-23 12:48 ` [PATCH 1/9] ASoC: amd: vg: fix for pm resume callback sequence kernel test robot
2022-02-23 18:34 ` kernel test robot
2022-02-24 2:41 ` Mukunda,Vijendar
2022-02-24 12:22 ` (subset) " Mark Brown
2022-02-25 18:32 ` Mukunda,Vijendar
2022-02-25 19:03 ` 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=20220223071959.13539-4-Vijendar.Mukunda@amd.com \
--to=vijendar.mukunda@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=krisman@collabora.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=wtli@nuvoton.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
all inboxes | Powered by JetHome®