From patchwork Wed Feb 14 13:29:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 128334 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp609833ljc; Wed, 14 Feb 2018 05:30:01 -0800 (PST) X-Google-Smtp-Source: AH8x225NEFHnP2zyIys4F5bU1m/CJcXHO5UKnNL94dzv73NanUcBMU8WH4iVbwOXRoAzTJg0550y X-Received: by 10.28.106.2 with SMTP id f2mr4573211wmc.84.1518615000913; Wed, 14 Feb 2018 05:30:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518615000; cv=none; d=google.com; s=arc-20160816; b=J0OPyqYEq9Bq0lkvIqjQjDW9JvT054eHr966RjJJ7aDcsQX+BPnZ0jCYwva6O0bOvC UjT7zfetXexIWp7r6IH02EN2Mx0jy5C8opKO3a7sYjwzfgLiUYj+1bQr/Usfm9XHRtUw T0Pi/nkPN5uRA5wO5j1Ka3CAuXMRGLM9mc8PN+nwMD+YZu++jR9helFy8Ak9W1SxyETp +b2nbkpyUvNU+9r63KMCGtOeI6ziSiqswVpeGda0isYxM28neNaWxzqHeb9OeyH2nkD/ rBbAXm4Ygz3FZ+QVqIri74nTBCpzZOHSV1xb6XE8rsg35cPTVNoxRQ5i9HOL4L+vvUp9 rESQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=lCkRil9QyPpyGiZadcGyOgkksr/RYnGcd5QxBcvae1w=; b=s3gY+FmHlEosNKpdDltKzsoy3vB9kCI8G+5EVndTBSFW0UZoRovPXmMcndSqz0b+5R 6WV2tf5L8IjdheGwdrLxTV/ivGeMSD+faefAGbW+pMh+oC7jU2i5n+GpKI7nYNTEIfZ6 tfagjZvyR8SkPGzDZtdx/MGp/0Kggf2Mwq3zxlWwNkdXEijAJrcjSh2b/3IoghBYf5jx tFcn29LhLX4l2nsySgW9tkd6Z+aYewiNsmyB9dhe2MGokA4bFM0b/Rljl+AUUBeS7FI7 3Yf/OaA7y8DR1eW9f4lByXBeTWwipPV0hOpHxBSxac+c4AG2lere0u7hDuiHFS7nXMwF TVwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=NAMb2FwU; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id j8si9398164wrg.338.2018.02.14.05.30.00; Wed, 14 Feb 2018 05:30:00 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=NAMb2FwU; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9B750267AC8; Wed, 14 Feb 2018 14:29:28 +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 9D571267B02; Wed, 14 Feb 2018 14:29:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 22F63267AA9 for ; Wed, 14 Feb 2018 14:29:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=DUCBV3vcEYaZA8lovaA6x6/KTIQiRIbkxdxQO1OVJWg=; b=NAMb2FwUJv/C rcEWzM90AEaP7BpODivs7X7/Mb3Ok3LeXzM5jW8GbWYgUmbmsF5B+gX2bDp8wGvFNRqiHGs6/qZMk D7/M4GdTGWzib+PVvoMiI+7coY3C5UwoHG11pLY2IVq0ofChIwhpoaPlf1MochCU+h7pBZDQGx52s TuFJs=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1elx7Z-0004pP-Sj; Wed, 14 Feb 2018 13:29:13 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1elx7Z-0006uJ-Eu; Wed, 14 Feb 2018 13:29:13 +0000 From: Mark Brown To: Sylwester Nawrocki In-Reply-To: <20180205154403.13520-5-s.nawrocki@samsung.com> Message-Id: Date: Wed, 14 Feb 2018 13:29:13 +0000 Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, sbkim73@samsung.com, jcsing.lee@samsung.com, lgirdwood@gmail.com, krzk@kernel.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, broonie@kernel.org, m.szyprowski@samsung.com Subject: [alsa-devel] Applied "ASoC: samsung: i2s: Define the parameters list for SAMSUNG_I2S_OPCLK" to the asoc tree 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 The patch ASoC: samsung: i2s: Define the parameters list for SAMSUNG_I2S_OPCLK has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 45ae70e8b60e1d1bbc71eeccaef4026c5e6638a3 Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Mon, 12 Feb 2018 17:15:35 +0100 Subject: [PATCH] ASoC: samsung: i2s: Define the parameters list for SAMSUNG_I2S_OPCLK The SAMSUNG_I2S_OPCLK is not currently used by any card driver thus we can safely change semantics of 'dir' argument of the I2S set_sysclk() callback. Now an enumeration is exported instead of directly using register bit field values. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Signed-off-by: Mark Brown --- sound/soc/samsung/i2s-regs.h | 11 ++++++----- sound/soc/samsung/i2s.c | 2 +- sound/soc/samsung/i2s.h | 11 ++++++++--- 3 files changed, 15 insertions(+), 9 deletions(-) -- 2.16.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/samsung/i2s-regs.h b/sound/soc/samsung/i2s-regs.h index fe6914005494..964985ea2e80 100644 --- a/sound/soc/samsung/i2s-regs.h +++ b/sound/soc/samsung/i2s-regs.h @@ -65,11 +65,12 @@ #define CON_RXDMA_ACTIVE (1 << 1) #define CON_ACTIVE (1 << 0) -#define MOD_OPCLK_CDCLK_OUT (0 << 30) -#define MOD_OPCLK_CDCLK_IN (1 << 30) -#define MOD_OPCLK_BCLK_OUT (2 << 30) -#define MOD_OPCLK_PCLK (3 << 30) -#define MOD_OPCLK_MASK (3 << 30) +#define MOD_OPCLK_SHIFT 30 +#define MOD_OPCLK_CDCLK_OUT (0 << MOD_OPCLK_SHIFT) +#define MOD_OPCLK_CDCLK_IN (1 << MOD_OPCLK_SHIFT) +#define MOD_OPCLK_BCLK_OUT (2 << MOD_OPCLK_SHIFT) +#define MOD_OPCLK_PCLK (3 << MOD_OPCLK_SHIFT) +#define MOD_OPCLK_MASK (3 << MOD_OPCLK_SHIFT) #define MOD_TXS_IDMA (1 << 28) /* Sec_TXFIFO use I-DMA */ #define MOD_BLCS_SHIFT 26 diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 7b57ad11ca15..b6407fbabdd1 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -489,7 +489,7 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, switch (clk_id) { case SAMSUNG_I2S_OPCLK: mask = MOD_OPCLK_MASK; - val = dir; + val = (dir << MOD_OPCLK_SHIFT) & MOD_OPCLK_MASK; break; case SAMSUNG_I2S_CDCLK: mask = 1 << i2s_regs->cdclkcon_off; diff --git a/sound/soc/samsung/i2s.h b/sound/soc/samsung/i2s.h index 79781de2f247..a9832a9555cb 100644 --- a/sound/soc/samsung/i2s.h +++ b/sound/soc/samsung/i2s.h @@ -16,11 +16,16 @@ #define SAMSUNG_I2S_DAI "samsung-i2s" #define SAMSUNG_I2S_DAI_SEC "samsung-i2s-sec" -#define SAMSUNG_I2S_DIV_BCLK 1 +#define SAMSUNG_I2S_DIV_BCLK 1 -#define SAMSUNG_I2S_RCLKSRC_0 0 -#define SAMSUNG_I2S_RCLKSRC_1 1 +#define SAMSUNG_I2S_RCLKSRC_0 0 +#define SAMSUNG_I2S_RCLKSRC_1 1 #define SAMSUNG_I2S_CDCLK 2 +/* Operation clock for IIS logic */ #define SAMSUNG_I2S_OPCLK 3 +#define SAMSUNG_I2S_OPCLK_CDCLK_OUT 0 /* CODEC clock out */ +#define SAMSUNG_I2S_OPCLK_CDCLK_IN 1 /* CODEC clock in */ +#define SAMSUNG_I2S_OPCLK_BCLK_OUT 2 /* Bit clock out */ +#define SAMSUNG_I2S_OPCLK_PCLK 3 /* Audio bus clock */ #endif /* __SND_SOC_SAMSUNG_I2S_H */