From patchwork Wed Nov 5 04:28:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5232301 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 02414C11AC for ; Wed, 5 Nov 2014 04:31:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2993620173 for ; Wed, 5 Nov 2014 04:31:19 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id AECD320125 for ; Wed, 5 Nov 2014 04:31:16 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id D0904261B31; Wed, 5 Nov 2014 05:31:15 +0100 (CET) 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, RCVD_IN_DNSWL_NONE, 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 28941261A1D; Wed, 5 Nov 2014 05:29:27 +0100 (CET) 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 07ABB261A2F; Wed, 5 Nov 2014 05:29:22 +0100 (CET) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by alsa0.perex.cz (Postfix) with ESMTP id BCD34261A53 for ; Wed, 5 Nov 2014 05:28:11 +0100 (CET) Received: by mail-pa0-f41.google.com with SMTP id rd3so15953276pab.28 for ; Tue, 04 Nov 2014 20:28:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:subject:user-agent:mime-version:to:cc :in-reply-to:references:content-type; bh=f3m/QLZWVXhWXrkhuwziU+UJ864j05X1+nle3d+kzT4=; b=YZxbPi5Av/vqJ7D2WW1aoIQXDGlPLDFyw6MElJBSvPStx8N0vrzA1e0+CCvgneQOkh 7BhB8MtY3FKgTtrD5ZGDlMipgBkeQ59HzoxljrKJ+tM+Ue7cBW1V3chrWk5B/IZaKhz+ PBIJ21PO80L/BAPoflMzJCLBbDNuXWDYlm2IMslvuyG+ibeC0ByQHWsyqnDU4BDCMGzl FGq0owZ1Dpmm2zdH7N9EkdCyooa3on6aTd7m5bdqAiAZ8O8ctD9c4o1HxGsm/QgoyPsZ IR6RkCjUrb/BBOPdMhqlv1X5pF7qScEMsod53rzsX/iXgGe5y1tsXfcCRMwCb+ujtgOx 6k2A== X-Received: by 10.68.211.73 with SMTP id na9mr14860986pbc.132.1415161690673; Tue, 04 Nov 2014 20:28:10 -0800 (PST) Received: from remon.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id td4sm1795832pbc.36.2014.11.04.20.28.08 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 04 Nov 2014 20:28:10 -0800 (PST) Date: Tue, 04 Nov 2014 20:28:10 -0800 (PST) Message-ID: <878ujq46fv.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") To: Mark Brown In-Reply-To: <87egti46j7.wl%kuninori.morimoto.gx@gmail.com> References: <87egtp2g05.wl%kuninori.morimoto.gx@gmail.com> <87egti46j7.wl%kuninori.morimoto.gx@gmail.com> Cc: Linux-ALSA , Simon , Liam Girdwood , Kuninori Morimoto Subject: [alsa-devel] [PATCH 4/6 v3] ASoC: rsnd: enable single DVC valume settings 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 DVC controls some digital volume features. Some of them requests values for "each channels", but, some of them requests values for "feature". And, Volume Ramp has "feature" settings. This patch adds rsnd_dvc_cfg_s and care about single settings. Compiler will report like below at this point, but, it will be removed if Volume Ramp was supported. warning: '_rsnd_dvc_pcm_new_s' defined but not used Signed-off-by: Kuninori Morimoto --- v2 -> v3 - no change sound/soc/sh/rcar/dvc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c index c729e26..e7cfc71 100644 --- a/sound/soc/sh/rcar/dvc.c +++ b/sound/soc/sh/rcar/dvc.c @@ -26,6 +26,11 @@ struct rsnd_dvc_cfg_m { u32 val[RSND_DVC_CHANNELS]; }; +struct rsnd_dvc_cfg_s { + struct rsnd_dvc_cfg cfg; + u32 val; +}; + struct rsnd_dvc { struct rsnd_dvc_platform_info *info; /* rcar_snd.h */ struct rsnd_mod mod; @@ -248,6 +253,19 @@ static int _rsnd_dvc_pcm_new_m(struct rsnd_mod *mod, return __rsnd_dvc_pcm_new(mod, rdai, rtd, name, &private->cfg); } +static int _rsnd_dvc_pcm_new_s(struct rsnd_mod *mod, + struct rsnd_dai *rdai, + struct snd_soc_pcm_runtime *rtd, + const unsigned char *name, + struct rsnd_dvc_cfg_s *private, + u32 max) +{ + private->cfg.max = max; + private->cfg.size = 1; + private->cfg.val = &private->val; + return __rsnd_dvc_pcm_new(mod, rdai, rtd, name, &private->cfg); +} + static int rsnd_dvc_pcm_new(struct rsnd_mod *mod, struct rsnd_dai *rdai, struct snd_soc_pcm_runtime *rtd)