From: Troy Mitchell <troy.mitchell@linux.spacemit.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Yixun Lan <dlan@kernel.org>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, spacemit@lists.linux.dev,
jinmei.wei@spacemit.com,
Troy Mitchell <troy.mitchell@linux.spacemit.com>
Subject: [PATCH 3/3] ASoC: spacemit: declare shared BCLK for cross-DAI rate constraint
Date: Thu, 30 Apr 2026 15:46:03 +0800 [thread overview]
Message-ID: <20260430-i2s-same-blk-v1-3-3a1f04eb6159@linux.spacemit.com> (raw)
In-Reply-To: <20260430-i2s-same-blk-v1-0-3a1f04eb6159@linux.spacemit.com>
On SpacemiT K3, multiple I2S controllers share the same physical BCLK
(c_bclk). Declare this clock via snd_soc_dai_set_bclk_clk() so the
ASoC core can automatically constrain hw_params when one controller is
already streaming.
For K1, c_bclk is NULL (obtained via devm_clk_get_optional_enabled),
so this call is a no-op and behavior is unchanged.
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
---
sound/soc/spacemit/k1_i2s.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/spacemit/k1_i2s.c b/sound/soc/spacemit/k1_i2s.c
index 4e655d714623..989e82b3c5b4 100644
--- a/sound/soc/spacemit/k1_i2s.c
+++ b/sound/soc/spacemit/k1_i2s.c
@@ -306,6 +306,8 @@ static int spacemit_i2s_dai_probe(struct snd_soc_dai *dai)
spacemit_i2s_init(i2s);
+ snd_soc_dai_set_bclk_clk(dai, i2s->c_bclk);
+
return 0;
}
--
2.54.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2026-04-30 7:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 7:46 [PATCH 0/3] ASoC: add shared BCLK rate constraint for cross-DAI coordination Troy Mitchell
2026-04-30 7:46 ` [PATCH 1/3] ASoC: soc-dai: add shared BCLK clock for cross-DAI rate constraints Troy Mitchell
2026-04-30 12:01 ` Mark Brown
2026-04-30 7:46 ` [PATCH 2/3] ASoC: soc-pcm: constrain hw_params when DAIs share the same BCLK Troy Mitchell
2026-04-30 12:05 ` Mark Brown
2026-04-30 7:46 ` Troy Mitchell [this message]
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=20260430-i2s-same-blk-v1-3-3a1f04eb6159@linux.spacemit.com \
--to=troy.mitchell@linux.spacemit.com \
--cc=broonie@kernel.org \
--cc=dlan@kernel.org \
--cc=jinmei.wei@spacemit.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=spacemit@lists.linux.dev \
--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