From patchwork Wed Jun 15 05:46:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeeja KP X-Patchwork-Id: 9177571 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DA6C8604DB for ; Wed, 15 Jun 2016 05:40:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA1B02831B for ; Wed, 15 Jun 2016 05:40:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BECFA28342; Wed, 15 Jun 2016 05:40:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C3F52831B for ; Wed, 15 Jun 2016 05:40:43 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 21367265334; Wed, 15 Jun 2016 07:40:40 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9A2202651FD; Wed, 15 Jun 2016 07:40: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 392A9265255; Wed, 15 Jun 2016 07:40:31 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by alsa0.perex.cz (Postfix) with ESMTP id 65A9B2651EB for ; Wed, 15 Jun 2016 07:40:24 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 14 Jun 2016 22:40:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,474,1459839600"; d="scan'208";a="828328867" Received: from kpjeeja-desk.iind.intel.com ([10.223.96.110]) by orsmga003.jf.intel.com with ESMTP; 14 Jun 2016 22:40:17 -0700 From: jeeja.kp@intel.com To: alsa-devel@alsa-project.org Date: Wed, 15 Jun 2016 11:16:55 +0530 Message-Id: <1465969615-29573-1-git-send-email-jeeja.kp@intel.com> X-Mailer: git-send-email 2.5.0 Cc: patches.audio@intel.com, Jeeja KP , broonie@kernel.org, Vinod Koul , liam.r.girdwood@intel.com Subject: [alsa-devel] [PATCH] ASoC: dapm: Fix to return correct path list in is_connected_ep. 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 From: Jeeja KP In is_connected_ep, when custom_stop_condition is true, need to return the correct paths instead of con which is 0. Fixes: 6742064aef7f('ASoC: dapm: support user-defined stop condition in dai_get_connected_widgets') Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul --- sound/soc/soc-dapm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index db781f6..3c3f027 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -1092,8 +1092,10 @@ static __always_inline int is_connected_ep(struct snd_soc_dapm_widget *widget, if (list) list_add_tail(&widget->work_list, list); - if (custom_stop_condition && custom_stop_condition(widget, dir)) - return con; + if (custom_stop_condition && custom_stop_condition(widget, dir)) { + widget->endpoints[dir] = 1; + return widget->endpoints[dir]; + } if ((widget->is_ep & SND_SOC_DAPM_DIR_TO_EP(dir)) && widget->connected) { widget->endpoints[dir] = snd_soc_dapm_suspend_check(widget);