From patchwork Wed Feb 23 01:48:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 545254 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 74CE0C433EF for ; Wed, 23 Feb 2022 01:49:50 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 484701909; Wed, 23 Feb 2022 02:48:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 484701909 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1645580988; bh=/eztGgB/qaOyxpKSXlrdBXVDfhrcn0PcKGbDUZqrf8g=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=QWUwgCzPFidhWxR3s+6hOSvh4B+bGDzrOxNKHeQsZzIP6q1miKSL5ZhWMUfW87W62 8q0ObDLFpTG4gBRUAkR0oNlvF//BgdSAvVUNV1dNCdgc0OPr1kByQfo5OlqCNMndlD OqDjZNjE6zwpuPzJXjn3O1ndRCgUBFK/I+gPgiBk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E34A3F80118; Wed, 23 Feb 2022 02:48:57 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 39170F800F5; Wed, 23 Feb 2022 02:48:56 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F3F7CF800F5 for ; Wed, 23 Feb 2022 02:48:53 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F3F7CF800F5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DvxOD98a" Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 69C96B81E00; Wed, 23 Feb 2022 01:48:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2756EC340E8; Wed, 23 Feb 2022 01:48:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645580932; bh=/eztGgB/qaOyxpKSXlrdBXVDfhrcn0PcKGbDUZqrf8g=; h=From:To:Cc:Subject:Date:From; b=DvxOD98aANOMTTx+DDHoEmTeIZ6llOvCRuYq14yQWgTHCYnPjWrTODh13R9Ms1edk L0D2dzpg2BiUp2+3eIuMZiTPR+XbN+WpVG6x8m3dYjexxKBbRRXxBqK+e/2o+lSA71 mKlMwoolXyMGEeRFug4fvAeUJJT+vm1KEEy0YWC3FuKHzIbbUEZ3S6f2+4YzBpe8p+ dclc7axKUv9Auj6e4MWoJDUJSmoZxIaddJjwapWLT7cbUnHK0wEg2PeCFNMc5bABJd dKTg1gFAT17h04BOUWQO+sZ/rSwlvwUnBoYfSXtLi10PAZrhxG1T1PgjRrESVSaloj nZ4vgE76sDiIQ== From: Mark Brown To: Liam Girdwood Subject: [PATCH 1/4] ASoC: pcm1681: Use modern ASoC DAI format terminology Date: Wed, 23 Feb 2022 01:48:43 +0000 Message-Id: <20220223014846.2765382-1-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1050; h=from:subject; bh=/eztGgB/qaOyxpKSXlrdBXVDfhrcn0PcKGbDUZqrf8g=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBiFZJmJ+AXvYhyktyzjI3sqkq4hx/Iv1k2rfAK6Hr0 1C02V3qJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYhWSZgAKCRAk1otyXVSH0BYMB/ 97pY52uur3mdQ4UCTmaNGYlA+ZbjFORgKUPjQAbrVF6rOtizwOkvq02Gt2xMY4YzNpxMi3UvDKSXnC qEkYlsBDwjJDJ/6+b3PViCLE4j3GTE461aWpX3Z4ggxriRBVt6dFyfnYnraKddJvN31gbmSUGkI2Hl OMddpsJ0h4PowXAuPc0JsWtFo91wmtn9dRA6NnPdMk/TTo8KqQcYH1Es4f/2gH7g/7GA5Dihb3KZ8q ZzCjwLsy4I7UTrE6XnGFrORgf+ofABJEamf66ywlxeQU4aDa0hPgjdUYQd2s9RkKYL2Tl7S5CfMhxJ aSKeGZldAopOFPYmbu61LbHTTN14oM X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Cc: alsa-devel@alsa-project.org, Mark Brown X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" As part of moving to remove the old style defines for the bus clocks update the pcm1681 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown --- sound/soc/codecs/pcm1681.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c index 5b78e9299c95..9eb65f94fc4d 100644 --- a/sound/soc/codecs/pcm1681.c +++ b/sound/soc/codecs/pcm1681.c @@ -136,8 +136,8 @@ static int pcm1681_set_dai_fmt(struct snd_soc_dai *codec_dai, struct snd_soc_component *component = codec_dai->component; struct pcm1681_private *priv = snd_soc_component_get_drvdata(component); - /* The PCM1681 can only be slave to all clocks */ - if ((format & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBS_CFS) { + /* The PCM1681 can only be consumer to all clocks */ + if ((format & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) != SND_SOC_DAIFMT_CBC_CFC) { dev_err(component->dev, "Invalid clocking mode\n"); return -EINVAL; } From patchwork Wed Feb 23 01:48:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 545637 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E1866C433F5 for ; Wed, 23 Feb 2022 01:50:20 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 17F11191B; Wed, 23 Feb 2022 02:49:29 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 17F11191B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1645581019; bh=y6+rH8hnFNVXdFmnZeLqwUTYKfP8z+x+kSI0RdsyXbQ=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=AQY8CH9siVAtcu1kqC7FtxuXWclshFuDHv3P7IuECU3LSMlB7wx2aIgf4fqQKS8BF iJu1qs5QA/kcOBCD45TPCmRv64FF38Pq6XROpUTLBT1w2wQepAL/wVB57GgUcy4SgA L1pCYC4ZFSrsbTleg+BXO9IupU5llWA/mjZGfyQc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 92C6DF80238; Wed, 23 Feb 2022 02:49:00 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id BDAADF80311; Wed, 23 Feb 2022 02:48:58 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 676A7F800F5 for ; Wed, 23 Feb 2022 02:48:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 676A7F800F5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bz8aoQCR" Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E93A3B81E01; Wed, 23 Feb 2022 01:48:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77676C340F1; Wed, 23 Feb 2022 01:48:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645580933; bh=y6+rH8hnFNVXdFmnZeLqwUTYKfP8z+x+kSI0RdsyXbQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bz8aoQCRGGPch2ifjTVj8AHjjym/+zGRFaRGIZlLS5HD8c4IPQCGb9jSaubQvwOMw M+khyIWtQOFVSafE+KUa10lIPIPbDsJUFZF5yCbuWGZ0NUp6phUIoDpiAamQ7ixvxf NxBfixgRaiFrMNcHDU7gNQ72S0+dSGYu+RhAheHzVwM1ZlFHL+v6NKKYNfSsif16fT bbJrXQpCHTlD0ggcqYm0w4q4bnd+gb9vFbuphdFc/l76ikd5RNSzO69IYoV3g6cuzQ nfNomF3Bf9+OqQE0fLWzGvGUoWlmLGMiEcIfnoDoX2zL+QeMs+DVmdHemALhAdQRgO KVDTZwR7uCqgg== From: Mark Brown To: Liam Girdwood Subject: [PATCH 2/4] ASoC: pcm186x: Use modern ASoC DAI format terminology Date: Wed, 23 Feb 2022 01:48:44 +0000 Message-Id: <20220223014846.2765382-2-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220223014846.2765382-1-broonie@kernel.org> References: <20220223014846.2765382-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2104; h=from:subject; bh=y6+rH8hnFNVXdFmnZeLqwUTYKfP8z+x+kSI0RdsyXbQ=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBiFZJnXYdGbHNjNJDQdYb9Y61BS0qHh6lZWaX5Yiry t92kcxGJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYhWSZwAKCRAk1otyXVSH0PjXB/ 9zLH+58ST6vtK9d6oY1qwE8u41zpL6Lfzk5m89GQ43kOBnAGUPbuYL0HUKRTurd2LuaKGvpwJdElga tW/RBupkHDzlvc88cqhonkzPnCDEc4TqMA1SOHxPmUa7i2dhgAlTjerKsCXUQTni8kn7yDbN9WNC0d KsQKSOEAM1R3ivirCdLXBaWQLPbe2DuJIB1kYx5OKJ1TiN+quCa2G6fOLL1XCPpdCt5Ah8VzX4FcJq +zmNE2D+cK/22NVrquLRRDD+Z1wKT3qhXiDSY4EZIIszsQDacNjsEoP4G2w+4jLaT5kVBKTgM1fWz2 /+29xo7KVAAsLULv566uBsKmrS2IF+ X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Cc: alsa-devel@alsa-project.org, Mark Brown X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" As part of moving to remove the old style defines for the bus clocks update the pcm186x driver to use more modern terminology for clocking. Signed-off-by: Mark Brown --- sound/soc/codecs/pcm186x.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/sound/soc/codecs/pcm186x.c b/sound/soc/codecs/pcm186x.c index b8845f45549e..2c78dccb3f62 100644 --- a/sound/soc/codecs/pcm186x.c +++ b/sound/soc/codecs/pcm186x.c @@ -39,7 +39,7 @@ struct pcm186x_priv { unsigned int sysclk; unsigned int tdm_offset; bool is_tdm_mode; - bool is_master_mode; + bool is_provider_mode; }; static const DECLARE_TLV_DB_SCALE(pcm186x_pga_tlv, -1200, 50, 0); @@ -340,8 +340,8 @@ static int pcm186x_hw_params(struct snd_pcm_substream *substream, PCM186X_PCM_CFG_TDM_LRCK_MODE); } - /* Only configure clock dividers in master mode. */ - if (priv->is_master_mode) { + /* Only configure clock dividers in provider mode. */ + if (priv->is_provider_mode) { div_bck = priv->sysclk / (div_lrck * rate); dev_dbg(component->dev, @@ -364,18 +364,17 @@ static int pcm186x_set_fmt(struct snd_soc_dai *dai, unsigned int format) dev_dbg(component->dev, "%s() format=0x%x\n", __func__, format); - /* set master/slave audio interface */ - switch (format & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBM_CFM: + switch (format & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBP_CFP: if (!priv->sysclk) { - dev_err(component->dev, "operating in master mode requires sysclock to be configured\n"); + dev_err(component->dev, "operating in provider mode requires sysclock to be configured\n"); return -EINVAL; } clk_ctrl |= PCM186X_CLK_CTRL_MST_MODE; - priv->is_master_mode = true; + priv->is_provider_mode = true; break; - case SND_SOC_DAIFMT_CBS_CFS: - priv->is_master_mode = false; + case SND_SOC_DAIFMT_CBC_CFC: + priv->is_provider_mode = false; break; default: dev_err(component->dev, "Invalid DAI master/slave interface\n"); From patchwork Wed Feb 23 01:48:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 545636 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EACCFC433F5 for ; Wed, 23 Feb 2022 01:50:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3B6C6190F; Wed, 23 Feb 2022 02:50:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3B6C6190F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1645581055; bh=gNnEZLNzVGjn9zsz1hYY56rJEUExMF3fuctvS2FB9jI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=B4+S9HQ2L+L7y0V6iw3fyij8qaseNVG2nIzWtYfJduAHFB2n5jsSRDbtylUy7vOXC 5iibq2Ov53XNHcIeErLrl5LW+kKNUS3PhYtTcEsJCye8D5zuUAuuVEJfXzc/RuIPIl kCpvhxGI5iwJXmXudotVXnXYonNaOnl3WcXObmj4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BA55EF80516; Wed, 23 Feb 2022 02:49:04 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C064BF80517; Wed, 23 Feb 2022 02:49:02 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 13F5FF804F2 for ; Wed, 23 Feb 2022 02:48:57 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 13F5FF804F2 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Frw1SJ4l" Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C7FF3614C1; Wed, 23 Feb 2022 01:48:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEB63C340E8; Wed, 23 Feb 2022 01:48:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645580934; bh=gNnEZLNzVGjn9zsz1hYY56rJEUExMF3fuctvS2FB9jI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Frw1SJ4lxuJ3emCqGuza1JBz8aTsLGBcmGyINuNx/PBOje4D2m1gNOrBGUBCBtc3N QGCS21SuFmVTiVDgzEszSyt80q3ujdt27I9KsLBuX0MCXKajTAmybgpsixwkEGri0x SGOoikVdBG8ra2cn/U88B4FpC6j5ifPa6kpQXmt7GjNzsAYYOBQMvyzPjZ+Q8/mzRn oggUysNHFbkQdFYc5qtT1cX1/gort83MBp/qMbZwGiiIxS+kZFPcfpQUPHYmv9WXRi 8V+rf/1h9l8D1CS4Zzqs79+YsU7BVzMHCC3WKLz/zW3poT66J6wwYzofVppXNH1t10 RH56yoLUBGFYQ== From: Mark Brown To: Liam Girdwood Subject: [PATCH 3/4] ASoC: pcm3168a: Use modern ASoC DAI format terminology Date: Wed, 23 Feb 2022 01:48:45 +0000 Message-Id: <20220223014846.2765382-3-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220223014846.2765382-1-broonie@kernel.org> References: <20220223014846.2765382-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4012; h=from:subject; bh=gNnEZLNzVGjn9zsz1hYY56rJEUExMF3fuctvS2FB9jI=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBiFZJoU4VjJlMSoO1WMd1//jSrG2jbpJKKFJNgh+xy Ek599UGJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYhWSaAAKCRAk1otyXVSH0I4HB/ 0UX09/DuSpf2LfHvzZhHdZsWQOpHmQqHPMKOFlS40ksILeIVkSPGGCWpJhCZel7xuWXtLpHC4D1UK9 H5x15wQeMgL/O2fEDaZVLDmUzuPJwc34tYge3tocl7yb2qdMLlaJ/qK7WS1IDvwx68dDjiN6dUGS5d yuaFTwz65Gw1rlH0c0sx8clDVqh0Vm6LPN2f54VJ6RLdj6pC+IbMMiXDou0K6wQ3VSoCgQwSRSIy8d dcBPCayOKKEtO0oAsQ3wKciIzS2GHKUeB/YWrhx3ZNHSFtqp9/9Sikt081plhw/n10ywA+7FNGvolR bdMopamVgvOQLSFfyknm62JQ3xPwk1 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Cc: alsa-devel@alsa-project.org, Mark Brown X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" As part of moving to remove the old style defines for the bus clocks update the pcm3168a driver to use more modern terminology for clocking. Signed-off-by: Mark Brown --- sound/soc/codecs/pcm3168a.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c index 7417cf45d916..cf27f05dc46a 100644 --- a/sound/soc/codecs/pcm3168a.c +++ b/sound/soc/codecs/pcm3168a.c @@ -48,7 +48,7 @@ static const char *const pcm3168a_supply_names[] = { /* ADC/DAC side parameters */ struct pcm3168a_io_params { - bool master_mode; + bool provider_mode; unsigned int format; int tdm_slots; u32 tdm_mask; @@ -357,7 +357,7 @@ static int pcm3168a_set_dai_fmt(struct snd_soc_dai *dai, unsigned int format) struct snd_soc_component *component = dai->component; struct pcm3168a_priv *pcm3168a = snd_soc_component_get_drvdata(component); struct pcm3168a_io_params *io_params = &pcm3168a->io_params[dai->id]; - bool master_mode; + bool provider_mode; switch (format & SND_SOC_DAIFMT_FORMAT_MASK) { case SND_SOC_DAIFMT_LEFT_J: @@ -371,15 +371,15 @@ static int pcm3168a_set_dai_fmt(struct snd_soc_dai *dai, unsigned int format) return -EINVAL; } - switch (format & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBS_CFS: - master_mode = false; + switch (format & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBC_CFC: + provider_mode = false; break; - case SND_SOC_DAIFMT_CBM_CFM: - master_mode = true; + case SND_SOC_DAIFMT_CBP_CFP: + provider_mode = true; break; default: - dev_err(component->dev, "unsupported master/slave mode\n"); + dev_err(component->dev, "unsupported provider mode\n"); return -EINVAL; } @@ -390,7 +390,7 @@ static int pcm3168a_set_dai_fmt(struct snd_soc_dai *dai, unsigned int format) return -EINVAL; } - io_params->master_mode = master_mode; + io_params->provider_mode = provider_mode; io_params->format = format & SND_SOC_DAIFMT_FORMAT_MASK; pcm3168a_update_fixup_pcm_stream(dai); @@ -440,7 +440,7 @@ static int pcm3168a_hw_params(struct snd_pcm_substream *substream, struct snd_soc_component *component = dai->component; struct pcm3168a_priv *pcm3168a = snd_soc_component_get_drvdata(component); struct pcm3168a_io_params *io_params = &pcm3168a->io_params[dai->id]; - bool master_mode, tdm_mode; + bool provider_mode, tdm_mode; unsigned int format; unsigned int reg, mask, ms, ms_shift, fmt, fmt_shift, ratio, tdm_slots; int i, num_scki_ratios, slot_width; @@ -459,9 +459,9 @@ static int pcm3168a_hw_params(struct snd_pcm_substream *substream, fmt_shift = PCM3168A_ADC_FMTAD_SHIFT; } - master_mode = io_params->master_mode; + provider_mode = io_params->provider_mode; - if (master_mode) { + if (provider_mode) { ratio = pcm3168a->sysclk / params_rate(params); for (i = 0; i < num_scki_ratios; i++) { @@ -488,15 +488,15 @@ static int pcm3168a_hw_params(struct snd_pcm_substream *substream, switch (slot_width) { case 16: - if (master_mode || (format != SND_SOC_DAIFMT_RIGHT_J)) { - dev_err(component->dev, "16-bit slots are supported only for slave mode using right justified\n"); + if (provider_mode || (format != SND_SOC_DAIFMT_RIGHT_J)) { + dev_err(component->dev, "16-bit slots are supported only for consumer mode using right justified\n"); return -EINVAL; } break; case 24: - if (master_mode || (format == SND_SOC_DAIFMT_DSP_A) || - (format == SND_SOC_DAIFMT_DSP_B)) { - dev_err(component->dev, "24-bit slots not supported in master mode, or slave mode using DSP\n"); + if (provider_mode || (format == SND_SOC_DAIFMT_DSP_A) || + (format == SND_SOC_DAIFMT_DSP_B)) { + dev_err(component->dev, "24-bit slots not supported in provider mode, or consumer mode using DSP\n"); return -EINVAL; } break; From patchwork Wed Feb 23 01:48:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 545253 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C2C2FC433F5 for ; Wed, 23 Feb 2022 01:50:40 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EDE3D1920; Wed, 23 Feb 2022 02:49:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EDE3D1920 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1645581039; bh=FInZ8bgEh9fJf3xW469G5TLgkADkj5ZM4Ed11NC9Rqs=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vUxEuzjWY5shQWRfJSwTOfjj8VAGee5IIHRUxtVlljuukho9Ol3KsZn4lDnox0qvx J4FcZ9PIWuY1QPMPdtuW1b3Jb6XEa+chEkZorb8El06hBwb6FlowhCXJDv2S3m7L90 Q+rQ6RAEP1wM2k+6uPCoULSURBJAfow65k8HlOmE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2D93DF80508; Wed, 23 Feb 2022 02:49:02 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DF915F8012C; Wed, 23 Feb 2022 02:49:00 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 59BECF8012C for ; Wed, 23 Feb 2022 02:48:57 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 59BECF8012C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TzhIuZLK" Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7FDB86146B; Wed, 23 Feb 2022 01:48:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14746C340E8; Wed, 23 Feb 2022 01:48:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645580935; bh=FInZ8bgEh9fJf3xW469G5TLgkADkj5ZM4Ed11NC9Rqs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TzhIuZLKpIi2RihYxBEEjSWY8aOXd4+b1IqD5jwXsEQLrUWlMWc+v1zQvvczx8TEW YaRnPKwKfrm0Jr5k8LChbKPBXtoiEd5rQS0RKNKvR7kehzJt5YUjj67RR7mwFb8waB 6a/6y5R7AYtRjrFZb5/xVMOgwO8SLPF3dKAZrUp6+s0a0oLTFczgCQEYIYlIv+Za4N YA9O5eOnxrLgy6/Hkfn5IWTv0XQiMj9RIPg8LW8hkEnvDOlYYQPxntep2z1x28ICgN n/0p+1F1/EsaPLDqVwhBKrjNMGyrgljqWi3zhwRUF7caD62wT1zMf8911getZZrK0D wkkNdkxQL5Ubg== From: Mark Brown To: Liam Girdwood Subject: [PATCH 4/4] ASoC: pcm512x: Use modern ASoC DAI format terminology Date: Wed, 23 Feb 2022 01:48:46 +0000 Message-Id: <20220223014846.2765382-4-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220223014846.2765382-1-broonie@kernel.org> References: <20220223014846.2765382-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2889; h=from:subject; bh=FInZ8bgEh9fJf3xW469G5TLgkADkj5ZM4Ed11NC9Rqs=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBiFZJpualPKo39n0cEG+9UQfSHxVZEcxSXi5nts5v+ kB1KuS6JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYhWSaQAKCRAk1otyXVSH0IG+B/ 9rmVaIZGNsQX8fBc1jUhtMGBiyMFnhVo4io2951bsbPXWNEPT+QpIJt4mM3r/RnloGC60H9JBHiT1l ZpyFC6GibEnBvW+hl8LNzud719RU1/9guIdFDfj8Qq/2oxPqzvcLjvoqqWPRJHbnTo0Sh8yDMonw7J CUU29Tz68VnAO86NYub5rDXZCVZSLKl62lOemRHnYcSqEnj5qg+AL8wNYT+mRPjzMrRehapgNKOKcv 2WM0WsaHxi/ZqrIOEf9+rc1IpRp7Y8UZbEA4IX6lYkx/TueXvnpBR0ftqogv5VQ4lal0ud1K+EjOOi p6PHFRxjMv4ZHiqogXeR27XEijEgk4 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Cc: alsa-devel@alsa-project.org, Mark Brown X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" As part of moving to remove the old style defines for the bus clocks update the pcm512x driver to use more modern terminology for clocking. Signed-off-by: Mark Brown --- sound/soc/codecs/pcm512x.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c index 60dee41816dc..a3ff4a07aff7 100644 --- a/sound/soc/codecs/pcm512x.c +++ b/sound/soc/codecs/pcm512x.c @@ -652,12 +652,12 @@ static int pcm512x_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_component *component = dai->component; struct pcm512x_priv *pcm512x = snd_soc_component_get_drvdata(component); - switch (pcm512x->fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBM_CFM: - case SND_SOC_DAIFMT_CBM_CFS: + switch (pcm512x->fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBP_CFP: + case SND_SOC_DAIFMT_CBP_CFC: return pcm512x_dai_startup_master(substream, dai); - case SND_SOC_DAIFMT_CBS_CFS: + case SND_SOC_DAIFMT_CBC_CFC: return pcm512x_dai_startup_slave(substream, dai); default: @@ -1202,8 +1202,8 @@ static int pcm512x_hw_params(struct snd_pcm_substream *substream, return ret; } - if ((pcm512x->fmt & SND_SOC_DAIFMT_MASTER_MASK) == - SND_SOC_DAIFMT_CBS_CFS) { + if ((pcm512x->fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) == + SND_SOC_DAIFMT_CBC_CFC) { ret = regmap_update_bits(pcm512x->regmap, PCM512x_ERROR_DETECT, PCM512x_DCAS, 0); if (ret != 0) { @@ -1340,21 +1340,21 @@ static int pcm512x_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) int afmt; int offset = 0; int clock_output; - int master_mode; + int provider_mode; int ret; - switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBS_CFS: + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBC_CFC: clock_output = 0; - master_mode = 0; + provider_mode = 0; break; - case SND_SOC_DAIFMT_CBM_CFM: + case SND_SOC_DAIFMT_CBP_CFP: clock_output = PCM512x_BCKO | PCM512x_LRKO; - master_mode = PCM512x_RLRK | PCM512x_RBCK; + provider_mode = PCM512x_RLRK | PCM512x_RBCK; break; - case SND_SOC_DAIFMT_CBM_CFS: + case SND_SOC_DAIFMT_CBP_CFC: clock_output = PCM512x_BCKO; - master_mode = PCM512x_RBCK; + provider_mode = PCM512x_RBCK; break; default: return -EINVAL; @@ -1370,9 +1370,9 @@ static int pcm512x_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) ret = regmap_update_bits(pcm512x->regmap, PCM512x_MASTER_MODE, PCM512x_RLRK | PCM512x_RBCK, - master_mode); + provider_mode); if (ret != 0) { - dev_err(component->dev, "Failed to enable master mode: %d\n", ret); + dev_err(component->dev, "Failed to enable provider mode: %d\n", ret); return ret; }