Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3383332ybt; Tue, 30 Jun 2020 01:05:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziloBjm1sKb+rY+UPZg/cUsgV8N5Cbck2Z6+3O6d9jvlQTCXSZPnrv5HnbmePpuaW5xMFn X-Received: by 2002:a17:906:840a:: with SMTP id n10mr16685565ejx.453.1593504307013; Tue, 30 Jun 2020 01:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593504307; cv=none; d=google.com; s=arc-20160816; b=mAvzsJEO7/vPjPfQj4wDNK88vjxjPbzUYFUDd19kIgJgv73pvOk6F5oflmWLDAKVJg x1b5TRpVD7Ak3gr8lTkT0lPzDIKjbEeR0z5D/LCoq5czZ2Q3PmmJs4EVpBrqYf8DMk5K XbqFVb9VVcgc2PHnoB11A07RRZJJym9iuSyBYK320OhyOrjsXJ48gjEC9LVYOCzvFsL5 wYZUMWxggcBbRFAeoukGRr4jk78ZnzTieo2qFHC/mbD1ej/2fzsr6+9cTVFYlhQYpB9G nZLNc8WNriG2baJGVsM0DxKkhISGecLCh9bA0p31W1rtuiFHQolSNFkG2lUjndx46blX Ow8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:cc; bh=DnKjNwH/guC7EJEpkXLjFlHpxsWMMzSc4XkpFzGQbAg=; b=XcosP2aGR/Ng0kFrHGOKwohojgWICt8LH8M3V+aKP30bXlarftHY4xRql66UOdGpi4 nBffarlAkgdUQ0eN5O7KbdFnw7jQxKFKN51xcfWqcj7wFj9RdNeTdKaS47xII4C9n/0a AcsawFrzpBTKxVm3gl1cC+/fVZ3Pq1O0f5/ekMPqxk7U0/Va0DF4fN4jUvAwXpWCdS8T HmSrRVeJkhY3xk5/qX5UnkTuiu1+O1YpfNJjsqSE/v7h06e3u5dgpREm67RwfhkKYY+3 ob5drkif4n1iRk3FsyDxVTU8Db3JrXudVJQN4wRXsJeR2tOakSPE+YI75a4aHenvQtNk 4VlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=WQUwIr+W; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k23si1265435ejk.35.2020.06.30.01.04.43; Tue, 30 Jun 2020 01:05:06 -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; dkim=pass header.i=@nvidia.com header.s=n1 header.b=WQUwIr+W; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730730AbgF3ID6 (ORCPT + 99 others); Tue, 30 Jun 2020 04:03:58 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:15677 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729909AbgF3IDl (ORCPT ); Tue, 30 Jun 2020 04:03:41 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 30 Jun 2020 01:02:49 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 30 Jun 2020 01:03:39 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 30 Jun 2020 01:03:39 -0700 Received: from [10.25.97.62] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 30 Jun 2020 08:03:31 +0000 CC: , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v4 15/23] ASoC: soc-core: Identify 'no_pcm' DAI links for DPCM To: Kuninori Morimoto References: <1593233625-14961-1-git-send-email-spujar@nvidia.com> <1593233625-14961-16-git-send-email-spujar@nvidia.com> <87h7utytlx.wl-kuninori.morimoto.gx@renesas.com> From: Sameer Pujar Message-ID: <9c7871ae-6649-7b0d-4780-c8389c299b04@nvidia.com> Date: Tue, 30 Jun 2020 13:33:27 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <87h7utytlx.wl-kuninori.morimoto.gx@renesas.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1593504169; bh=DnKjNwH/guC7EJEpkXLjFlHpxsWMMzSc4XkpFzGQbAg=; h=X-PGP-Universal:CC:Subject:To:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Transfer-Encoding: Content-Language; b=WQUwIr+WF/GGwacJzN7rnd4pRjFlBamjWeqTONoPBOOZYgq7blpSZ87MHNdErkG/V Bo5un9TEvghvrPYJtlgg/3/67mIK7K7OuME2UgysIJBrQsLscV7rPe5qsImS52vi+l tBtyNEId8MOyf5+oALW7p+QzyXv+QJXTIyVzbhzhl3PV7l6YaQqkhjgk3lnk4FEvP2 Hwh38kn4IjXhwdJaI/HKbUZjmGQYG/YPm71jdjU6NGptDUih2eCD6TgFWKc6IhKRkX G1nr50EASreeu9otzItyG9V/VzGXnbHR6oGij3dXYjDlW+ElcrOlMWu8e+AzFJ1YZa d+zK2Z3ASZHUA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/30/2020 11:37 AM, Kuninori Morimoto wrote: > External email: Use caution opening links or attachments > > > Hi Sameer > >> PCM devices are created for dai links with 'no-pcm' flag as '0'. >> Such DAI links have CPU component which implement pcm_construct() >> and pcm_destruct() callbacks. 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 components involved in the links. >> >> Signed-off-by: Sameer Pujar >> --- > (snip) >> +bool soc_component_is_pcm(struct snd_soc_dai_link_component *dlc) >> +{ >> + struct snd_soc_component *component; >> + struct snd_soc_dai *dai; >> + >> + for_each_component(component) { >> + if (!component->driver) >> + continue; >> + >> + for_each_component_dais(component, dai) { >> + if (!dai->name || !dlc->dai_name) >> + continue; >> + >> + if (strcmp(dai->name, dlc->dai_name)) >> + continue; >> + >> + if (component->driver->pcm_construct) >> + return true; >> + } >> + } >> + >> + return false; >> +} > At least my CPU driver doesn't use component:pcm_construct > but is using DAI:pcm_new for some reasons. > I'm not sure checking DAI:pcm here is enough, or not... OK. If adding DAI:pcm_new above here is not sufficient, then a flag can be used to describe FE component? or is there a better alternative? > > Thank you for your help !! > > Best regards > --- > Kuninori Morimoto