From patchwork Thu Jun 4 14:13:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 6547531 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A0647C0020 for ; Thu, 4 Jun 2015 14:14:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4FAA2078C for ; Thu, 4 Jun 2015 14:14:38 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 8681A20795 for ; Thu, 4 Jun 2015 14:14:37 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1DBB226649A; Thu, 4 Jun 2015 16:14:31 +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=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 7905326657F; Thu, 4 Jun 2015 16:14:24 +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 20D122606AB; Thu, 4 Jun 2015 16:14:19 +0200 (CEST) Received: from smtp-out-080.synserver.de (smtp-out-080.synserver.de [212.40.185.80]) by alsa0.perex.cz (Postfix) with ESMTP id 9EC452665A3 for ; Thu, 4 Jun 2015 16:14:03 +0200 (CEST) Received: (qmail 25035 invoked by uid 0); 4 Jun 2015 14:14:03 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 24828 Received: from ppp-188-174-110-9.dynamic.mnet-online.de (HELO lars-laptop.fritz.box) [188.174.110.9] by 217.119.54.96 with SMTP; 4 Jun 2015 14:14:03 -0000 From: Lars-Peter Clausen To: Mark Brown , Liam Girdwood Date: Thu, 4 Jun 2015 16:13:51 +0200 Message-Id: <1433427231-21756-1-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 2.1.4 Cc: Peter Ujfalusi , alsa-devel@alsa-project.org, Lars-Peter Clausen , Jarkko Nikula Subject: [alsa-devel] [PATCH] ASoC: rx51: Automatically disconnect non-connected pins 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 According to the schematics the external speaker is differential, so the HPLCOM and HPRCOM pins of the CODEC should be connected to it. Otherwise the routing looks complete, so add the missing routes and set the fully_routed flag of the card instead of manually marking the unused inputs and outputs as not connected. This makes the code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen Acked-by: Jarkko Nikula Tested-by: Jarkko Nikula Reviewed-by: Peter Ujfalusi --- sound/soc/omap/rx51.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c index fded993..3bebfb1 100644 --- a/sound/soc/omap/rx51.c +++ b/sound/soc/omap/rx51.c @@ -245,6 +245,8 @@ static const struct snd_soc_dapm_widget aic34_dapm_widgets[] = { static const struct snd_soc_dapm_route audio_map[] = { {"Ext Spk", NULL, "HPLOUT"}, {"Ext Spk", NULL, "HPROUT"}, + {"Ext Spk", NULL, "HPLCOM"}, + {"Ext Spk", NULL, "HPRCOM"}, {"Headphone Jack", NULL, "LLOUT"}, {"Headphone Jack", NULL, "RLOUT"}, {"FM Transmitter", NULL, "LLOUT"}, @@ -288,15 +290,8 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) struct snd_soc_codec *codec = rtd->codec; struct snd_soc_card *card = rtd->card; struct rx51_audio_pdata *pdata = snd_soc_card_get_drvdata(card); - - struct snd_soc_dapm_context *dapm = &codec->dapm; int err; - /* Set up NC codec pins */ - snd_soc_dapm_nc_pin(dapm, "MIC3L"); - snd_soc_dapm_nc_pin(dapm, "MIC3R"); - snd_soc_dapm_nc_pin(dapm, "LINE1R"); - err = tpa6130a2_add_controls(codec); if (err < 0) { dev_err(card->dev, "Failed to add TPA6130A2 controls\n"); @@ -383,6 +378,7 @@ static struct snd_soc_card rx51_sound_card = { .num_aux_devs = ARRAY_SIZE(rx51_aux_dev), .codec_conf = rx51_codec_conf, .num_configs = ARRAY_SIZE(rx51_codec_conf), + .fully_routed = true, .controls = aic34_rx51_controls, .num_controls = ARRAY_SIZE(aic34_rx51_controls),