From patchwork Mon Jan 15 04:21:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 860600 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zKh6l6j9Wz9s7M for ; Mon, 15 Jan 2018 16:02:23 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lfoW2INg"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zKh6l5L3fzF0WC for ; Mon, 15 Jan 2018 16:02:23 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lfoW2INg"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c05::243; helo=mail-pg0-x243.google.com; envelope-from=nicoleotsuka@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lfoW2INg"; dkim-atps=neutral Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zKgDq5W0fzF0X9 for ; Mon, 15 Jan 2018 15:22:35 +1100 (AEDT) Received: by mail-pg0-x243.google.com with SMTP id j2so7416246pgv.3 for ; Sun, 14 Jan 2018 20:22:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ekk7DhVsiOZMmJ2/tRsF1cXOCm8KVIeNNOu0oOte7N0=; b=lfoW2INgHbuBDjNseXhWmLaCMYcuq/UQXbeQOa8lGN79Wkl2K9Vzl5Nd5F9KWugwp6 mKGqRunbTocBEM7niU9+rR+oc7yPIC9DGcJC3gBEXSpprTDkJfc6PCqoga37BDTXP2TU InEFRPX5HKjt05pKD1Xu6bGh5RTvuqiMMN4WI7vYwxq/ceFa3yC0bQXWLzCaFvCjD+n5 zhhqaDF6J+pHrhjJ+JwEzB+1uV73BvWXOqCv+Dha1TtRiWXCNwgfP4LTDo0H/80jhv5a Kc1Bort/xx+QoQ9+5t0OEIO9FmSD5cz0GJNMoG10LtaS1H4TYdxhvjUOyYIWlBDY4wZt qhbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ekk7DhVsiOZMmJ2/tRsF1cXOCm8KVIeNNOu0oOte7N0=; b=TM43loAUIK/cncdT5CteXuUdKV6X0hfBs5MzKUdmnHnQokrDcqrnZVC5ooPi0WtYP3 N5fF6xt2xcKk9cC2wnyTZy5QpQqlJAnw8SYRsrAzfLPcuo7XmS3f6TLp2ZYY8Nbv23V3 i7WFz3Qf01JsiTN/tf+/wrlBE5oO5oclprNFne+uJS7JSpXOGeugsGuukTkOnRSGY6qO tLNoxm7ZuEohEmu0egebwZqF/uSgWSmg84xEWe8Qd9ulgB68EDwOW8c6MjwFpY2kN+E3 09r29ayBGb8CN5qvi0tQqY6uH6Corm0E7pp7wKt2OyilGHWEBmIRDmbMCqnIN18d9huW La+w== X-Gm-Message-State: AKwxytcU8120cWEjcB3YiMQQw+9HS/F+nMAXNM17LVAiRNa4XnZ6YO4g x7S7wYzJ+tSDKfB8HfJ7/EA= X-Google-Smtp-Source: ACJfBouJLcv4+e1yiwfi1C/fgujnj9snhfXYBLhy9FlPton0adZNX36o0xaWtue+A9yS+O/U8XU/6w== X-Received: by 10.101.74.208 with SMTP id c16mr8827463pgu.34.1515990153629; Sun, 14 Jan 2018 20:22:33 -0800 (PST) Received: from Asurada-CZ80.localdomain (c-73-231-2-134.hsd1.ca.comcast.net. [73.231.2.134]) by smtp.gmail.com with ESMTPSA id v7sm17011018pgs.83.2018.01.14.20.22.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 14 Jan 2018 20:22:33 -0800 (PST) From: Nicolin Chen To: timur@tabi.org, broonie@kernel.org, mail@maciej.szmigiero.name Subject: [PATCH v3 17/17] ASoC: fsl_ssi: Use ssi->streams instead of reading register Date: Sun, 14 Jan 2018 20:21:27 -0800 Message-Id: <1515990087-11598-18-git-send-email-nicoleotsuka@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515990087-11598-1-git-send-email-nicoleotsuka@gmail.com> References: <1515990087-11598-1-git-send-email-nicoleotsuka@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, kernel@pengutronix.de, linux-kernel@vger.kernel.org, caleb@crome.org, lgirdwood@gmail.com, arnaud.mouiche@invoxia.com, lukma@denx.de, fabio.estevam@nxp.com, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Since ssi->streams is being updated along with SCR register and its SSIEN bit, it's simpler to use it instead. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome --- sound/soc/fsl/fsl_ssi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index d2072de..2768def 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -803,11 +803,6 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream, unsigned int sample_size = params_width(hw_params); u32 wl = SSI_SxCCR_WL(sample_size); int ret; - u32 scr; - int enabled; - - regmap_read(regs, REG_SSI_SCR, &scr); - enabled = scr & SSI_SCR_SSIEN; /* * SSI is properly configured if it is enabled and running in @@ -815,7 +810,7 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream, * that should set separate configurations for STCCR and SRCCR * despite running in the synchronous mode. */ - if (enabled && ssi->synchronous) + if (ssi->streams && ssi->synchronous) return 0; if (fsl_ssi_is_i2s_master(ssi)) {