From: Kuninori Morimoto Subject: [PATCH] ASoC: rsnd: print error if there is SRC settings mismatch Date: Tue, 11 Feb 2014 21:05:26 -0800 (PST) Message-ID: <87a9dwapkc.wl%kuninori.morimoto.gx@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) by alsa0.perex.cz (Postfix) with ESMTP id 853D2261B1A for ; Wed, 12 Feb 2014 06:05:28 +0100 (CET) Received: by mail-pb0-f42.google.com with SMTP id jt11so8806693pbb.1 for ; Tue, 11 Feb 2014 21:05:27 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: Linux-ALSA , Simon , Liam Girdwood , Kuninori Morimoto , Kuninori Morimoto List-Id: alsa-devel@alsa-project.org From: Kuninori Morimoto rsnd request clock master if SRC is used Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/scu.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 1.7.9.5