Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2843469pxa; Mon, 17 Aug 2020 22:24:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPk6fpF4bKn2h8sE9RqTtXrkBHloEsDYSrHZ/7K6gqujZ0+FvB4BnpkLQqeiOCL2pyR+fq X-Received: by 2002:a17:906:1a54:: with SMTP id j20mr19378495ejf.102.1597728295633; Mon, 17 Aug 2020 22:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597728295; cv=none; d=google.com; s=arc-20160816; b=f+nAF/Vxthhu2ZFcuMRhvr9EhEkZp1XN3JjalapnnbllWLrmSY1Lznwdsg875igGGI jz+PfPJUhbXIaxnOcoPkXodm4QfSO2XATiR+g6JfODlbWEbGkat4IVQ3pIG8DkFXSzuX CKJsPgBAT7G7SIS04aygEL2LjkzH88PUHuRMF+Vpq40f6eTI3PQLEEIqcpH/MLSWdLhj YW5CqyDw9j37zqzt51sos/2BpRYwW0a8mZhFVL5YXFojxNKMR8evAk7JlnHC9btjjJoI ZtzAa0KVHljcwdIlG+abbTPyAptFyb7sQTMhwAyeiZy1v2M+CY0aaTWJKBDWP995l834 wvBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date; bh=2s38bB8HBT7HXyeuu7uAsttpHoo8KgFZWfivYH995tc=; b=bBQK7rHNE/s0omwMj9o99eF/z5WGIk3Jh0tkRzHbhuY+lOVOOFYuSBuP/fHNngGHtn rabcKtIEuk9u72U6R97mARIrNokb5lQfRidsx8VMHAIjp1k4wFrvRA/X7zc/WvdDbMyS WQ4Y3DcPiXzoGC6QMluogobyMLdipq34M1V9gPoZ+HATbH4VShZz3ZYSz8+nMGPRWQe+ Ja1A3AMzEGYhj6h7Fud3F3Bb88I+4ZyDHO5EFBsps4XB1OG3h0zVOPVN2yCYd/Pu4XQm anSKQ9clGBzLBoz8OcxrjQZztCvC9uH3v2RlZCcLROsF/lxKxkpmOKSNMtZ4ocumJNrM euDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k24si12393379eji.404.2020.08.17.22.24.31; Mon, 17 Aug 2020 22:24:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726451AbgHRFXl (ORCPT + 99 others); Tue, 18 Aug 2020 01:23:41 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:2365 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726228AbgHRFXl (ORCPT ); Tue, 18 Aug 2020 01:23:41 -0400 Date: 18 Aug 2020 14:23:39 +0900 X-IronPort-AV: E=Sophos;i="5.76,326,1592838000"; d="scan'208";a="54623889" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 18 Aug 2020 14:23:39 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id BDD2541A7AD0; Tue, 18 Aug 2020 14:23:39 +0900 (JST) Message-ID: <87pn7ofs19.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Sameer Pujar Cc: , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v2 3/9] ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM In-Reply-To: <1596605064-27748-4-git-send-email-spujar@nvidia.com> References: <1596605064-27748-1-git-send-email-spujar@nvidia.com> <1596605064-27748-4-git-send-email-spujar@nvidia.com> User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi again > PCM devices are created for FE dai links with 'no-pcm' flag as '0'. > Such DAI links have CPU component which implement either pcm_construct() > or pcm_new() at component or dai level respectively. Based on this, > current patch exposes a helper function to identify such components > and populate 'no_pcm' flag for DPCM DAI link. > > This helps to have BE<->BE component links where PCM devices need > not be created for CPU component involved in such links. > > Signed-off-by: Sameer Pujar > --- (snip) > +static bool soc_component_is_pcm(struct snd_soc_dai_link_component *dlc) > +{ > + struct snd_soc_dai *dai = snd_soc_find_dai(dlc); > + > + if (dai && (dai->component->driver->pcm_construct || > + dai->driver->pcm_new)) > + return true; > + > + return false; > +} This snd_soc_find_dai() will indicate WARNING if .config has CONFIG_LOCKDEP for me. Maybe implement it at soc-core.c with client_mutex lock is needed. Thank you for your help !! Best regards --- Kuninori Morimoto