From patchwork Tue Jul 21 21:46:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Zhang X-Patchwork-Id: 6838301 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6A8F79F358 for ; Tue, 21 Jul 2015 21:47:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 92B76205B5 for ; Tue, 21 Jul 2015 21:47:10 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 9CF75205DF for ; Tue, 21 Jul 2015 21:47:08 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 67152260623; Tue, 21 Jul 2015 23:47:06 +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, 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 F1C522605FF; Tue, 21 Jul 2015 23:46:56 +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 114E62605EA; Tue, 21 Jul 2015 23:46:56 +0200 (CEST) Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) by alsa0.perex.cz (Postfix) with ESMTP id C3B4F2605D3 for ; Tue, 21 Jul 2015 23:46:50 +0200 (CEST) Received: by pdrg1 with SMTP id g1so126836203pdr.2 for ; Tue, 21 Jul 2015 14:46:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=UGMItOobJKpoI5ySYIllc2aqyx8hAmtsBQbG8QyRhtc=; b=YDZXpNKFvnxD15MF7r7R5lKz/kgdE8JMNN4BOPh84b1WI/9dRCgjtOJByIPs40HQlI Y0YyBFYWFav1lCD1yqbE209yvkbgt0gCpOZxNCbkWRR3BT/7ifrSvk9ko+/O0pNh8C5y 1k5AeqLzpokWx3U+JEpFdXDOmUTCIc+xghksg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UGMItOobJKpoI5ySYIllc2aqyx8hAmtsBQbG8QyRhtc=; b=aDqiHzHCqpuT3c+CA3X9t61Zs88xzXfDkW/z7BIlPh5YL3l9xMzUt9PZdUtuH8TarD jCbC7MDr3fo3ZeDJd204/pXMSeTMSapTCnpTKvpp2URVpWUnNCPj+deyoiLFHVJCy238 OLLpiieTWVHDKX6SLbz3nRe6I0kkH/Yg6XNTx+clGgO9iVSwC+P9oYBxwJw+MG1u3YzK UDiKvGk2p0+Dwdhfq/cCHJMlMlQryLCbMOSNhZ6ETHzgjvQEoV2Ygikl7lzEcOMIfC1n Cd5anNNItbsYKgqS19Y+2FBPl6K2k5nZqKOkPpIHw048KFMWnt7s0Ha5P9PcsnugbGvQ tzMw== X-Gm-Message-State: ALoCoQkTYyCVb80KEno0fWjyWTyfV/hhrbE1nDCRGfJ5p6LHpfg8aUgH5BqOo11kiP14356azat+ X-Received: by 10.66.66.130 with SMTP id f2mr79377769pat.120.1437515209392; Tue, 21 Jul 2015 14:46:49 -0700 (PDT) Received: from benzh.mtv.corp.google.com ([172.22.65.67]) by smtp.gmail.com with ESMTPSA id j2sm29265377pdk.21.2015.07.21.14.46.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Jul 2015 14:46:48 -0700 (PDT) From: Ben Zhang To: Mark Brown Date: Tue, 21 Jul 2015 14:46:26 -0700 Message-Id: <1437515186-1961-1-git-send-email-benzh@chromium.org> X-Mailer: git-send-email 2.4.3.573.g4eafbef Cc: Harsha Priya , Ben Zhang , alsa-devel@alsa-project.org, Lars-Peter Clausen , Anatol Pomozov Subject: [alsa-devel] [PATCH] ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The regmap_write in ssm4567_set_dai_fmt accidentally clears the TDM_BCLKS field which was set earlier by ssm4567_set_tdm_slot. This patch fixes it by using regmap_update_bits with proper mask. Signed-off-by: Ben Zhang Acked-by: Lars-Peter Clausen Acked-by: Anatol Pomozov --- sound/soc/codecs/ssm4567.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/ssm4567.c b/sound/soc/codecs/ssm4567.c index 4662587..a757ab8 100644 --- a/sound/soc/codecs/ssm4567.c +++ b/sound/soc/codecs/ssm4567.c @@ -315,7 +315,13 @@ static int ssm4567_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) if (invert_fclk) ctrl1 |= SSM4567_SAI_CTRL_1_FSYNC; - return regmap_write(ssm4567->regmap, SSM4567_REG_SAI_CTRL_1, ctrl1); + return regmap_update_bits(ssm4567->regmap, SSM4567_REG_SAI_CTRL_1, + SSM4567_SAI_CTRL_1_BCLK | + SSM4567_SAI_CTRL_1_FSYNC | + SSM4567_SAI_CTRL_1_LJ | + SSM4567_SAI_CTRL_1_TDM | + SSM4567_SAI_CTRL_1_PDM, + ctrl1); } static int ssm4567_set_power(struct ssm4567 *ssm4567, bool enable)