From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com>,
Nikita Shubin <nikita.shubin@maquefel.me>,
David Rhodes <david.rhodes@cirrus.com>,
James Schulman <james.schulman@cirrus.com>,
Jaroslav Kysela <perex@perex.cz>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org,
Lucas Tanure <tanureal@opensource.cirrus.com>,
Mark Brown <broonie@kernel.org>,
patches@opensource.cirrus.com,
Richard Fitzgerald <rf@opensource.cirrus.com>,
Takashi Iwai <tiwai@suse.com>
Subject: [PATCH 1/3] ASoC: ep93xx: i2s: move enable call to startup callback
Date: Tue, 11 Apr 2023 00:39:00 +0200 [thread overview]
Message-ID: <20230410223902.2321834-2-alexander.sverdlin@gmail.com> (raw)
In-Reply-To: <20230410223902.2321834-1-alexander.sverdlin@gmail.com>
Make startup/shutdown callbacks symmetric to avoid clock subsystem warnings
(reproduced with "aplay --dump-hw-params" + ctrl-c):
WARNING: CPU: 0 PID: 102 at drivers/clk/clk.c:1048 clk_core_disable
lrclk already disabled
CPU: 0 PID: 102 Comm: aplay Not tainted 6.2.0-rc4 #1
Hardware name: Generic DT based system
...
clk_core_disable from clk_core_disable_lock
clk_core_disable_lock from ep93xx_i2s_shutdown
ep93xx_i2s_shutdown from snd_soc_dai_shutdown
snd_soc_dai_shutdown from soc_pcm_clean
soc_pcm_clean from soc_pcm_close
soc_pcm_close from snd_pcm_release_substream.part.0
snd_pcm_release_substream.part.0 from snd_pcm_release
snd_pcm_release from __fput
__fput from task_work_run
...
WARNING: CPU: 0 PID: 102 at drivers/clk/clk.c:907 clk_core_unprepare
lrclk already unprepared
CPU: 0 PID: 102 Comm: aplay Tainted: G W 6.2.0-rc4 #1
Hardware name: Generic DT based system
...
clk_core_unprepare from clk_unprepare
clk_unprepare from ep93xx_i2s_shutdown
ep93xx_i2s_shutdown from snd_soc_dai_shutdown
snd_soc_dai_shutdown from soc_pcm_clean
soc_pcm_clean from soc_pcm_close
soc_pcm_close from snd_pcm_release_substream.part.0
snd_pcm_release_substream.part.0 from snd_pcm_release
snd_pcm_release from __fput
__fput from task_work_run
...
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
sound/soc/cirrus/ep93xx-i2s.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c
index 200d18060f7c..bbbb1065b2f1 100644
--- a/sound/soc/cirrus/ep93xx-i2s.c
+++ b/sound/soc/cirrus/ep93xx-i2s.c
@@ -209,6 +209,16 @@ static int ep93xx_i2s_dai_probe(struct snd_soc_dai *dai)
return 0;
}
+static int ep93xx_i2s_startup(struct snd_pcm_substream *substream,
+ struct snd_soc_dai *dai)
+{
+ struct ep93xx_i2s_info *info = snd_soc_dai_get_drvdata(dai);
+
+ ep93xx_i2s_enable(info, substream->stream);
+
+ return 0;
+}
+
static void ep93xx_i2s_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
@@ -349,7 +359,6 @@ static int ep93xx_i2s_hw_params(struct snd_pcm_substream *substream,
if (err)
return err;
- ep93xx_i2s_enable(info, substream->stream);
return 0;
}
@@ -398,6 +407,7 @@ static int ep93xx_i2s_resume(struct snd_soc_component *component)
#endif
static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = {
+ .startup = ep93xx_i2s_startup,
.shutdown = ep93xx_i2s_shutdown,
.hw_params = ep93xx_i2s_hw_params,
.set_sysclk = ep93xx_i2s_set_sysclk,
--
2.40.0
next prev parent reply other threads:[~2023-04-10 22:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-10 22:38 [PATCH 0/3] ASoC: ep93xx: Prepare for DT transition Alexander Sverdlin
2023-04-10 22:39 ` Alexander Sverdlin [this message]
2023-04-11 11:39 ` [PATCH 1/3] ASoC: ep93xx: i2s: move enable call to startup callback Mark Brown
2023-04-10 22:39 ` [PATCH 2/3] ASoC: cs4271: flat regcache, trivial simplifications Alexander Sverdlin
2023-04-12 9:09 ` Charles Keepax
2023-04-10 22:39 ` [PATCH 3/3] ASoC: ep93xx: i2s: Make it individually selectable Alexander Sverdlin
2023-04-11 14:19 ` [PATCH 0/3] ASoC: ep93xx: Prepare for DT transition 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=20230410223902.2321834-2-alexander.sverdlin@gmail.com \
--to=alexander.sverdlin@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=david.rhodes@cirrus.com \
--cc=james.schulman@cirrus.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nikita.shubin@maquefel.me \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=rf@opensource.cirrus.com \
--cc=tanureal@opensource.cirrus.com \
--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
all inboxes | Powered by JetHome®