Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp274139ybg; Fri, 12 Jun 2020 00:51:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFcfrjqhBfqXzDI9M+akRfPEbIQhiZkIBQ+1jm/6R2b4Z6dzJWsmaUtJZPeoe4ekduKanw X-Received: by 2002:a05:6402:39a:: with SMTP id o26mr10762209edv.10.1591948262737; Fri, 12 Jun 2020 00:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591948262; cv=none; d=google.com; s=arc-20160816; b=Aj+awUUNAVqA8BmWunBS6diML66lHA3vjgmRh03Egcl476mdqVRKTeMpnjQFwxryJY PT+qsiwkHDXBRt7YueC9ntwoZcABJPZSwcYbnUuCAAcizd7155xQjVeyG12VKw3yG14g 7oAbFCiwc7oZ7JytfSZkH1cQGCaO2r4RF3LaOZlTPK00oiNQhj385pWLVAxIzhUIIlED 5VmRvgEPTQdoboHi/wKpNkCVSWN9bfP2Z2/yFgJtegzN+hgc+ovEQHSAgodRsHfJLUJm 30QDuMIdPtKv2rGiBcszQjg1oHX2QIM5/mBNPB/MMaYcagVByhh0jV5M3dg3UDt1uphG jV7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:to:from; bh=ZoPUfSF9U+Wvh2ffXrX3tHUWZx+dRQ3LvzeX4JXCRG0=; b=ZRRSZusMze4Ao00BmhVwnwuNhxFTVCVn433Rs6m+iE8NLRLwGHDg9JIzVMdh1T/In2 8UO5L5FzOn0agEU6BU6fWCnvhh2FC9xu+XBjrAGqDOIvk+HodWJdg/YqaJzAW3xcNjOZ BVQSIPOMHuA2ZRKGpmh78GY25j1FYIP/12BKEqrZjIJuvqiI8RgHDbS/YceRQvoWaTL/ hF4cAwFsdB1oTOi7jiFA7jAEJrZUnnfnxtdlT2wVXF+4cLB3VTq6KeVwu/Mz/1QjTx0o UFyfSwAlnILiMfbhzcpaRoCUU4zc92xSocZP//ajZZIej7Q52ky34mS1JFLW5bFwf6Yt X5EQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oy15si3498806ejb.538.2020.06.12.00.50.39; Fri, 12 Jun 2020 00:51:02 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726491AbgFLHsw (ORCPT + 99 others); Fri, 12 Jun 2020 03:48:52 -0400 Received: from inva020.nxp.com ([92.121.34.13]:50614 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726292AbgFLHsu (ORCPT ); Fri, 12 Jun 2020 03:48:50 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 960671A0B5E; Fri, 12 Jun 2020 09:48:48 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id B34F01A0B83; Fri, 12 Jun 2020 09:48:43 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 6D9D0402E5; Fri, 12 Jun 2020 15:48:37 +0800 (SGT) From: Shengjiu Wang To: lars@metafoo.de, perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com, broonie@kernel.org, timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [RFC PATCH v3 1/4] ASoC: soc-card: export snd_soc_lookup_component_nolocked Date: Fri, 12 Jun 2020 15:37:48 +0800 Message-Id: <55f6e0d76f67a517b9a44136d790ff2a06b5caa8.1591947428.git.shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org snd_soc_lookup_component_nolocked can be used for the DPCM case that Front-End needs to get the unused platform component but added by Back-End cpu dai driver. If the component is gotten, then we can get the dma chan created by Back-End component and reused it in Front-End. Signed-off-by: Shengjiu Wang --- include/sound/soc.h | 2 ++ sound/soc/soc-core.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 74868436ac79..565612a8d690 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -444,6 +444,8 @@ int devm_snd_soc_register_component(struct device *dev, const struct snd_soc_component_driver *component_driver, struct snd_soc_dai_driver *dai_drv, int num_dai); void snd_soc_unregister_component(struct device *dev); +struct snd_soc_component *snd_soc_lookup_component_nolocked(struct device *dev, + const char *driver_name); struct snd_soc_component *snd_soc_lookup_component(struct device *dev, const char *driver_name); diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index b07eca2c6ccc..d4c73e86d058 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -310,7 +310,7 @@ struct snd_soc_component *snd_soc_rtdcom_lookup(struct snd_soc_pcm_runtime *rtd, } EXPORT_SYMBOL_GPL(snd_soc_rtdcom_lookup); -static struct snd_soc_component +struct snd_soc_component *snd_soc_lookup_component_nolocked(struct device *dev, const char *driver_name) { struct snd_soc_component *component; @@ -329,6 +329,7 @@ static struct snd_soc_component return found_component; } +EXPORT_SYMBOL_GPL(snd_soc_lookup_component_nolocked); struct snd_soc_component *snd_soc_lookup_component(struct device *dev, const char *driver_name) -- 2.21.0