From patchwork Thu Jul 31 06:53:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4654191 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4A68EC0338 for ; Thu, 31 Jul 2014 06:54:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8AA732017A for ; Thu, 31 Jul 2014 06:54:44 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 4FC1B201B4 for ; Thu, 31 Jul 2014 06:54:43 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5FF6F26262D; Thu, 31 Jul 2014 08:54:42 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id E0D49265044; Thu, 31 Jul 2014 08:53:44 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 50694261B19; Thu, 31 Jul 2014 08:53:43 +0200 (CEST) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by alsa0.perex.cz (Postfix) with ESMTP id D6045261B25 for ; Thu, 31 Jul 2014 08:53:04 +0200 (CEST) Received: by mail-pa0-f50.google.com with SMTP id et14so3071681pad.9 for ; Wed, 30 Jul 2014 23:53:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:subject:user-agent:to:cc:mime-version :content-type; bh=xu2YQsbV/kLYrTALEVs+jfne52skN35uxOVs6aWXlyQ=; b=q/yYZQtHpiJLRtzXThO3w4gVb1rXUndmTCPDf90sgSFUMhZ5eBZDxYYMjuyhYu8uK+ neuvxWe48yPn6qZ4WkrUrmzCJaDg3in4QKrysSGTWfwEgAJ+OY+F6VrqeA4DZ8K4EyyI 7bkydZNqU9lajPLAyg+u7LAwymFNFOJrAV3Rf1JRsAMHE2lsS/J/RJSV84SexIOsGSFq rbZ6Lz5ShNac3OsJ9CKgXIZk/3iwKxybgSjl1qD/FvLU1RA7uwCQOaTM9QPAGrvydD2H Hd0G0RJzaglfyro/72IJNXdNFVJHByw6q8AEMIMLuhJeEMFomjqhIA67PnNM9T+S78tL lxDg== X-Received: by 10.68.201.167 with SMTP id kb7mr2129630pbc.38.1406789583877; Wed, 30 Jul 2014 23:53:03 -0700 (PDT) Received: from remon.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id pn4sm4415995pbb.7.2014.07.30.23.53.02 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 30 Jul 2014 23:53:03 -0700 (PDT) Date: Wed, 30 Jul 2014 23:53:03 -0700 (PDT) Message-ID: <87bns6uiia.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Mark Brown MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: Linux-ALSA , Simon , Liam Girdwood , Kuninori Morimoto Subject: [alsa-devel] [PATCH] ASoC: rsnd: fixup pcm_new callback method X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" 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 X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto bff58ea4f43d9b4a9fd6fb05fabc8f50f68131f5 (ASoC: rsnd: add DVC support) added DVC support, and it added pcm_new callback feature for it. Then it called all DAI's pcm_new callback, and it was wrong. This patch fixup it and call correct callback. Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/core.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index f07742f..d7c6697 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -944,19 +944,17 @@ static struct snd_pcm_ops rsnd_pcm_ops = { static int rsnd_pcm_new(struct snd_soc_pcm_runtime *rtd) { - struct rsnd_priv *priv = snd_soc_dai_get_drvdata(rtd->cpu_dai); - struct rsnd_dai *rdai; - int i, ret; + struct snd_soc_dai *dai = rtd->cpu_dai; + struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); + int ret; - for_each_rsnd_dai(rdai, priv, i) { - ret = rsnd_dai_call(pcm_new, &rdai->playback, rdai, rtd); - if (ret) - return ret; + ret = rsnd_dai_call(pcm_new, &rdai->playback, rdai, rtd); + if (ret) + return ret; - ret = rsnd_dai_call(pcm_new, &rdai->capture, rdai, rtd); - if (ret) - return ret; - } + ret = rsnd_dai_call(pcm_new, &rdai->capture, rdai, rtd); + if (ret) + return ret; return snd_pcm_lib_preallocate_pages_for_all( rtd->pcm,