From patchwork Wed Oct 7 10:59:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 7344261 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8472C9F1B9 for ; Wed, 7 Oct 2015 11:00:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A0F6220616 for ; Wed, 7 Oct 2015 11:00:30 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 42EE520615 for ; Wed, 7 Oct 2015 11:00:29 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 63FA6265FD5; Wed, 7 Oct 2015 13:00:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 9E91B265C96; Wed, 7 Oct 2015 13:00:20 +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 52DE7265D47; Wed, 7 Oct 2015 13:00:19 +0200 (CEST) Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by alsa0.perex.cz (Postfix) with ESMTP id 31507265AFC for ; Wed, 7 Oct 2015 13:00:12 +0200 (CEST) Received: by mail.free-electrons.com (Postfix, from userid 110) id D11E6EE5; Wed, 7 Oct 2015 13:00:11 +0200 (CEST) Received: from localhost (unknown [89.101.192.72]) by mail.free-electrons.com (Postfix) with ESMTPSA id 9463E89; Wed, 7 Oct 2015 13:00:01 +0200 (CEST) From: Maxime Ripard To: Liam Girdwood , Mark Brown Date: Wed, 7 Oct 2015 11:59:58 +0100 Message-Id: <1444215598-13543-1-git-send-email-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.5.3 Cc: Emilio Lopez , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Maxime Ripard Subject: [alsa-devel] [PATCH] ASoC: sun4i-codec: Remove the routing property 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 X-Virus-Scanned: ClamAV using ClamSMTP Most of the boards have their headphone jack directly connected to the matching pins of the SoCs. Since most of the time we will have the same routing path, it makes no sense to put that in the DTS, since it will only be some useless duplication there. It also fixes the following warning messages that were seen so far, on boards where we were using the bindings in the documentation example. sun4i-codec 1c22c00.codec: ASoC: no sink widget found for Headphone Jack sun4i-codec 1c22c00.codec: ASoC: Failed to add route HP Left -> direct -> Headphone Jack sun4i-codec 1c22c00.codec: ASoC: no sink widget found for Headphone Jack sun4i-codec 1c22c00.codec: ASoC: Failed to add route HP Right -> direct -> Headphone Jack Reported-by: Priit Laes Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/sound/sun4i-codec.txt | 6 ------ sound/soc/sunxi/sun4i-codec.c | 7 ------- 2 files changed, 13 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/sun4i-codec.txt b/Documentation/devicetree/bindings/sound/sun4i-codec.txt index 680144b74ae9..c92966bd5488 100644 --- a/Documentation/devicetree/bindings/sound/sun4i-codec.txt +++ b/Documentation/devicetree/bindings/sound/sun4i-codec.txt @@ -13,10 +13,6 @@ Required properties: - clock-names: should contain followings: - "apb": the parent APB clock for this controller - "codec": the parent module clock -- routing : A list of the connections between audio components. Each - entry is a pair of strings, the first being the connection's sink, - the second being the connection's source. - Example: codec: codec@01c22c00 { @@ -28,6 +24,4 @@ codec: codec@01c22c00 { clock-names = "apb", "codec"; dmas = <&dma 0 19>, <&dma 0 19>; dma-names = "rx", "tx"; - routing = "Headphone Jack", "HP Right", - "Headphone Jack", "HP Left"; }; diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 47780552dcd0..bcbf4da168b6 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -571,7 +571,6 @@ static struct snd_soc_dai_link *sun4i_codec_create_link(struct device *dev, static struct snd_soc_card *sun4i_codec_create_card(struct device *dev) { struct snd_soc_card *card; - int ret; card = devm_kzalloc(dev, sizeof(*card), GFP_KERNEL); if (!card) @@ -584,12 +583,6 @@ static struct snd_soc_card *sun4i_codec_create_card(struct device *dev) card->dev = dev; card->name = "sun4i-codec"; - ret = snd_soc_of_parse_audio_routing(card, "routing"); - if (ret) { - dev_err(dev, "Failed to create our audio routing\n"); - return NULL; - } - return card; };