Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1875195pxb; Fri, 5 Mar 2021 01:36:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyaejaj063qfUv6KkUtOpTSQNOzgGfm61YeafVrRUPYO4MyVHiWPh5Ou34zkZQuEl8gf0He X-Received: by 2002:a05:6402:b70:: with SMTP id cb16mr8322314edb.11.1614936966106; Fri, 05 Mar 2021 01:36:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614936966; cv=none; d=google.com; s=arc-20160816; b=uwCnSvxMGga3xS/6Idjw33eOXeuvL9BEc/paWfePX8+hxRKC7n/zHdMVgZB/m7JBHR AYdPwnNGTdhZf4Ds5rpKSPEhkV/cAWwu3QoLro+J7mI6OUy607dMFl/uNgfqJ7DZqD/q dSTbGk5Ap8reJLSKlEP+eSvIHjzmZXJeY46L2X6o3OU9epsw/lffD+YWCCQ141GXUeA7 avfT+PozZjI3OT0Cl28A+dGEPwf2hJw25CbVgBHnCcEH8aiUT0MNB3Q2/fl8Ra59/Kt3 IQIlM8d1sIdVW23UTMyLY/gdxcY9BmTwwV84aQQRW01sr4OS7LDKo+2jmDHMW/PEClPD l9lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=c8rajPSZ6eBSbenalmTON05vu5M2nMFSwbpoRtdNuAk=; b=xVZI9mmEhgLJG2OXy4p2xeNneR4bvy1ZIJ0F+9ah/BLu8Yq4jRe45bHtxEQnjPHwys ndM9HlJgdmaTimTekzO5yic2PGMRljog7qiqpvsHF2+vsSIyyjCW5cQOvNBSZA4ZvBFb J0CJDrJv8gwnJK2upkoJJsepGyQ6zGhL3ACOF6QSarkARw183a3ODQShLMwEEq+E06En wH6MV0/KT7nAsw/2p7v1DzvT+JzxkV1tdjlZk8bGq8pMkBfiuaMw9ULD8vji7G/FwEjj Pu9zmCje0cloTWbKYC+3RDw99tMnPBtnkYOygQdE+SqY8PnceR7OBkwWU8DGRWRukQYq UBgQ== 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 bi18si1142239ejb.369.2021.03.05.01.35.43; Fri, 05 Mar 2021 01:36:06 -0800 (PST) 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 S229650AbhCEJce (ORCPT + 99 others); Fri, 5 Mar 2021 04:32:34 -0500 Received: from inva021.nxp.com ([92.121.34.21]:55192 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbhCEJcU (ORCPT ); Fri, 5 Mar 2021 04:32:20 -0500 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id DBC7D2013FB; Fri, 5 Mar 2021 10:32:18 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9FCB62013FE; Fri, 5 Mar 2021 10:32:13 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 72E5A40249; Fri, 5 Mar 2021 10:32:07 +0100 (CET) From: Shengjiu Wang To: timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: fsl_asrc_dma: request dma channel from specific controller Date: Fri, 5 Mar 2021 17:19:37 +0800 Message-Id: <1614935977-21638-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robin Gong Request dma channel from specific dma controller instead of generic dma controller list, otherwise, may get the wrong dma controller if there are multi dma controllers such as i.MX8MP. Signed-off-by: Robin Gong Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc_dma.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_asrc_dma.c b/sound/soc/fsl/fsl_asrc_dma.c index 29f91cdecbc3..c313a26c8f95 100644 --- a/sound/soc/fsl/fsl_asrc_dma.c +++ b/sound/soc/fsl/fsl_asrc_dma.c @@ -141,6 +141,7 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component, struct dma_slave_config config_fe, config_be; enum asrc_pair_index index = pair->index; struct device *dev = component->dev; + struct device_node *of_dma_node; int stream = substream->stream; struct imx_dma_data *tmp_data; struct snd_soc_dpcm *dpcm; @@ -231,8 +232,10 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component, pair->dma_data.priority = tmp_data->priority; dma_release_channel(tmp_chan); + of_dma_node = pair->dma_chan[!dir]->device->dev->of_node; pair->dma_chan[dir] = - dma_request_channel(mask, filter, &pair->dma_data); + __dma_request_channel(&mask, filter, &pair->dma_data, + of_dma_node); pair->req_dma_chan = true; } else { pair->dma_chan[dir] = tmp_chan; -- 2.27.0