From patchwork Fri Oct 31 01:20:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 5201161 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 7405CC11AC for ; Fri, 31 Oct 2014 01:21:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A6A2201C7 for ; Fri, 31 Oct 2014 01:21:11 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 640AD2011E for ; Fri, 31 Oct 2014 01:21:10 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6F225260664; Fri, 31 Oct 2014 02:21:09 +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, 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 A97272654E5; Fri, 31 Oct 2014 02:20:43 +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 617442654EA; Fri, 31 Oct 2014 02:20:42 +0100 (CET) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by alsa0.perex.cz (Postfix) with ESMTP id 52DD4260671 for ; Fri, 31 Oct 2014 02:20:10 +0100 (CET) Received: by mail-pa0-f49.google.com with SMTP id lj1so6560728pab.22 for ; Thu, 30 Oct 2014 18:20:09 -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=EcYz5soghuule1V/BLe1L2i0Wo/I0IaW0FFDcnHi/Ek=; b=su+84rtET0KagB6kA+P/tvrEbkbKXLSFVLe2mnRorcW1x2LJP9iRITqoC7BJJkFDDe CsxUJ9fG1pHV4t746Rpeyqp8sC05L0zytxBxNYMnMQrYdSUlgN27EkNFS1WUZS/egE/M bcG7kw0aA4yYMCi5hAgmDy+WkGcX5NlJIFwdwTEMlJzr6ZKN7v7Ft6ToRBwRGQ1rSC0D BJb7BwrRKA9QD3c3Q5U4XIj1j7Ex8gLaxZhvWHXG0kmt48kH8TsNSsy68nzToIESXc7T WOJrTl9sydr1lsuK84tfPe+bgWvUcpfosQ2wab8OlFJCrLbI1sOyfqu4Cmc2gJyn0egk KLFA== X-Received: by 10.70.119.2 with SMTP id kq2mr68745pdb.167.1414718409220; Thu, 30 Oct 2014 18:20:09 -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 qh4sm8262164pbb.35.2014.10.30.18.20.07 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 30 Oct 2014 18:20:08 -0700 (PDT) Date: Thu, 30 Oct 2014 18:20:08 -0700 (PDT) Message-ID: <87bnot2fy0.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: <87egtp2g05.wl%kuninori.morimoto.gx@gmail.com> References: <87egtp2g05.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 2/5 v2] ASoC: rsnd: move DVC_DVUER settings under rsnd_dvc_volume_update() 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 We need to Enable/Disable DVC_DVUER register if we set DVCp_ZCMCR, DVCp_VRCTR, DVCp_VRPDR, DVCp_VRDBR, DVCp_VOL0R, DVCp_VOL1R, DVCp_VOL2R, DVCp_VOL3R, DVCp_VOL4R, DVCp_VOL5R, DVCp_VOL6R, DVCp_VOL7R and, these are controlled under rsnd_dvc_volume_update(). This patch moves DVC_DVUER settings to it. Signed-off-by: Kuninori Morimoto --- v1 -> v2 - fixup inverted Enable/Disable sound/soc/sh/rcar/dvc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c index 3952237..ce1512e 100644 --- a/sound/soc/sh/rcar/dvc.c +++ b/sound/soc/sh/rcar/dvc.c @@ -48,6 +48,9 @@ static void rsnd_dvc_volume_update(struct rsnd_mod *mod) mute |= (!!dvc->mute.val[i]) << i; } + /* Disable DVC Register access */ + rsnd_mod_write(mod, DVC_DVUER, 0); + /* Enable Digital Volume */ dvucr = 0x100; rsnd_mod_write(mod, DVC_VOL0R, dvc->volume.val[0]); @@ -60,6 +63,9 @@ static void rsnd_dvc_volume_update(struct rsnd_mod *mod) } rsnd_mod_write(mod, DVC_DVUCR, dvucr); + + /* Enable DVC Register access */ + rsnd_mod_write(mod, DVC_DVUER, 1); } static int rsnd_dvc_probe_gen2(struct rsnd_mod *mod, @@ -117,8 +123,6 @@ static int rsnd_dvc_init(struct rsnd_mod *dvc_mod, rsnd_mod_write(dvc_mod, DVC_DVUIR, 0); - rsnd_mod_write(dvc_mod, DVC_DVUER, 1); - rsnd_adg_set_cmd_timsel_gen2(rdai, dvc_mod, io); return 0;