From patchwork Fri Sep 15 08:11:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Shubin via B4 Relay X-Patchwork-Id: 140235 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp888584vqi; Fri, 15 Sep 2023 01:23:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE6otWFfDonk6RK8OutFk6baq9yzT+Q4TnE8AAlmsAEf0Xb1GHbjn/S48pK0MzQIJ+AEjgJ X-Received: by 2002:a05:6358:7242:b0:134:dc90:b7d1 with SMTP id i2-20020a056358724200b00134dc90b7d1mr1560514rwa.25.1694766232599; Fri, 15 Sep 2023 01:23:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694766232; cv=none; d=google.com; s=arc-20160816; b=ZmaxY+iU93ExInW9N/vDENpEaE8i/1Zvh04cxKrroDb1ouwouvqpUrMrIh61rYsLxA AFWBalOiVMVCiBkoeUIjbkvkZsWnj/zeZgXkQFd24YZzn0HuYWaIPmH7d5yWtOxWjGmj 9UemrvyuONv6lmrmaOdi9tJfNR2kfvmkK6eDVp8cgQeAfKho/5MvzQlr6k2OC2bV/yEH taIKNvDMU290FWL34klZR2sNJIGzlHKn5Cj3ZksRW/sHIndQmA6pCdsbGwSYAfhoKVme ZRVTbvIBYUmvYYWWptrT4/zNv+mCzBDHgPsuJOnHr9ygwUYtUGN9Aw1qF64u1B9DuTup FVBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=QJSR2L3ACgNkQWGaAX9N6EBwHmfuRFs2WIIFbyzteug=; fh=gEaMpTYvwvnMC5CvYLUtAKm5zP7cf+yYugUyy4hdq4w=; b=AwAd26yndi4fiiLYJKxkKlDtCsHtT76oOz1eEJszVmiQsJEBWTYG4FKo19ebGwL1l0 aUf0/vH5kSAs20IZxPrmgYfFhgO3z6E2KYBH0em0FrlxHv7y2wz/3zD3oLMB3fNy16hm Std6ThUifw5lM46kvYrI4Mz02IQ+qH18dnHn/Ul7hLCNpgvLR6ihaqwW4lU1U4Lnkq7g zZHrISXFD/qWtRAoTgf1LrBlNOrG1HzVne1cDx26q34Myn0H32KISXLWkUXtQCm6lzjw lNg25Q38RJlsSth96dsos82sn9HqtW9pe1/o5u9alxwTweDx2V4OlDZtsG1m1fT6Eo1T C0iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dd8dFNbr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id v3-20020a655c43000000b0053074c54c3fsi2848627pgr.868.2023.09.15.01.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 01:23:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dd8dFNbr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 752588567813; Fri, 15 Sep 2023 01:14:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233201AbjIOIOF (ORCPT + 32 others); Fri, 15 Sep 2023 04:14:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233112AbjIOINC (ORCPT ); Fri, 15 Sep 2023 04:13:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9837F2D45 for ; Fri, 15 Sep 2023 01:12:16 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPS id B242AC113C9; Fri, 15 Sep 2023 08:12:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694765530; bh=XMe4gH+B08X5RMvEPdEtSh9tiAuQiRRQ1ocx6OSJQ90=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=dd8dFNbrY2eKv5BRVvT9o7FRHU/OSRYHdQMWdGRr2AWBOEfhPNrC55aNndGAnVLvy FrBLQytKnx10TBNJqjIfDZEQmZw6vuYquqC0pa4MY4HDFampDtnptsz9kimaWeb2Gs xfoVYwrMArjX1NOqqC0cw6HAEMspStNvFUXpZsJeraImtsnaoA6/uJvBSaSWt3Gxyg k+/gSDp+B0M1rTgoHviUfPX7aN99M0OSsQKEPMGqktocnkzjXAvYOa4o1V118AKIey +WBonlUVjrcBwapo60n6fsxSARWMWQAfNeu2hxdd7syYJdGavqpkLKlTMBPBS7yfvJ fgrNojU9LJWGw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A084FEE6442; Fri, 15 Sep 2023 08:12:10 +0000 (UTC) From: Nikita Shubin via B4 Relay Date: Fri, 15 Sep 2023 11:11:24 +0300 Subject: [PATCH v4 42/42] ASoC: cirrus: edb93xx: Delete driver MIME-Version: 1.0 Message-Id: <20230915-ep93xx-v4-42-a1d779dcec10@maquefel.me> References: <20230915-ep93xx-v4-0-a1d779dcec10@maquefel.me> In-Reply-To: <20230915-ep93xx-v4-0-a1d779dcec10@maquefel.me> To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Alexander Sverdlin , Nikita Shubin , Arnd Bergmann , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Cc: Takashi Iwai , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Arnd Bergmann , Alexander Sverdlin X-Mailer: b4 0.13-dev-e3e53 X-Developer-Signature: v=1; a=ed25519-sha256; t=1694765525; l=5005; i=nikita.shubin@maquefel.me; s=20230718; h=from:subject:message-id; bh=5H/AhoUK+yJvLHtkGvg+ugJ2oZLcgzPnv9WeEQfV0LM=; =?utf-8?q?b=3DmRW5JHllCeDr?= =?utf-8?q?2+GVsnn0VnCeZcdbrCNIg/utv5YqO/00LhjkGtz4t+3jK1nbYNA+OLQtkKcu7SND?= 1C2oQEn3Df1lu2o2VOW9k8BbRop4tIde8JPYWLb18AFvmhYpnzLs X-Developer-Key: i=nikita.shubin@maquefel.me; a=ed25519; pk=vqf5YIUJ7BJv3EJFaNNxWZgGuMgDH6rwufTLflwU9ac= X-Endpoint-Received: by B4 Relay for nikita.shubin@maquefel.me/20230718 with auth_id=65 X-Original-From: Nikita Shubin Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 15 Sep 2023 01:14:18 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777091196922477321 X-GMAIL-MSGID: 1777091196922477321 From: Alexander Sverdlin Can be replaced with "simple-audio-card" for the rates up to 50kHz, refer to commit "ARM: dts: ep93xx: Add EDB9302 DT". Signed-off-by: Alexander Sverdlin Acked-by: Mark Brown Signed-off-by: Nikita Shubin --- sound/soc/cirrus/Kconfig | 9 ---- sound/soc/cirrus/Makefile | 4 -- sound/soc/cirrus/edb93xx.c | 117 --------------------------------------------- 3 files changed, 130 deletions(-) diff --git a/sound/soc/cirrus/Kconfig b/sound/soc/cirrus/Kconfig index 38a83c4dcc2d..97def4e53fbc 100644 --- a/sound/soc/cirrus/Kconfig +++ b/sound/soc/cirrus/Kconfig @@ -31,12 +31,3 @@ config SND_EP93XX_SOC_I2S_WATCHDOG endif # if SND_EP93XX_SOC_I2S -config SND_EP93XX_SOC_EDB93XX - tristate "SoC Audio support for Cirrus Logic EDB93xx boards" - depends on SND_EP93XX_SOC && (MACH_EDB9301 || MACH_EDB9302 || MACH_EDB9302A || MACH_EDB9307A || MACH_EDB9315A) - select SND_EP93XX_SOC_I2S - select SND_SOC_CS4271_I2C if I2C - select SND_SOC_CS4271_SPI if SPI_MASTER - help - Say Y or M here if you want to add support for I2S audio on the - Cirrus Logic EDB93xx boards. diff --git a/sound/soc/cirrus/Makefile b/sound/soc/cirrus/Makefile index 19a86daad660..5916c03888cb 100644 --- a/sound/soc/cirrus/Makefile +++ b/sound/soc/cirrus/Makefile @@ -6,7 +6,3 @@ snd-soc-ep93xx-i2s-objs := ep93xx-i2s.o obj-$(CONFIG_SND_EP93XX_SOC) += snd-soc-ep93xx.o obj-$(CONFIG_SND_EP93XX_SOC_I2S) += snd-soc-ep93xx-i2s.o -# EP93XX Machine Support -snd-soc-edb93xx-objs := edb93xx.o - -obj-$(CONFIG_SND_EP93XX_SOC_EDB93XX) += snd-soc-edb93xx.o diff --git a/sound/soc/cirrus/edb93xx.c b/sound/soc/cirrus/edb93xx.c deleted file mode 100644 index f49caab21a25..000000000000 --- a/sound/soc/cirrus/edb93xx.c +++ /dev/null @@ -1,117 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * SoC audio for EDB93xx - * - * Copyright (c) 2010 Alexander Sverdlin - * - * This driver support CS4271 codec being master or slave, working - * in control port mode, connected either via SPI or I2C. - * The data format accepted is I2S or left-justified. - * DAPM support not implemented. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -static int edb93xx_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params) -{ - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); - int err; - unsigned int mclk_rate; - unsigned int rate = params_rate(params); - - /* - * According to CS4271 datasheet we use MCLK/LRCK=256 for - * rates below 50kHz and 128 for higher sample rates - */ - if (rate < 50000) - mclk_rate = rate * 64 * 4; - else - mclk_rate = rate * 64 * 2; - - err = snd_soc_dai_set_sysclk(codec_dai, 0, mclk_rate, - SND_SOC_CLOCK_IN); - if (err) - return err; - - return snd_soc_dai_set_sysclk(cpu_dai, 0, mclk_rate, - SND_SOC_CLOCK_OUT); -} - -static const struct snd_soc_ops edb93xx_ops = { - .hw_params = edb93xx_hw_params, -}; - -SND_SOC_DAILINK_DEFS(hifi, - DAILINK_COMP_ARRAY(COMP_CPU("ep93xx-i2s")), - DAILINK_COMP_ARRAY(COMP_CODEC("spi0.0", "cs4271-hifi")), - DAILINK_COMP_ARRAY(COMP_PLATFORM("ep93xx-i2s"))); - -static struct snd_soc_dai_link edb93xx_dai = { - .name = "CS4271", - .stream_name = "CS4271 HiFi", - .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | - SND_SOC_DAIFMT_CBC_CFC, - .ops = &edb93xx_ops, - SND_SOC_DAILINK_REG(hifi), -}; - -static struct snd_soc_card snd_soc_edb93xx = { - .name = "EDB93XX", - .owner = THIS_MODULE, - .dai_link = &edb93xx_dai, - .num_links = 1, -}; - -static int edb93xx_probe(struct platform_device *pdev) -{ - struct snd_soc_card *card = &snd_soc_edb93xx; - int ret; - - ret = ep93xx_i2s_acquire(); - if (ret) - return ret; - - card->dev = &pdev->dev; - - ret = snd_soc_register_card(card); - if (ret) { - dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", - ret); - ep93xx_i2s_release(); - } - - return ret; -} - -static void edb93xx_remove(struct platform_device *pdev) -{ - struct snd_soc_card *card = platform_get_drvdata(pdev); - - snd_soc_unregister_card(card); - ep93xx_i2s_release(); -} - -static struct platform_driver edb93xx_driver = { - .driver = { - .name = "edb93xx-audio", - }, - .probe = edb93xx_probe, - .remove_new = edb93xx_remove, -}; - -module_platform_driver(edb93xx_driver); - -MODULE_AUTHOR("Alexander Sverdlin "); -MODULE_DESCRIPTION("ALSA SoC EDB93xx"); -MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:edb93xx-audio");