Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4492079rdb; Tue, 12 Dec 2023 00:26:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEARAvwxmRJuAtHZtsQKXmmJ1knwPV/9O6TxqlKAFaRH1o4wcRJzL/ZXxdRLEWaHo053+u7 X-Received: by 2002:a05:6870:2052:b0:1fb:373d:771d with SMTP id l18-20020a056870205200b001fb373d771dmr6889712oad.98.1702369585151; Tue, 12 Dec 2023 00:26:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702369585; cv=none; d=google.com; s=arc-20160816; b=RRlaf90NjEPeY75+BPccjK4lTxm04t+hxP4BS5VMG+X0Pjtuoa+1bbvg1NV/h6my6D V/+tXuzhQJL7CQIR6XsUH5KwLAy+Y3WARG0EbzVG3E4BzkbczOeepLK68Ocf1wjt7nZ0 Q6EPz8MiXiHYxtkRJZ33cb/N5R+fMUIP6NQKbOadesAyUlZh9fBS4lyH1geJQEU+Q/d6 BNmOoj5V3J+EP109/wKwsuNQkMkHaNI2zPPXQzJTsw+fLR5VUrqQXtxp0yvCAu2yy6lB sorgHQXRk2d2eT3TPGXEoHX1UWQYmG2R1BFysTVmbsIuTQOWc+EhZKQsbF9nlyEgY8eK tY0Q== 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=mFDVUNnfQEj1sG62t6xyG0PwEW36PTEnWzc3+eYhDo0=; fh=7B2gz16rU8WrMz/UjIe70XhZUVqw6MgmH8wFaDLpbrk=; b=WSM7Cn7YcPshO0MA2uv6wIWV3DAUTJ5mvvyTMWouUlty1HA+mxKd5qJqeCERT70V00 OlhP8RE2PuJaHkqksM2Ye1QxaUXhCr4haj6Q7JMev4YgEIwSa4+wlgoXpEGn4tZizpnh 78TMMJ8a7B/rQ2XaiWAg2sQ+Ad45+5jHLKAQwlcbLlSDj1MNnLsK7SnX+QNvvwbLcgNl saxSOS/t7x+GvA4UjHP33u54xPfCEqwUHHX1naztjqGfXpmWrstWzkvNocrjE9ZbGjl6 HXrWXb0UtWMpfBO5Mx7H7nS3xBUo9dKEmenWNcwy7OjM3spyVWSk6/7O9KZ72eCTmGTl tbQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VAvTX4+K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id 36-20020a631564000000b005af21fd2c6fsi7538856pgv.898.2023.12.12.00.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 00:26:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VAvTX4+K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 4AC998079DC7; Tue, 12 Dec 2023 00:25:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346197AbjLLIZB (ORCPT + 99 others); Tue, 12 Dec 2023 03:25:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346109AbjLLIWK (ORCPT ); Tue, 12 Dec 2023 03:22:10 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E1B1EE for ; Tue, 12 Dec 2023 00:22:10 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPS id 85038C433AB; Tue, 12 Dec 2023 08:22:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702369326; bh=Q3h1r7ii+HamifRwqVLAqzF9LWiWleZqbtI1y/YUAmo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=VAvTX4+KHb6EkghD/CNW8mh41qEa0jqpExcHF774r8jHRSb6Roildy4S/1bQkNds0 7Mk8Abpr4y7/fwpamAgkXLceqfmfk1K5PWWvgTVosK3XU4HcGemN/M7zhNWTTUGRXo 2Ad9Oeb0KWbl8kyeRXcGSxspvdvkH5urM7D4dyj/LVn0vEO/DHFi4+D+YsQlJbk5cZ wxXHNr3Q7QulKTXWXcRfv/9aFnT7VO0IXYY5UF65dGxb+T6tvDKL+jRZI5siXPoBB0 O/j+eImU2oilMYsPHdh7PpwG84wfdVa3HFBYogIUAWUUwgew4aDutxExbjYOdOwWtO 4JKmOSPRB+iPw== 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 75A9FC4167D; Tue, 12 Dec 2023 08:22:06 +0000 (UTC) From: Nikita Shubin via B4 Relay Date: Tue, 12 Dec 2023 11:20:56 +0300 Subject: [PATCH v6 39/40] ASoC: cirrus: edb93xx: Delete driver MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231212-ep93xx-v6-39-c307b8ac9aa8@maquefel.me> References: <20231212-ep93xx-v6-0-c307b8ac9aa8@maquefel.me> In-Reply-To: <20231212-ep93xx-v6-0-c307b8ac9aa8@maquefel.me> To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Alexander Sverdlin , Arnd Bergmann , Nikita Shubin , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Nicolas Ferre , Kuninori Morimoto Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Arnd Bergmann X-Mailer: b4 0.13-dev-e3e53 X-Developer-Signature: v=1; a=ed25519-sha256; t=1702369322; l=5014; i=nikita.shubin@maquefel.me; s=20230718; h=from:subject:message-id; bh=h2rduEcwWz7/6MY2gxmHuwdvmGLXXkP6apssDcKmh10=; =?utf-8?q?b=3DpZCxkKxhED6N?= =?utf-8?q?GOz9kH82UHaouqIO35KEu+X0kU/w2/ASkMXf0LRZkl0SWEfVD4txPfrYcfhKXiLl?= H6n6owmPDMPfhpcNUBAyjtUmdSzwMTeTySpO1iWlURNQYu1NBVDm 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=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Tue, 12 Dec 2023 00:25:40 -0800 (PST) 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 6b6817256331..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 = snd_soc_substream_to_rtd(substream); - struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); - struct snd_soc_dai *cpu_dai = snd_soc_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"); -- 2.41.0