From patchwork Wed Jun 27 11:30:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 140313 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp742507ljj; Wed, 27 Jun 2018 04:30:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdEroOczY4h3nMVLMbQdIlMdwRE3QBIBlmX/9EhAtQe6QzTbYD9tUdvAB/KslNS+B/xej6N X-Received: by 2002:adf:8701:: with SMTP id a1-v6mr5082900wra.178.1530099046136; Wed, 27 Jun 2018 04:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530099046; cv=none; d=google.com; s=arc-20160816; b=pI4IJkPtt/6tzMG0V5PXHet0fy0eBBHZzZ1NHGdf0/4Jxob0ITx/bBBleFuT2HOjwf 5n24wvNE118SE+0l+o5GDjEsDLQfj78arHzlb/0mqzgSQIhjyz/1fMkn3AgOKz5DZQus kDOZUgKGAS2JE5vyy3ZyIbUsSOaeyYQy56DzjZbBkb+5DuOW/UQwRtUwBkNGFNjNm9wu zMHbLKth8Cs29s6Xluex50GDWRxkhRlbBO4aZglHhs0PXIVj6gf5f5EC7khBYCZ+/PS0 kksj7tU7tbPeNoWI3P7hXLihKH+HkDAFzcVhE7LM7BEt9txddEyWruUSzOlfpwJRDVWX +0bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=4JXGFVLBuyEcEzfKlCMbkEgDfeDesBDe2288c2Q2dfs=; b=0wtmDjtu9iHAE669Glhgef4VLnntc4sTe2tZ0ZEtVLPZR6C7tQpAtj2eOsSN8MCE/C shV611asdivxFCmZwBa52cea+qfoNeOsAIcAt1zAy23gN8Mnxf9wQh5/B2Gzfl9FoSk6 7AKrJNsZQcZ+gBSmWN3Kb1XN4AS1zNGTfG6xO8ScSGX44ejEj/EIf6m7Rkpu4ulGxiYY O5BLQb8beHCbJjhoQmlV0SriWdP2p/H9byZ8Obv2v66wzqlW9eXjV2xCV8nz/0Vjwl3t oDYA7gWnfCpu4E7KjliOcbq6vuVVRCst0hzUGg5FqWXioQGehNdIq7lPY5Wk1PwTjdkJ uCUQ== 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=pvySW0aK; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id d66-v6si4088268wma.98.2018.06.27.04.30.45; Wed, 27 Jun 2018 04:30:46 -0700 (PDT) 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=pvySW0aK; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 4892C26798A; Wed, 27 Jun 2018 13:30:31 +0200 (CEST) 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 743B9267984; Wed, 27 Jun 2018 13:30:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: * X-Spam-Status: No, score=1.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_WEB, SPF_PASS 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 E1163267985 for ; Wed, 27 Jun 2018 13:30:25 +0200 (CEST) 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=Mx80lpLuZ1/0wRUS+xyhUzKiBR6fjMsk+hTFDZ8s5hI=; b=pvySW0aK+TOL JaOeZimm7ZmbqRTcJGSIhANBZl76gleFCAWS0xM7TxeF6oqymmzAv5KWjTeK6SUIZKxua5cCOYnjj hUcxTFnWjmNkMc21Ui7n5998I8Gl1xgFA4TWH5SycgxwWEIz02TSn7+wP1AkJm+8wvz+X+yq/oahG 9Vq6Q=; Received: from 188.29.164.103.threembb.co.uk ([188.29.164.103] helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fY8eX-0002ve-9E; Wed, 27 Jun 2018 11:30:25 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id E45B3440070; Wed, 27 Jun 2018 12:30:23 +0100 (BST) From: Mark Brown To: Jerome Brunet In-Reply-To: Message-Id: <20180627113023.E45B3440070@finisterre.ee.mobilebroadband> Date: Wed, 27 Jun 2018 12:30:23 +0100 (BST) Cc: alsa-devel@alsa-project.org, Mark Brown Subject: [alsa-devel] Applied "ASoC: simple-amplifier: rename dio2125 to simple-amplifer" 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: simple-amplifier: rename dio2125 to simple-amplifer 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 8d881bb6216d28896112bdc0b42f1f21eb6cd4ee Mon Sep 17 00:00:00 2001 From: Jerome Brunet Date: Tue, 26 Jun 2018 14:11:27 +0200 Subject: [PATCH] ASoC: simple-amplifier: rename dio2125 to simple-amplifer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dio2125 is simple enough that we can make it a generic component. Just rename and sed the dio2125 amplifier driver to simple_amplifier. Suggested-by: Nicolò Veronese Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown --- sound/soc/codecs/Kconfig | 10 ++--- sound/soc/codecs/Makefile | 4 +- .../codecs/{dio2125.c => simple-amplifier.c} | 41 ++++++++++--------- 3 files changed, 28 insertions(+), 27 deletions(-) rename sound/soc/codecs/{dio2125.c => simple-amplifier.c} (69%) -- 2.17.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index f6b8d4bf8796..53c2d726bedf 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -74,7 +74,6 @@ config SND_SOC_ALL_CODECS select SND_SOC_DA7219 if I2C select SND_SOC_DA732X if I2C select SND_SOC_DA9055 if I2C - select SND_SOC_DIO2125 select SND_SOC_DMIC if GPIOLIB select SND_SOC_ES8316 if I2C select SND_SOC_ES8328_SPI if SPI_MASTER @@ -144,6 +143,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_RT5682 if I2C select SND_SOC_SGTL5000 if I2C select SND_SOC_SI476X if MFD_SI476X_CORE + select SND_SOC_SIMPLE_AMPLIFIER select SND_SOC_SIRF_AUDIO_CODEC select SND_SOC_SPDIF select SND_SOC_SSM2305 @@ -573,10 +573,6 @@ config SND_SOC_DA732X config SND_SOC_DA9055 tristate -config SND_SOC_DIO2125 - tristate "Dioo DIO2125 Amplifier" - select GPIOLIB - config SND_SOC_DMIC tristate @@ -897,6 +893,10 @@ config SND_SOC_SIGMADSP_REGMAP tristate select SND_SOC_SIGMADSP +config SND_SOC_SIMPLE_AMPLIFIER + tristate "Simple Audio Amplifier" + select GPIOLIB + config SND_SOC_SIRF_AUDIO_CODEC tristate "SiRF SoC internal audio codec" select REGMAP_MMIO diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile index e43d99a039d3..f26ded89a1e5 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -250,9 +250,9 @@ snd-soc-wm9713-objs := wm9713.o snd-soc-wm-hubs-objs := wm_hubs.o snd-soc-zx-aud96p22-objs := zx_aud96p22.o # Amp -snd-soc-dio2125-objs := dio2125.o snd-soc-max9877-objs := max9877.o snd-soc-max98504-objs := max98504.o +snd-soc-simple-amplifier-objs := simple-amplifier.o snd-soc-tpa6130a2-objs := tpa6130a2.o snd-soc-tas2552-objs := tas2552.o @@ -509,7 +509,7 @@ obj-$(CONFIG_SND_SOC_WM_HUBS) += snd-soc-wm-hubs.o obj-$(CONFIG_SND_SOC_ZX_AUD96P22) += snd-soc-zx-aud96p22.o # Amp -obj-$(CONFIG_SND_SOC_DIO2125) += snd-soc-dio2125.o obj-$(CONFIG_SND_SOC_MAX9877) += snd-soc-max9877.o obj-$(CONFIG_SND_SOC_MAX98504) += snd-soc-max98504.o +obj-$(CONFIG_SND_SOC_SIMPLE_AMPLIFIER) += snd-soc-simple-amplifier.o obj-$(CONFIG_SND_SOC_TPA6130A2) += snd-soc-tpa6130a2.o diff --git a/sound/soc/codecs/dio2125.c b/sound/soc/codecs/simple-amplifier.c similarity index 69% rename from sound/soc/codecs/dio2125.c rename to sound/soc/codecs/simple-amplifier.c index 09451cd44f9b..6c27d4afaf3a 100644 --- a/sound/soc/codecs/dio2125.c +++ b/sound/soc/codecs/simple-amplifier.c @@ -21,9 +21,9 @@ #include #include -#define DRV_NAME "dio2125" +#define DRV_NAME "simple-amplifier" -struct dio2125 { +struct simple_amp { struct gpio_desc *gpiod_enable; }; @@ -31,7 +31,7 @@ static int drv_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *control, int event) { struct snd_soc_component *c = snd_soc_dapm_to_component(w->dapm); - struct dio2125 *priv = snd_soc_component_get_drvdata(c); + struct simple_amp *priv = snd_soc_component_get_drvdata(c); int val; switch (event) { @@ -51,7 +51,7 @@ static int drv_event(struct snd_soc_dapm_widget *w, return 0; } -static const struct snd_soc_dapm_widget dio2125_dapm_widgets[] = { +static const struct snd_soc_dapm_widget simple_amp_dapm_widgets[] = { SND_SOC_DAPM_INPUT("INL"), SND_SOC_DAPM_INPUT("INR"), SND_SOC_DAPM_OUT_DRV_E("DRV", SND_SOC_NOPM, 0, 0, NULL, 0, drv_event, @@ -60,24 +60,24 @@ static const struct snd_soc_dapm_widget dio2125_dapm_widgets[] = { SND_SOC_DAPM_OUTPUT("OUTR"), }; -static const struct snd_soc_dapm_route dio2125_dapm_routes[] = { +static const struct snd_soc_dapm_route simple_amp_dapm_routes[] = { { "DRV", NULL, "INL" }, { "DRV", NULL, "INR" }, { "OUTL", NULL, "DRV" }, { "OUTR", NULL, "DRV" }, }; -static const struct snd_soc_component_driver dio2125_component_driver = { - .dapm_widgets = dio2125_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(dio2125_dapm_widgets), - .dapm_routes = dio2125_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(dio2125_dapm_routes), +static const struct snd_soc_component_driver simple_amp_component_driver = { + .dapm_widgets = simple_amp_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(simple_amp_dapm_widgets), + .dapm_routes = simple_amp_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(simple_amp_dapm_routes), }; -static int dio2125_probe(struct platform_device *pdev) +static int simple_amp_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct dio2125 *priv; + struct simple_amp *priv; int err; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); @@ -93,28 +93,29 @@ static int dio2125_probe(struct platform_device *pdev) return err; } - return devm_snd_soc_register_component(dev, &dio2125_component_driver, + return devm_snd_soc_register_component(dev, + &simple_amp_component_driver, NULL, 0); } #ifdef CONFIG_OF -static const struct of_device_id dio2125_ids[] = { +static const struct of_device_id simple_amp_ids[] = { { .compatible = "dioo,dio2125", }, { } }; -MODULE_DEVICE_TABLE(of, dio2125_ids); +MODULE_DEVICE_TABLE(of, simple_amp_ids); #endif -static struct platform_driver dio2125_driver = { +static struct platform_driver simple_amp_driver = { .driver = { .name = DRV_NAME, - .of_match_table = of_match_ptr(dio2125_ids), + .of_match_table = of_match_ptr(simple_amp_ids), }, - .probe = dio2125_probe, + .probe = simple_amp_probe, }; -module_platform_driver(dio2125_driver); +module_platform_driver(simple_amp_driver); -MODULE_DESCRIPTION("ASoC DIO2125 output driver"); +MODULE_DESCRIPTION("ASoC Simple Audio Amplifier driver"); MODULE_AUTHOR("Jerome Brunet "); MODULE_LICENSE("GPL");