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

Message ID 87a9dwapkc.wl%kuninori.morimoto.gx@gmail.com
State Accepted
Commit a2070feede404484296aace813b6c518582a3f8e
Delegated to: Mark Brown
Headers show

Commit Message

Kuninori Morimoto Feb. 12, 2014, 5:05 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

rsnd request clock master if SRC is used

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/sh/rcar/scu.c |    8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Mark Brown Feb. 12, 2014, noon UTC | #1
On Tue, Feb 11, 2014 at 09:05:26PM -0800, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> rsnd request clock master if SRC is used

Applied, thanks.

Patch
diff mbox

diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
index 6e5c763..3984d4b 100644
--- a/sound/soc/sh/rcar/scu.c
+++ b/sound/soc/sh/rcar/scu.c
@@ -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