From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECD6DC4727E for ; Thu, 1 Oct 2020 17:33:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B5B8720897 for ; Thu, 1 Oct 2020 17:33:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="aWKbsPji" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732940AbgJARdr (ORCPT ); Thu, 1 Oct 2020 13:33:47 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:9942 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732876AbgJARdr (ORCPT ); Thu, 1 Oct 2020 13:33:47 -0400 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Thu, 01 Oct 2020 10:32:55 -0700 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 1 Oct 2020 17:33:44 +0000 Received: from audio.nvidia.com (10.124.1.5) by mail.nvidia.com (172.20.187.18) with Microsoft SMTP Server id 15.0.1473.3 via Frontend Transport; Thu, 1 Oct 2020 17:33:38 +0000 From: Sameer Pujar To: , , , , , , , , CC: , , , , , , , , , , , , , Sameer Pujar Subject: [PATCH v3 02/13] ASoC: soc-pcm: Get all BEs along DAPM path Date: Thu, 1 Oct 2020 23:02:56 +0530 Message-ID: <1601573587-15288-3-git-send-email-spujar@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1601573587-15288-1-git-send-email-spujar@nvidia.com> References: <1601573587-15288-1-git-send-email-spujar@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1601573575; bh=3W6UwWfLG2y91GsD4wxpT6TKLXhYsYzkiLpXPArPYYQ=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Type; b=aWKbsPjiYcs+eBs60mOl5T1fCxii/NCGDY3P6oZ31iiqIW05HFPv2FdgXWbWa8UGi 7isM0+VMPdy7ZmFBmp9ekCXqBlGB9SMUuNtE4PsMElp79OIIxXjCpcWJl5PVDC7irE uZP2Pd8M9VlBNEP/sw4qZNxwXCHO8JVh5vrbjhbldNx1kkkJKZRvWH9dxiAzlcOfKZ wi8pAY5J/U8ZEDHdjUkgxwgwj0ACtW00WCh2iVV+kxRZNUvwo/Sr1XsLNQp04bp1is TzbJ1q5vE+++Whpz052t770g1QqxSzDgA2VxNX853NYEEZHukqGYr8yXBus3T89gX2 HBvgPw5jq9jNQ== Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org dpcm_end_walk_at_be() stops the graph walk when first BE is found for the given FE component. In a component model we may want to connect multiple DAIs from different components. A new flag is introduced in 'snd_soc_card', which when set allows DAI/component chaining. Later PCM operations can be called for all these listed components for a valid DAPM path. Signed-off-by: Sameer Pujar --- include/sound/soc.h | 1 + sound/soc/soc-pcm.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 3b038c5..9b69d70 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1084,6 +1084,7 @@ struct snd_soc_card { unsigned int fully_routed:1; unsigned int disable_route_checks:1; unsigned int probed:1; + unsigned int component_chaining:1; void *drvdata; }; diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 09e8d70..25904b8 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1283,7 +1283,8 @@ int dpcm_path_get(struct snd_soc_pcm_runtime *fe, /* get number of valid DAI paths and their widgets */ paths = snd_soc_dapm_dai_get_connected_widgets(cpu_dai, stream, list, - dpcm_end_walk_at_be); + fe->card->component_chaining ? + NULL : dpcm_end_walk_at_be); dev_dbg(fe->dev, "ASoC: found %d audio %s paths\n", paths, stream ? "capture" : "playback"); -- 2.7.4