From patchwork Fri Nov 15 10:48:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eason Yen X-Patchwork-Id: 11246033 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A045930 for ; Fri, 15 Nov 2019 10:49:53 +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 10D972075E for ; Fri, 15 Nov 2019 10:49:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="n16eJqXg"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="FGu/d3oc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 10D972075E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.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 249161614; Fri, 15 Nov 2019 11:49:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 249161614 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1573814991; bh=kzCXofr83IXuaEKutZ5svgHaCM6mkaNODOEqJCmv8ok=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=n16eJqXgOKUrRHzAC7fo6rN7rRlZ7ygnNfaJK3O7Vrun4s0newp6Bgg60XvAE+Tea izz5T79CqLwa5mTuRj1tfiO/3FGeMoAU53VHTMB12bkOODeRdi2a3h146GhjIIca2j aLWpxLD8E6Tu2rDmKo5wPal/iwcKaRzV+qJd8rrs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A2A48F80104; Fri, 15 Nov 2019 11:49:00 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id EDE34F80105; Fri, 15 Nov 2019 11:48:58 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, MIME_BASE64_TEXT, RDNS_NONE, SPF_HELO_NONE, SPF_PASS, SURBL_BLOCKED, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mailgw01.mediatek.com (unknown [210.61.82.183]) by alsa1.perex.cz (Postfix) with ESMTP id CCD6AF8007E for ; Fri, 15 Nov 2019 11:48:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CCD6AF8007E Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="FGu/d3oc" X-UUID: b69a7603d9df4ee184032f0cc71e42a5-20191115 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=r1J2x+cf0MV14ViUNbOr8DSPYB8uoQZWrAw4hIFdll0=; b=FGu/d3oc0P3aWyR4msvXTXddUk9qsbwZ9S2TXw5RVCRosbXPlIG7gJJoQB3e6WM5fQKDrTwdSTkej0Vga7tI528IvM+6kVSPaJXaBZwMemkSMUbf5Ui2XFFJlAQx216/J/uNkS80QkhXZnEkcvlN4ZB1wqJxt7aYYQOjqQmEkwQ=; X-UUID: b69a7603d9df4ee184032f0cc71e42a5-20191115 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 662135799; Fri, 15 Nov 2019 18:48:49 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 15 Nov 2019 18:48:45 +0800 Received: from mtksdaap41.mediatek.inc (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 15 Nov 2019 18:48:46 +0800 From: Eason Yen To: Date: Fri, 15 Nov 2019 18:48:44 +0800 Message-ID: <1573814926-15805-1-git-send-email-eason.yen@mediatek.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-TM-SNTS-SMTP: BDCDFFBC8F493320CCF91C8464AD5E89F9EC6E5E6F5288D24BE2BDCDAB9EC9052000:8 X-MTK: N Cc: alsa-devel@alsa-project.org, chipeng.chang@mediatek.com, jiaxin.yu@mediatek.com, linux-mediatek@lists.infradead.org, eason.yen@mediatek.com, matthias.bgg@gmail.com Subject: [alsa-devel] [PATCH v2 0/2] ASoC: mediatek: common: refine mtk_afe_fe_hw_params 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" This patch is to add more helpers to control mtk_memif dma_address/format/pbuf_size And refine hw_params and hw_prepare by these helpers. v2 changes: split patch v1 to two seprated patches for different purpose. v1 changes: 1. patchwork list: https://mailman.alsa-project.org/pipermail/alsa-devel/2019-November/158394.html Eason Yen (2): ASoC: mediatek: common: add some helpers to control mtk_memif ASoC: mediatek: common: refine hw_params and hw_prepare sound/soc/mediatek/common/mtk-afe-fe-dai.c | 359 +++++++++++++++++++++++------ sound/soc/mediatek/common/mtk-afe-fe-dai.h | 16 ++ sound/soc/mediatek/common/mtk-base-afe.h | 28 ++- 3 files changed, 336 insertions(+), 67 deletions(-)