Skip to contentSkip to conversation

ASoC: rsnd: print error if there is SRC settings mismatch

PATCH Applied Kuninori Morimoto 2 participants 2 messages Feb 12, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rsnd: print error if there is SRC settings mismatch

From: Kuninori Morimoto <[email protected]>

rsnd request clock master if SRC is used

---
 sound/soc/sh/rcar/scu.c |    8 ++++++++
 1 file changed, 8 insertions(+)
sound/soc/sh/rcar/scu.c +8 -0
index 6e5c763..3984d4b 100644
@@ -122,6 +122,14 @@ static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
 	struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
 	struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
 	int id = rsnd_mod_id(mod);
+	u32 convert_rate = rsnd_scu_convert_rate(scu);
+
+	if (convert_rate && !rsnd_dai_is_clk_master(rdai)) {
+		struct device *dev = rsnd_priv_to_dev(priv);
+
+		dev_err(dev, "rsnd should be clk master when you rate convert\n");
+		return -EINVAL;
+	}
 
 	/*
 	 * SSI_MODE0
Signature · 1 line
1.7.9.5
maintainer Applied
#1 lore raw
Quoted 3 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

rsnd request clock master if SRC is used

Applied, thanks.