From patchwork Mon Feb 12 12:29:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 128003 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3164520ljc; Mon, 12 Feb 2018 04:33:54 -0800 (PST) X-Google-Smtp-Source: AH8x224eaqruvaxQ8jF8YzuBRLD6Rd23LReTFoQ+z4nsMrqOSaWMBkL3I1SAd3v/KDHe1vkdQzJ/ X-Received: by 10.223.161.27 with SMTP id o27mr9108407wro.97.1518438834232; Mon, 12 Feb 2018 04:33:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518438834; cv=none; d=google.com; s=arc-20160816; b=bN9lrV1LKTcx9YDvz7YaRcI6RmJ+G1hksM3jxm5lrFIV7OPYpKY553Od/PaUiwmLEk tIwHG3DOAvYqnNG+hMsVaVz/8QmsYy7boXcYTfGh/QyNcMSjteKxjPeIuoxQEgkbTlz8 +bMIs3pU9JNR6dxVZFvfjnQqCR0oAMmjxL/+kKthBSf42Gg30+c2KXb8Twf84gcUmfpY nJrHFNHn3Wx1AH9t5aoFXOCsbKj87qZqgjjxFpYs4Dv1TzefL2um/dpOk74pOnQJoQZd BiFEh5en6ISWudD3+gFXbVsK7TqixX1Q08HcEc88IIVLqPXbKT1qxNVdFMvJkMwWwhhc RRvA== 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=xzhybKetI2WgpFkVr3SUHDNh3KmjjE6niL8usxdCBK8=; b=wVq2IP79OJJ63TjFJSSh8+HMgUlPdz04icDiOoMbLeBjYAvdiQuW82Hv0sgPuW4fnI MbpgwdECdW9ynkVAvZMmKkcXddCdR5famN4dj93m4MVRK8An/fO/sGXFWpegS91B3l1Z QU8mCNtLl3ZgzQjCW/nsTJTc4DNrpgzDXCWPSDm+SM+DFgvJjDW4/YlsAccnHXZpxm6y QdSA7cVlHTSzYhfM0kzW5SDAJwlTfhgZSZQs2Rtb1+Y0uMqQbc+sdM8r/oIC3xMWgzBT Vt6dyLSQgHoKy/Jhhwc+tzg6EmJsEEsooe9+b+dc05z9gNBadTJXiH24e5n3OVsLahrI irnA== 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=dx9qNrYI; 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 u16si16316wrg.462.2018.02.12.04.33.53; Mon, 12 Feb 2018 04:33:54 -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=dx9qNrYI; 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 024D6267889; Mon, 12 Feb 2018 13:31:54 +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 C43F926787E; Mon, 12 Feb 2018 13:31:52 +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 8EC402675B1 for ; Mon, 12 Feb 2018 13:30:04 +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=I0cRq2HeRXBIwDBD6PeFbiWPcEIJAifsiroTdaLGAhU=; b=dx9qNrYIob3L g+HHKW5hNFaxffY4wiT2RLmLAb98Y8UkDEAYzfQZEhnGCE2550AjYLYbqQIvijPm297yjlgiskXZr fbgaMEm/sgG3cidw/IJx5Su3VglKakoUrfyBowwNHCms1Gnsmu1z1pGwTiinRG3oy0ohdf2fuO+jl WP2bc=; 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 1elDFA-00020H-1k; Mon, 12 Feb 2018 12:30:00 +0000 Received: from broonie by debutante with local (Exim 4.90) (envelope-from ) id 1elDF9-0003C1-Jb; Mon, 12 Feb 2018 12:29:59 +0000 From: Mark Brown To: Kuninori Morimoto In-Reply-To: <876087gayo.wl%kuninori.morimoto.gx@renesas.com> Message-Id: Date: Mon, 12 Feb 2018 12:29:59 +0000 Cc: alsa-devel@alsa-project.org, Mark Brown , Charles Keepax , Simon Subject: [alsa-devel] Applied "ASoC: wm5102: replace platform to component" 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: wm5102: replace platform to component 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 a20863256f88513b3ba97484179911c2b9aa5dfd Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 29 Jan 2018 02:45:48 +0000 Subject: [PATCH] ASoC: wm5102: replace platform to component Now platform can be replaced to component, let's do it. This patch merges wm5102_compr_platform into soc_codec_dev_wm5102 Signed-off-by: Kuninori Morimoto Acked-by: Charles Keepax Tested-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/wm5102.c | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 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/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index fc066caa1918..a568050090ad 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c @@ -34,6 +34,8 @@ #include "wm5102.h" #include "wm_adsp.h" +#define DRV_NAME "wm5102-codec" + struct wm5102_priv { struct arizona_priv core; struct arizona_fll fll[2]; @@ -1910,7 +1912,8 @@ static struct snd_soc_dai_driver wm5102_dai[] = { static int wm5102_open(struct snd_compr_stream *stream) { struct snd_soc_pcm_runtime *rtd = stream->private_data; - struct wm5102_priv *priv = snd_soc_platform_get_drvdata(rtd->platform); + struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME); + struct wm5102_priv *priv = snd_soc_component_get_drvdata(component); return wm_adsp_compr_open(&priv->core.adsp[0], stream); } @@ -1992,6 +1995,16 @@ static unsigned int wm5102_digital_vu[] = { ARIZONA_DAC_DIGITAL_VOLUME_5R, }; +static struct snd_compr_ops wm5102_compr_ops = { + .open = wm5102_open, + .free = wm_adsp_compr_free, + .set_params = wm_adsp_compr_set_params, + .get_caps = wm_adsp_compr_get_caps, + .trigger = wm_adsp_compr_trigger, + .pointer = wm_adsp_compr_pointer, + .copy = wm_adsp_compr_copy, +}; + static const struct snd_soc_codec_driver soc_codec_dev_wm5102 = { .probe = wm5102_codec_probe, .remove = wm5102_codec_remove, @@ -2002,6 +2015,8 @@ static const struct snd_soc_codec_driver soc_codec_dev_wm5102 = { .set_pll = wm5102_set_fll, .component_driver = { + .name = DRV_NAME, + .compr_ops = &wm5102_compr_ops, .controls = wm5102_snd_controls, .num_controls = ARRAY_SIZE(wm5102_snd_controls), .dapm_widgets = wm5102_dapm_widgets, @@ -2011,20 +2026,6 @@ static const struct snd_soc_codec_driver soc_codec_dev_wm5102 = { }, }; -static const struct snd_compr_ops wm5102_compr_ops = { - .open = wm5102_open, - .free = wm_adsp_compr_free, - .set_params = wm_adsp_compr_set_params, - .get_caps = wm_adsp_compr_get_caps, - .trigger = wm_adsp_compr_trigger, - .pointer = wm_adsp_compr_pointer, - .copy = wm_adsp_compr_copy, -}; - -static const struct snd_soc_platform_driver wm5102_compr_platform = { - .compr_ops = &wm5102_compr_ops, -}; - static int wm5102_probe(struct platform_device *pdev) { struct arizona *arizona = dev_get_drvdata(pdev->dev.parent); @@ -2109,23 +2110,15 @@ static int wm5102_probe(struct platform_device *pdev) if (ret < 0) goto err_dsp_irq; - ret = snd_soc_register_platform(&pdev->dev, &wm5102_compr_platform); - if (ret < 0) { - dev_err(&pdev->dev, "Failed to register platform: %d\n", ret); - goto err_spk_irqs; - } - ret = snd_soc_register_codec(&pdev->dev, &soc_codec_dev_wm5102, wm5102_dai, ARRAY_SIZE(wm5102_dai)); if (ret < 0) { dev_err(&pdev->dev, "Failed to register codec: %d\n", ret); - goto err_platform; + goto err_spk_irqs; } return ret; -err_platform: - snd_soc_unregister_platform(&pdev->dev); err_spk_irqs: arizona_free_spk_irqs(arizona); err_dsp_irq: @@ -2139,7 +2132,6 @@ static int wm5102_remove(struct platform_device *pdev) struct wm5102_priv *wm5102 = platform_get_drvdata(pdev); struct arizona *arizona = wm5102->core.arizona; - snd_soc_unregister_platform(&pdev->dev); snd_soc_unregister_codec(&pdev->dev); pm_runtime_disable(&pdev->dev);