From patchwork Mon Jun 23 00:57:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4397161 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1F86D9F26E for ; Mon, 23 Jun 2014 00:59:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4DE012026C for ; Mon, 23 Jun 2014 00:59:30 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 15C93201F7 for ; Mon, 23 Jun 2014 00:59:29 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 27FBC2654E1; Mon, 23 Jun 2014 02:59:28 +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_SIGNED, 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 6ABD22654EB; Mon, 23 Jun 2014 02:58:08 +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 51F562654F3; Mon, 23 Jun 2014 02:58:07 +0200 (CEST) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by alsa0.perex.cz (Postfix) with ESMTP id A730C2654EE for ; Mon, 23 Jun 2014 02:57:05 +0200 (CEST) Received: by mail-pa0-f44.google.com with SMTP id rd3so5172834pab.31 for ; Sun, 22 Jun 2014 17:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:sender:message-id:from:subject:user-agent:to:cc:in-reply-to :references:mime-version:content-type; bh=2qmqaOayyzXGRwBcN3oviobF/qmE3WwqSAbc6KuWSzE=; b=rH0JBEgwudcppL5Zb8IaEuKi3es+YTU5YwwQlrM4GhblyV3KR5Tq5wjQ1XYsEHQPL6 uOhY62Sto5saaXFE5UWkgR3K4wFW+C0XXaH5xikLpQ0s3M1l2jRuiE9QE/MhY7h87BCQ 1/T3ygWq7TMWIFWTnPsSEyr1enKGu3dtL/gmtFbwn8pq6cLQewdSXrP291ODaptD4fh3 2zHNtoB7ohUwUcE+9u9R1unnm2PojRXwkZ0ulCtyZMfRV6QQiJV3tsV9mACRq0RRZgNl CwAMRa05dlWF6Qe126F6/YGz/JnP9Omm7A/Ka4/2tgNWYoYOqtrcPvhbAVMhaMww5EOd 5RxA== X-Received: by 10.66.163.38 with SMTP id yf6mr24793759pab.46.1403485024798; Sun, 22 Jun 2014 17:57:04 -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 qv9sm23896777pbc.71.2014.06.22.17.57.02 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 22 Jun 2014 17:57:04 -0700 (PDT) Date: Sun, 22 Jun 2014 17:57:04 -0700 (PDT) Message-ID: <87wqc8sasb.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Mark Brown In-Reply-To: <8761jstphc.wl%kuninori.morimoto.gx@gmail.com> References: <87d2e6zjhf.wl%kuninori.morimoto.gx@gmail.com> <8761jstphc.wl%kuninori.morimoto.gx@gmail.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: linux-sh@vger.kernel.org, Linux-ALSA , Simon , Kuninori Morimoto , Liam Girdwood Subject: [alsa-devel] [PATCH 06/10 v2] ASoC: rsnd: enable DVC when capture 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 Current DVC can be enabled only when playback, but, this came from misunderstanding. It is not correct. DVC <-> DMA relationship is... Playback: MEM -> DMAC -> SRC -> DVC -> DMACp -> SSI Capture: SSI -> DMACp -> SRC -> DVC -> DMAC -> MEM DVC can be used for both Playback/Capture Signed-off-by: Kuninori Morimoto --- v1 -> v2 - no change sound/soc/sh/rcar/dvc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c index ed00070..deef310 100644 --- a/sound/soc/sh/rcar/dvc.c +++ b/sound/soc/sh/rcar/dvc.c @@ -191,24 +191,20 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod, struct snd_soc_pcm_runtime *rtd) { struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); - struct rsnd_priv *priv = rsnd_mod_to_priv(mod); - struct device *dev = rsnd_priv_to_dev(priv); struct snd_card *card = rtd->card->snd_card; struct snd_kcontrol *kctrl; static struct snd_kcontrol_new knew = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Playback Volume", .info = rsnd_dvc_volume_info, .get = rsnd_dvc_volume_get, .put = rsnd_dvc_volume_put, }; int ret; - if (!rsnd_dai_is_play(rdai, io)) { - dev_err(dev, "DVC%d is connected to Capture DAI\n", - rsnd_mod_id(mod)); - return -EINVAL; - } + if (rsnd_dai_is_play(rdai, io)) + knew.name = "Playback Volume"; + else + knew.name = "Capture Volume"; kctrl = snd_ctl_new1(&knew, mod); if (!kctrl)