[PATCH 3/3] ASoC: spacemit: declare shared BCLK for cross-DAI rate constraint
Troy Mitchell
troy.mitchell at linux.spacemit.com
Thu Apr 30 00:46:03 PDT 2026
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 at 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
More information about the linux-riscv
mailing list