Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7438451ybp; Wed, 16 Oct 2019 08:39:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKSTemmranuO+ZgzigeDFNnVRXEB3Jf6kNHEfOr8ENbMmp5CdP+/xbVk9u6T/kIVOmqf8q X-Received: by 2002:a05:6402:51a:: with SMTP id m26mr39808885edv.298.1571240361480; Wed, 16 Oct 2019 08:39:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571240361; cv=none; d=google.com; s=arc-20160816; b=cwqhkCnehRuGfb7cBdil/E2SX6rSLVseBbh9qNUvwEoBlWkbLArDXPZcbY39p6+Eje 1BgFmsZ39AVltHZGMPWhL8FtjtoLYzn7vSrbkckQzZsZiShljioB1ntpplpGtiwCQIhc /AGWxGQvO9MY5+3WT/BOxKcfgx2gWZsx0jaDbE98hlA2UvXgZ/Md5dq5YZO/R3iUvx/z I3xHnchvGOoQCCwaJ3ZjN3qITpnJsi+FSAfry7A+oI86PHINr0I8QTQaXuslCEWr62MI ZNmW0vYQaQvANCylN/htkGe8YFdcrBXADcL2yF4w5kTRkoDyxEIk4GOQ3txQTBYAMXD5 tz1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=joXs5HNTDFvkcsH2IieRzgvrR+uiUSLNEee3h+rDtNs=; b=t/AlvoTCLRtABwnoXlsszWX3ljtYrsakZ+c5F2Z38uDnPyqFXpYnqOaR0FN4lJ2ODQ JUa1KrHNvxRyvcvRnM34vqvqDk6R+nSBLBCjGRYoltXNugaxG7uK5ZYlgloi4f6yiUul OuPAH4VE5KBKIZT0f3mZiDnr7JCfmBbcCXCqP0cxHE9jIkyAsxY5ie1tJLu07JY/6jJ6 pUq9ENsxUZqNsWiQzOaXj2JTVIBJXJLCkDtddsA/VpvWjloyVh4sjzIXDXtu627e7zuE DqLEk0zqwuVpTVZZySJDJcsP+fPrssyJ1BMEH0VGbMyfOyAKm/KdKm5hLhMkqIuzZWxI 50hw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f57si16626551ede.78.2019.10.16.08.38.57; Wed, 16 Oct 2019 08:39:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393191AbfJPMnY (ORCPT + 99 others); Wed, 16 Oct 2019 08:43:24 -0400 Received: from smtp1.de.adit-jv.com ([93.241.18.167]:57793 "EHLO smtp1.de.adit-jv.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726985AbfJPMnX (ORCPT ); Wed, 16 Oct 2019 08:43:23 -0400 Received: from localhost (smtp1.de.adit-jv.com [127.0.0.1]) by smtp1.de.adit-jv.com (Postfix) with ESMTP id 1520C3C057C; Wed, 16 Oct 2019 14:43:21 +0200 (CEST) Received: from smtp1.de.adit-jv.com ([127.0.0.1]) by localhost (smtp1.de.adit-jv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mna5zdhg1cQk; Wed, 16 Oct 2019 14:43:15 +0200 (CEST) Received: from HI2EXCH01.adit-jv.com (hi2exch01.adit-jv.com [10.72.92.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp1.de.adit-jv.com (Postfix) with ESMTPS id 76CDF3C003F; Wed, 16 Oct 2019 14:43:15 +0200 (CEST) Received: from vmlxhi-102.adit-jv.com (10.72.93.184) by HI2EXCH01.adit-jv.com (10.72.92.24) with Microsoft SMTP Server (TLS) id 14.3.468.0; Wed, 16 Oct 2019 14:43:15 +0200 From: Eugeniu Rosca To: Linux-Renesas , Kuninori Morimoto , Takashi Iwai , Jaroslav Kysela , Mark Brown , Liam Girdwood , , CC: Eugeniu Rosca , Eugeniu Rosca , Junya Monden , Andrew Gabbasov , Jiada Wang , Timo Wischer , Subject: [PATCH] ASoC: rsnd: Reinitialize bit clock inversion flag for every format setting Date: Wed, 16 Oct 2019 14:42:55 +0200 Message-ID: <20191016124255.7442-1-erosca@de.adit-jv.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.72.93.184] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Junya Monden Unlike other format-related DAI parameters, rdai->bit_clk_inv flag is not properly re-initialized when setting format for new stream processing. The inversion, if requested, is then applied not to default, but to a previous value, which leads to SCKP bit in SSICR register being set incorrectly. Fix this by re-setting the flag to its initial value, determined by format. Fixes: 1a7889ca8aba3 ("ASoC: rsnd: fixup SND_SOC_DAIFMT_xB_xF behavior") Cc: Andrew Gabbasov Cc: Jiada Wang Cc: Timo Wischer Cc: stable@vger.kernel.org # v3.17+ Signed-off-by: Junya Monden Signed-off-by: Eugeniu Rosca --- sound/soc/sh/rcar/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index bda5b958d0dc..e9596c2096cd 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -761,6 +761,7 @@ static int rsnd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) } /* set format */ + rdai->bit_clk_inv = 0; switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { case SND_SOC_DAIFMT_I2S: rdai->sys_delay = 0; -- 2.23.0