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=-5.0 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 33707C433DF for ; Fri, 12 Jun 2020 08:09:30 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A78A1207F7 for ; Fri, 12 Jun 2020 08:09:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="KIltM5E/"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ESWNW/5E" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A78A1207F7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2A053950; Fri, 12 Jun 2020 10:08:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2A053950 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1591949368; bh=nmZwczgNTKZra6a5oxqRkjjP4HIMvclLNUKSY89o+Ww=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=KIltM5E/sSdUOovN4+i+EPE8jTvOpt0NWbSF8DT8fijMUJ9rVdcqi6UH23GZBiZTX p8PPwG4kcXLL1xCJdzVHqYvV6heDiYmIYRFGFSlKIi3/5gLxzewElQwHLoNzjk6fA5 2ujR/ew1IQIqkQxffdgXqMh9HVbrMOzeSzghnC/0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A0A97F801F7; Fri, 12 Jun 2020 10:08:37 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3F3E6F8021C; Fri, 12 Jun 2020 10:08:36 +0200 (CEST) Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 28E5EF800CC for ; Fri, 12 Jun 2020 10:08:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 28E5EF800CC Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ESWNW/5E" Received: by mail-pf1-x443.google.com with SMTP id d66so3943688pfd.6 for ; Fri, 12 Jun 2020 01:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=deHfCGYK7sImHkT4VukXUAJWu2KR/QGBA+6TyAj97pI=; b=ESWNW/5E+/g3NHeWm+fOP0obMgnb450CQdjU9D6UtJeGj3oPKXbGFuVQMzmWkRgmg9 COtq4vJ2noq7dW4on1wypjVYXjgWHyB0fRMnV6QZ9j1FiTm00VYKKwgR7MASZKZMRyeA dR9T/ajdR5gD7/4IFojbFiUs4rdI1lUswID/e1U5pm2aKElj8noMcoOe4/keDRVrB6ef KyjJ6r7qxss1ilwRip7YdYpZw7twEqIm1eAZyvF1m+86gx9AtNA/C3e9NQOzdUmhgAcW qAnKk1GUYgxglmNMpsPNlxuYqzdMpn8JRXN/hty9YdAgM4jkMhKH9jTDoRFk0+GOfrG0 xaHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=deHfCGYK7sImHkT4VukXUAJWu2KR/QGBA+6TyAj97pI=; b=L9KTyK3rJvpUTh+OmnJ5Ur/LZ7Vs3bdIAYfdbfu8m3winSmDH/RJU8zOnpxkoe+BbI L1qfymWqL4bRJAzxuDbHTA13b/2OE6csfnyWAYanZS5cB7imv/KXjqXOWK+QiaAIdCpx eLA4LwLssv+oVWcaZIDmDCvoyJizXqwAXcRybzTCqFOjltojb1EF7uwYVahORp4sLNM2 5BcQAgUTPN+y3epEfMiV4G9efingrHHDP+LPV0ihL91AvXpie5Ccgsyqe7r07uyCPcjM Mt2Gxt02fEZm175CYj3idmIT23TET+BdVFoTT+8lCjpTS+tg/7mJ0TdilADcASBW3wQp KHug== X-Gm-Message-State: AOAM533P2wM2L5OFsRLqw8sQkQvrhFA6ZMpt6835oqYJNA2hxtV5O2j4 xaPaOcGNzt5M3QRj6RpyExE= X-Google-Smtp-Source: ABdhPJztp5H64H8nc4ALDD29MNCP1/wMgS7+B5pkRhRu2tCOBn/u6z+JZFa6hKutRRkWyc4Y2CsnqA== X-Received: by 2002:a62:ed02:: with SMTP id u2mr10494227pfh.283.1591949306759; Fri, 12 Jun 2020 01:08:26 -0700 (PDT) Received: from Asurada-Nvidia (searspoint.nvidia.com. [216.228.112.21]) by smtp.gmail.com with ESMTPSA id m9sm5306088pfo.200.2020.06.12.01.08.26 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 01:08:26 -0700 (PDT) Date: Fri, 12 Jun 2020 01:08:17 -0700 From: Nicolin Chen To: Shengjiu Wang Subject: Re: [RFC PATCH v3 3/4] ASoC: fsl_asrc_dma: Reuse the dma channel if available in Back-End Message-ID: <20200612080817.GC22422@Asurada-Nvidia> References: <3a79f0442cb4930c633cf72145cfe95a45b9c78e.1591947428.git.shengjiu.wang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a79f0442cb4930c633cf72145cfe95a45b9c78e.1591947428.git.shengjiu.wang@nxp.com> User-Agent: Mutt/1.9.4 (2018-02-28) Cc: alsa-devel@alsa-project.org, lars@metafoo.de, timur@kernel.org, Xiubo.Lee@gmail.com, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, lgirdwood@gmail.com, tiwai@suse.com, broonie@kernel.org, festevam@gmail.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Fri, Jun 12, 2020 at 03:37:50PM +0800, Shengjiu Wang wrote: > The dma channel has been requested by Back-End cpu dai driver already. > If fsl_asrc_dma requests dma chan with same dma:tx symlink, then > there will be below warning with SDMA. > > [ 48.174236] fsl-esai-dai 2024000.esai: Cannot create DMA dma:tx symlink > > So if we can reuse the dma channel of Back-End, then the issue can be > fixed. > > In order to get the dma channel which is already requested in Back-End. > we use the exported two functions (snd_soc_lookup_component_nolocked > and soc_component_to_pcm). If we can get the dma channel, then reuse it, > if can't, then request a new one. > > Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen 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=-4.8 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 39900C433E0 for ; Fri, 12 Jun 2020 08:11:35 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D80AB207F7 for ; Fri, 12 Jun 2020 08:11:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ESWNW/5E" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D80AB207F7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49jtjJ5csRzDqyk for ; Fri, 12 Jun 2020 18:11:32 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::543; helo=mail-pg1-x543.google.com; envelope-from=nicoleotsuka@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ESWNW/5E; dkim-atps=neutral Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49jtdq2fRtzDqv1 for ; Fri, 12 Jun 2020 18:08:30 +1000 (AEST) Received: by mail-pg1-x543.google.com with SMTP id t7so3781324pgt.3 for ; Fri, 12 Jun 2020 01:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=deHfCGYK7sImHkT4VukXUAJWu2KR/QGBA+6TyAj97pI=; b=ESWNW/5E+/g3NHeWm+fOP0obMgnb450CQdjU9D6UtJeGj3oPKXbGFuVQMzmWkRgmg9 COtq4vJ2noq7dW4on1wypjVYXjgWHyB0fRMnV6QZ9j1FiTm00VYKKwgR7MASZKZMRyeA dR9T/ajdR5gD7/4IFojbFiUs4rdI1lUswID/e1U5pm2aKElj8noMcoOe4/keDRVrB6ef KyjJ6r7qxss1ilwRip7YdYpZw7twEqIm1eAZyvF1m+86gx9AtNA/C3e9NQOzdUmhgAcW qAnKk1GUYgxglmNMpsPNlxuYqzdMpn8JRXN/hty9YdAgM4jkMhKH9jTDoRFk0+GOfrG0 xaHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=deHfCGYK7sImHkT4VukXUAJWu2KR/QGBA+6TyAj97pI=; b=gRamOMv3WffcrCkKWD6xx0Cox/Y/5afK8oRU0988XTjnXDZ5aMLHYW7Qgt5OlF/HiQ FhaPLU4wwDROf+lnfJrQ89pgBgigNCUahZLUmj8SzrduRjLCpPpfFlr0keHOIeZQ8WS6 1EL+ereFHPbcMMlkF03Icwvnh3efU2TTotAY7wKtPXgjagS8ZQFK+tz+qJQkPivGW+fF RRs4Z74cJGSk53asxwgm8jgznitd5L3l4MeMly0efYHEXL0WrEAo1U+Vxdd/JHXga6gA s3DqgqZl1AvsNhLRnngvDlC3VvxkBtkbB4bJhJGMH9zVcHZwlg6lJcu/Z4P2KmVM9Pml Yg7A== X-Gm-Message-State: AOAM532G7KnkZgzzxez9fN+Tf6W5y3INxJJFEurNEA63SC9k4H5IGId4 cjS7NBIk5HnRGCswsg5l+OE= X-Google-Smtp-Source: ABdhPJztp5H64H8nc4ALDD29MNCP1/wMgS7+B5pkRhRu2tCOBn/u6z+JZFa6hKutRRkWyc4Y2CsnqA== X-Received: by 2002:a62:ed02:: with SMTP id u2mr10494227pfh.283.1591949306759; Fri, 12 Jun 2020 01:08:26 -0700 (PDT) Received: from Asurada-Nvidia (searspoint.nvidia.com. [216.228.112.21]) by smtp.gmail.com with ESMTPSA id m9sm5306088pfo.200.2020.06.12.01.08.26 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 01:08:26 -0700 (PDT) Date: Fri, 12 Jun 2020 01:08:17 -0700 From: Nicolin Chen To: Shengjiu Wang Subject: Re: [RFC PATCH v3 3/4] ASoC: fsl_asrc_dma: Reuse the dma channel if available in Back-End Message-ID: <20200612080817.GC22422@Asurada-Nvidia> References: <3a79f0442cb4930c633cf72145cfe95a45b9c78e.1591947428.git.shengjiu.wang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a79f0442cb4930c633cf72145cfe95a45b9c78e.1591947428.git.shengjiu.wang@nxp.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, lars@metafoo.de, timur@kernel.org, Xiubo.Lee@gmail.com, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, lgirdwood@gmail.com, tiwai@suse.com, broonie@kernel.org, perex@perex.cz, festevam@gmail.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Jun 12, 2020 at 03:37:50PM +0800, Shengjiu Wang wrote: > The dma channel has been requested by Back-End cpu dai driver already. > If fsl_asrc_dma requests dma chan with same dma:tx symlink, then > there will be below warning with SDMA. > > [ 48.174236] fsl-esai-dai 2024000.esai: Cannot create DMA dma:tx symlink > > So if we can reuse the dma channel of Back-End, then the issue can be > fixed. > > In order to get the dma channel which is already requested in Back-End. > we use the exported two functions (snd_soc_lookup_component_nolocked > and soc_component_to_pcm). If we can get the dma channel, then reuse it, > if can't, then request a new one. > > Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen 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=-5.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 6D851C433DF for ; Fri, 12 Jun 2020 08:08:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4395220801 for ; Fri, 12 Jun 2020 08:08:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ESWNW/5E" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726361AbgFLII2 (ORCPT ); Fri, 12 Jun 2020 04:08:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726264AbgFLII2 (ORCPT ); Fri, 12 Jun 2020 04:08:28 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17AF5C03E96F for ; Fri, 12 Jun 2020 01:08:28 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id 64so3937064pfv.11 for ; Fri, 12 Jun 2020 01:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=deHfCGYK7sImHkT4VukXUAJWu2KR/QGBA+6TyAj97pI=; b=ESWNW/5E+/g3NHeWm+fOP0obMgnb450CQdjU9D6UtJeGj3oPKXbGFuVQMzmWkRgmg9 COtq4vJ2noq7dW4on1wypjVYXjgWHyB0fRMnV6QZ9j1FiTm00VYKKwgR7MASZKZMRyeA dR9T/ajdR5gD7/4IFojbFiUs4rdI1lUswID/e1U5pm2aKElj8noMcoOe4/keDRVrB6ef KyjJ6r7qxss1ilwRip7YdYpZw7twEqIm1eAZyvF1m+86gx9AtNA/C3e9NQOzdUmhgAcW qAnKk1GUYgxglmNMpsPNlxuYqzdMpn8JRXN/hty9YdAgM4jkMhKH9jTDoRFk0+GOfrG0 xaHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=deHfCGYK7sImHkT4VukXUAJWu2KR/QGBA+6TyAj97pI=; b=KgCipMiUfiEl+/SF30Ijod6ixu62WHRvDCkhZk0rGO3JHJ/NOWFNK2enQkYdNOFaop icd9dpYrVz8mWLgOACHeqbi4F4/Jj8wkydJuK+KTqmPRZW3bvtoUh+xkvaqcpangJ2P3 +c3+6zjt9vp5dD7C78nGjFd35xtrzJqQBDy4mhyiBKXFBYd+aRV51eS1fCDboAAwWuOb HItUMrSlBNi3Uy8OXfKBKN+v+R4nbWnUJ6Noj4A1NQXMOHnfs5ffKV2JqwC+e0TjcEkC mbxnKCRKDvgZfEq8qaVwR8XQdhavwmjk5Kfk5v0XShLKey0how4a3zOA1Vsg0tvn4dFN NbKg== X-Gm-Message-State: AOAM532pv4RJxzpDfd+6/oBnmouzvjIGggmOJBj0YkGTmDXCwVpZrCye LwU1d0FQi5QsRurzIxMDTSo= X-Google-Smtp-Source: ABdhPJztp5H64H8nc4ALDD29MNCP1/wMgS7+B5pkRhRu2tCOBn/u6z+JZFa6hKutRRkWyc4Y2CsnqA== X-Received: by 2002:a62:ed02:: with SMTP id u2mr10494227pfh.283.1591949306759; Fri, 12 Jun 2020 01:08:26 -0700 (PDT) Received: from Asurada-Nvidia (searspoint.nvidia.com. [216.228.112.21]) by smtp.gmail.com with ESMTPSA id m9sm5306088pfo.200.2020.06.12.01.08.26 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jun 2020 01:08:26 -0700 (PDT) Date: Fri, 12 Jun 2020 01:08:17 -0700 From: Nicolin Chen To: Shengjiu Wang Cc: lars@metafoo.de, perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com, broonie@kernel.org, timur@kernel.org, Xiubo.Lee@gmail.com, festevam@gmail.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [RFC PATCH v3 3/4] ASoC: fsl_asrc_dma: Reuse the dma channel if available in Back-End Message-ID: <20200612080817.GC22422@Asurada-Nvidia> References: <3a79f0442cb4930c633cf72145cfe95a45b9c78e.1591947428.git.shengjiu.wang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a79f0442cb4930c633cf72145cfe95a45b9c78e.1591947428.git.shengjiu.wang@nxp.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 12, 2020 at 03:37:50PM +0800, Shengjiu Wang wrote: > The dma channel has been requested by Back-End cpu dai driver already. > If fsl_asrc_dma requests dma chan with same dma:tx symlink, then > there will be below warning with SDMA. > > [ 48.174236] fsl-esai-dai 2024000.esai: Cannot create DMA dma:tx symlink > > So if we can reuse the dma channel of Back-End, then the issue can be > fixed. > > In order to get the dma channel which is already requested in Back-End. > we use the exported two functions (snd_soc_lookup_component_nolocked > and soc_component_to_pcm). If we can get the dma channel, then reuse it, > if can't, then request a new one. > > Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen