From patchwork Wed Oct 22 01:14:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5129151 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 A5C4CC11AC for ; Wed, 22 Oct 2014 01:18:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B6651201FE for ; Wed, 22 Oct 2014 01:18:39 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 521C820219 for ; Wed, 22 Oct 2014 01:18:38 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6AB4B26510C; Wed, 22 Oct 2014 03:18:37 +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, NO_DNS_FOR_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 ED4372625C4; Wed, 22 Oct 2014 03:15:55 +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 AC80C2625C4; Wed, 22 Oct 2014 03:15:54 +0200 (CEST) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by alsa0.perex.cz (Postfix) with ESMTP id 25ECB264ED5 for ; Wed, 22 Oct 2014 03:14:48 +0200 (CEST) Received: by mail-pa0-f49.google.com with SMTP id hz1so2558164pad.36 for ; Tue, 21 Oct 2014 18:14:48 -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:in-reply-to :references:mime-version:content-type; bh=N8fXkfmKCqOdNyUgsuCXtusLEacEasB4Dp7Rz96k7UU=; b=HObX6CLDaAilaLX+1kiyRu1DVMk7jlREmiPlE4FUJh4X55CG3sb5SAIrudk29wXNJb YbTiouqLSZg1S/BEO1q2SNe/cGzCM2Lwki9XXyuEdVYAolBXYJtPEQMC/16RpW/2N42i j+SbPCQhITpZ6aMHh+yR9i1x4vJak7LKIC1GkcL5yROC5ki0RU+m/viRbkKgRypJ35pk a1TFnNnkmNt+Zt/WLI6LwzzCQ2kMfheT+PMibmqBY6hkTpsdglQzWWr9Rkt8rkKeThOJ tiHOLNjsGdJ5EVqDBCZKZ/7I62wlDVDjmT/7VQRXZlyxOj6V+B2FHzXM61prfTnH8S35 HXWg== X-Received: by 10.69.15.225 with SMTP id fr1mr39356721pbd.43.1413940487964; Tue, 21 Oct 2014 18:14:47 -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 z15sm13011216pdi.6.2014.10.21.18.14.45 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 21 Oct 2014 18:14:47 -0700 (PDT) Date: Tue, 21 Oct 2014 18:14:47 -0700 (PDT) Message-ID: <87vbnc6h2z.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Mark Brown In-Reply-To: <8761fc7vpx.wl%kuninori.morimoto.gx@gmail.com> References: <8761fc7vpx.wl%kuninori.morimoto.gx@gmail.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: Linux-ALSA , Simon , Liam Girdwood , Kuninori Morimoto Subject: [alsa-devel] [PATCH 7/8] 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 --- 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 e4dd1d8..2654ab0 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)