From patchwork Mon Feb 12 12:46:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 128092 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3206346ljc; Mon, 12 Feb 2018 05:24:31 -0800 (PST) X-Google-Smtp-Source: AH8x226jv6lVjh9wni/Q7ogJKiCCEeV+4Gr6l5j9KjI8/jR+iXwBwbKXLISeNa2b2qLVy4D0f89c X-Received: by 10.28.202.6 with SMTP id a6mr3799208wmg.95.1518441871721; Mon, 12 Feb 2018 05:24:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518441871; cv=none; d=google.com; s=arc-20160816; b=ndDfmzjymkkMlfaIb8kAdr6xjhwqGnQHGpG0Hu6nFrD5kZhqoq1C/iZPIIk15NPARh ny+yVRJxo4f7pVFLjBTdzf64tFfs7bmjj4RW+3l1+NYgCzl8uxR7xQGskF9kH9ksOJiO N98V9wjRQLnUza6OfiSBC4lE9GfmJSEJb32Mc/YTJ6iTkUPvSHpQe1yrkl2Hb7DOlD9r +ITTfH6E9oVjducVTWuqYkuOvOtYhThekwu6Y7ZM3hUt1/gW/0jMXwv+zBNsJ+eELWer Kjw4sXiWfAyhNcnRnQ708ErAgJG5gTcB7ZsiuOXPj+4ywrQScQAkiBAn0LyRRFd8rCcT +XRA== 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=GaKBgWMsNkaE4l5UggXl0z8DL/IFYAlfFUJ6XF3hr3A=; b=LTDrY4o0ZOQs9u7PAhP/n3eD1liPGtcClbN+M+em8uPqTqLNMVhPzdd35TxcADSLCy KaBeyoIs1MsfimXMJFwQWBwc4MH7/2ggHlKsCvNa+64ddKdZpVa1CYeXA55kvUzf8CXA 1UUcPuqOyC6/uqDCrN86q9zUdqpwCD8FsaHqLbbKlb62Q8UzZyPaVJRSpJJF7Cz2bDFF gZBNfrO/55hQd5e/t49wU8poszbPmxMqhBgkEx5v9SY5FbH7VheUVaOw0C2X+GiPuwmU uy8w3zCfBDTECH+ZwEJ/6+62Kkw8fPE1GpjqE47PEMw+1bwvX/JEGhLl9PmVbOsu5rO3 lZnA== 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=C4aIDFMT; 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 39si6387796wrx.491.2018.02.12.05.24.31; Mon, 12 Feb 2018 05:24: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=C4aIDFMT; 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 A436A268879; Mon, 12 Feb 2018 14:21:36 +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 85485268877; Mon, 12 Feb 2018 14:21:35 +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 5545C267DA7 for ; Mon, 12 Feb 2018 13:46:23 +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=mc0Ug9vnvjycEA6prEEjqcWA6o8OKZLXoxqoDQ//ufg=; b=C4aIDFMTRlRP mJYiqs//rW5AyWOE9Q2I0jq1QRHQqkqIuHTTwguFHCz2VFu+wM5uLQU56ET/Tf1t+I3q2K8pUdZtd hUVskT6wZ0HP8jIbM9xtaJzoH23mpWUkbIwGQdAq141SpFfwmE+US9rKMUSK2zo3U+FgQWjNMRy30 GeZu4=; 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 1elDUz-0002Re-KM; Mon, 12 Feb 2018 12:46:21 +0000 Received: from broonie by debutante with local (Exim 4.90) (envelope-from ) id 1elDUz-0005US-5v; Mon, 12 Feb 2018 12:46:21 +0000 From: Mark Brown To: Kuninori Morimoto In-Reply-To: <87k1w12wcz.wl%kuninori.morimoto.gx@renesas.com> Message-Id: Date: Mon, 12 Feb 2018 12:46:21 +0000 Cc: alsa-devel@alsa-project.org, Mark Brown Subject: [alsa-devel] Applied "ASoC: wm1250-ev1: replace codec 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: wm1250-ev1: replace codec 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 39506cf83bb1b4df80dee1492f8cebc26cec355e Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 29 Jan 2018 03:12:02 +0000 Subject: [PATCH] ASoC: wm1250-ev1: replace codec to component Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/wm1250-ev1.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 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/wm1250-ev1.c b/sound/soc/codecs/wm1250-ev1.c index cf5f0580df6a..9727eec6d01b 100644 --- a/sound/soc/codecs/wm1250-ev1.c +++ b/sound/soc/codecs/wm1250-ev1.c @@ -32,10 +32,10 @@ struct wm1250_priv { struct gpio gpios[WM1250_EV1_NUM_GPIOS]; }; -static int wm1250_ev1_set_bias_level(struct snd_soc_codec *codec, +static int wm1250_ev1_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { - struct wm1250_priv *wm1250 = dev_get_drvdata(codec->dev); + struct wm1250_priv *wm1250 = dev_get_drvdata(component->dev); int ena; if (wm1250) @@ -81,7 +81,7 @@ static int wm1250_ev1_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { - struct wm1250_priv *wm1250 = snd_soc_codec_get_drvdata(dai->codec); + struct wm1250_priv *wm1250 = snd_soc_component_get_drvdata(dai->component); switch (params_rate(params)) { case 8000: @@ -141,15 +141,15 @@ static struct snd_soc_dai_driver wm1250_ev1_dai = { .ops = &wm1250_ev1_ops, }; -static const struct snd_soc_codec_driver soc_codec_dev_wm1250_ev1 = { - .component_driver = { - .dapm_widgets = wm1250_ev1_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(wm1250_ev1_dapm_widgets), - .dapm_routes = wm1250_ev1_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(wm1250_ev1_dapm_routes), - }, - .set_bias_level = wm1250_ev1_set_bias_level, - .idle_bias_off = true, +static const struct snd_soc_component_driver soc_component_dev_wm1250_ev1 = { + .dapm_widgets = wm1250_ev1_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm1250_ev1_dapm_widgets), + .dapm_routes = wm1250_ev1_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm1250_ev1_dapm_routes), + .set_bias_level = wm1250_ev1_set_bias_level, + .use_pmdown_time = 1, + .endianness = 1, + .non_legacy_dai_naming = 1, }; static int wm1250_ev1_pdata(struct i2c_client *i2c) @@ -224,7 +224,7 @@ static int wm1250_ev1_probe(struct i2c_client *i2c, if (ret != 0) return ret; - ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_wm1250_ev1, + ret = devm_snd_soc_register_component(&i2c->dev, &soc_component_dev_wm1250_ev1, &wm1250_ev1_dai, 1); if (ret != 0) { dev_err(&i2c->dev, "Failed to register CODEC: %d\n", ret); @@ -237,7 +237,6 @@ static int wm1250_ev1_probe(struct i2c_client *i2c, static int wm1250_ev1_remove(struct i2c_client *i2c) { - snd_soc_unregister_codec(&i2c->dev); wm1250_ev1_free(i2c); return 0;