From patchwork Mon Feb 12 12:30:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 128005 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3165042ljc; Mon, 12 Feb 2018 04:34:31 -0800 (PST) X-Google-Smtp-Source: AH8x224T7Ec04vLxKwsMqcjs7z869pbjUpUd5saX5D4wwoV4hmDe49ZMFuYYqQtadusS5fy3u08w X-Received: by 10.28.135.142 with SMTP id j136mr3858079wmd.33.1518438871253; Mon, 12 Feb 2018 04:34:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518438871; cv=none; d=google.com; s=arc-20160816; b=PalSycOW9+nnXRDc8s6zA0pUVlKV4rEipX71zW+GBSGlOdvtKBGip5+V3nwG5iWsz+ Iwad/HG65fay5JIJWiXg2K3UGw/PX7zKEafgi2OSF1iNkC9jyzqcp3oF310qASajfZFj F5t9ukpDb5KwUuZvMgF4auU6PK7dOoDV4LY+BEZSLqiHrrdcKEdqT6Tnm0wtcdOw1PKb ZK0qHEt2SfQkQDS3v7qomOTelnQYunuXjL9WGJ0Rv8EyjeRbatN88hVDE4J/cqeFMFOr 6KjPGgMlQ+wfN4N49WHxvgjNlAbpYQeIh/QDlgqQ/KD5DYoayDTgEciEYexOnhjLo4h+ Iolw== 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=lZ2KR8I/vqO2LNIVUFz/oG36wFGF6jbQ+zfKcccgX8w=; b=fqDcr/cTF40+l0prF+lxaFKPiLvYpHLp0LeI9p8QQEaGVUmpNAjifM+yGIc89zqN4C ACywiKK66gCga1FZh3YV70RqiTC2yOJ6YxOOm4xVe07v78GpUdSSP2ZItDyrOwZjhp7Z dtUTaKCBgHvbuJ0oUNYA7W6nsEkBybr+abfVSQhMMcmEip5IUui7Y8HYpeDuQx2r7PnJ b15hKjUgux68Ax/WOCg1vH/pnikT8dL2+28vYwApriNqyRW1ahomovKX0MMz2Cc7Yewk i9Cdzt1gZrN5KLSZedok76UTyuLBHhEYRnsGCSZlaPN0FaSE7jWZlh37Uhmh0jnfiVlO VpgQ== 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=hlJzzL/Q; 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 j134si3458429wmj.237.2018.02.12.04.34.31; Mon, 12 Feb 2018 04:34:31 -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=hlJzzL/Q; 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 121EC26754E; Mon, 12 Feb 2018 13:33:22 +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 2B98C267943; Mon, 12 Feb 2018 13:33:21 +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 F104D26754D for ; Mon, 12 Feb 2018 13:30:43 +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=qOXG9bcfLDXyoXWb2MEzY5lVT9aYRD5gCgD1M1ulAqc=; b=hlJzzL/QoRFl ttH7s13FpgL3kqicqhbEYf6VPvJjIeq1OArex4K57WKyC05/QhTSu0S6Z4QvxYDYYbzbrEBAFu7Wh fnT8uFPJ4fWQjBP7JRG3uD4Crp1rrectcrYPlB9sbrr8kJS7D4BPmHjwm62ya34h/uyu/I42n3Fek X8t0I=; 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 1elDFo-000215-5c; Mon, 12 Feb 2018 12:30:40 +0000 Received: from broonie by debutante with local (Exim 4.90) (envelope-from ) id 1elDFn-0003GY-Nu; Mon, 12 Feb 2018 12:30:39 +0000 From: Mark Brown To: Kuninori Morimoto In-Reply-To: <87a7xjgb01.wl%kuninori.morimoto.gx@renesas.com> Message-Id: Date: Mon, 12 Feb 2018 12:30:39 +0000 Cc: alsa-devel@alsa-project.org, Mark Brown , Charles Keepax , Simon Subject: [alsa-devel] Applied "ASoC: cs47l24: 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: cs47l24: 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 48102b0426f6d134ebd9f2624d5d42d9e7a8a9fd Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 29 Jan 2018 02:44:44 +0000 Subject: [PATCH] ASoC: cs47l24: replace platform to component Now platform can be replaced to component, let's do it. This patch merges cs47l24_compr_platform into soc_codec_dev_cs47l24 Signed-off-by: Kuninori Morimoto Acked-by: Charles Keepax Tested-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/codecs/cs47l24.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/cs47l24.c b/sound/soc/codecs/cs47l24.c index be2750680838..3f34de5f800e 100644 --- a/sound/soc/codecs/cs47l24.c +++ b/sound/soc/codecs/cs47l24.c @@ -33,6 +33,8 @@ #include "wm_adsp.h" #include "cs47l24.h" +#define DRV_NAME "cs47l24-codec" + struct cs47l24_priv { struct arizona_priv core; struct arizona_fll fll[2]; @@ -1069,7 +1071,8 @@ static struct snd_soc_dai_driver cs47l24_dai[] = { static int cs47l24_open(struct snd_compr_stream *stream) { struct snd_soc_pcm_runtime *rtd = stream->private_data; - struct cs47l24_priv *priv = snd_soc_platform_get_drvdata(rtd->platform); + struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME); + struct cs47l24_priv *priv = snd_soc_component_get_drvdata(component); struct arizona *arizona = priv->core.arizona; int n_adsp; @@ -1177,6 +1180,16 @@ static unsigned int cs47l24_digital_vu[] = { ARIZONA_DAC_DIGITAL_VOLUME_4L, }; +static struct snd_compr_ops cs47l24_compr_ops = { + .open = cs47l24_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_cs47l24 = { .probe = cs47l24_codec_probe, .remove = cs47l24_codec_remove, @@ -1187,6 +1200,8 @@ static const struct snd_soc_codec_driver soc_codec_dev_cs47l24 = { .set_pll = cs47l24_set_fll, .component_driver = { + .name = DRV_NAME, + .compr_ops = &cs47l24_compr_ops, .controls = cs47l24_snd_controls, .num_controls = ARRAY_SIZE(cs47l24_snd_controls), .dapm_widgets = cs47l24_dapm_widgets, @@ -1196,20 +1211,6 @@ static const struct snd_soc_codec_driver soc_codec_dev_cs47l24 = { }, }; -static const struct snd_compr_ops cs47l24_compr_ops = { - .open = cs47l24_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 cs47l24_compr_platform = { - .compr_ops = &cs47l24_compr_ops, -}; - static int cs47l24_probe(struct platform_device *pdev) { struct arizona *arizona = dev_get_drvdata(pdev->dev.parent); @@ -1298,23 +1299,15 @@ static int cs47l24_probe(struct platform_device *pdev) if (ret < 0) goto err_dsp_irq; - ret = snd_soc_register_platform(&pdev->dev, &cs47l24_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_cs47l24, cs47l24_dai, ARRAY_SIZE(cs47l24_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: @@ -1328,7 +1321,6 @@ static int cs47l24_remove(struct platform_device *pdev) struct cs47l24_priv *cs47l24 = platform_get_drvdata(pdev); struct arizona *arizona = cs47l24->core.arizona; - snd_soc_unregister_platform(&pdev->dev); snd_soc_unregister_codec(&pdev->dev); pm_runtime_disable(&pdev->dev);