From patchwork Mon Jul 6 13:38:08 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: 6724371 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 C6D9F9F319 for ; Mon, 6 Jul 2015 13:40:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 07A74206EA for ; Mon, 6 Jul 2015 13:40:01 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id C0AEE20524 for ; Mon, 6 Jul 2015 13:39:59 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id CE8AC2651E4; Mon, 6 Jul 2015 15:39:58 +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, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 77BCD2612BD; Mon, 6 Jul 2015 15:38:32 +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 A7937260870; Mon, 6 Jul 2015 15:38:29 +0200 (CEST) Received: from smtp-out-092.synserver.de (smtp-out-092.synserver.de [212.40.185.92]) by alsa0.perex.cz (Postfix) with ESMTP id 855ED260631 for ; Mon, 6 Jul 2015 15:38:21 +0200 (CEST) Received: (qmail 24908 invoked by uid 0); 6 Jul 2015 13:38:20 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 24664 Received: from ppp-188-174-59-27.dynamic.mnet-online.de (HELO lars-laptop.fritz.box) [188.174.59.27] by 217.119.54.81 with SMTP; 6 Jul 2015 13:38:20 -0000 From: Lars-Peter Clausen To: Mark Brown , Liam Girdwood Date: Mon, 6 Jul 2015 15:38:08 +0200 Message-Id: <1436189891-15343-3-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436189891-15343-1-git-send-email-lars@metafoo.de> References: <1436189891-15343-1-git-send-email-lars@metafoo.de> Cc: Oder Chiou , alsa-devel@alsa-project.org, Lars-Peter Clausen , Yang A Fang , Peter Ujfalusi , Bard Liao , Kevin Cernekee , Jarkko Nikula Subject: [alsa-devel] [PATCH 3/6] ASoC: omap3pandora: Use card DAPM context to access widgets 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 The dapm field of the snd_soc_codec struct will eventually be removed (replaced with the DAPM context from the component embedded inside the CODEC). Replace its usage with the card's DAPM context. The idea is that DAPM is hierarchical and with the card at the root it is possible to access widgets from other contexts through the card context. Signed-off-by: Lars-Peter Clausen --- sound/soc/omap/omap3pandora.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/omap/omap3pandora.c b/sound/soc/omap/omap3pandora.c index 076bec6..732e749 100644 --- a/sound/soc/omap/omap3pandora.c +++ b/sound/soc/omap/omap3pandora.c @@ -154,8 +154,7 @@ static const struct snd_soc_dapm_route omap3pandora_map[] = { static int omap3pandora_out_init(struct snd_soc_pcm_runtime *rtd) { - struct snd_soc_codec *codec = rtd->codec; - struct snd_soc_dapm_context *dapm = &codec->dapm; + struct snd_soc_dapm_context *dapm = &rtd->card->dapm; /* All TWL4030 output pins are floating */ snd_soc_dapm_nc_pin(dapm, "EARPIECE"); @@ -174,8 +173,7 @@ static int omap3pandora_out_init(struct snd_soc_pcm_runtime *rtd) static int omap3pandora_in_init(struct snd_soc_pcm_runtime *rtd) { - struct snd_soc_codec *codec = rtd->codec; - struct snd_soc_dapm_context *dapm = &codec->dapm; + struct snd_soc_dapm_context *dapm = &rtd->card->dapm; /* Not comnnected */ snd_soc_dapm_nc_pin(dapm, "HSMIC");