From patchwork Mon Jul 29 12:08:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "RAVULAPATI, VISHNU VARDHAN RAO" X-Patchwork-Id: 11065451 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 06B601399 for ; Tue, 30 Jul 2019 09:54:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8B0C28716 for ; Tue, 30 Jul 2019 09:54:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC79E2871A; Tue, 30 Jul 2019 09:54:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0B6A528716 for ; Tue, 30 Jul 2019 09:54:04 +0000 (UTC) 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 3A5B41884; Tue, 30 Jul 2019 11:53:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3A5B41884 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1564480442; bh=xRlNmgsdA+5cS0NtCm0MbGEKj9cNmUuBCA1+RCaQ704=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=gAXilCeUKgnPwebo41b9X+lHzA4ZyA0E58mwnlD3AoafbNoOVCE8Su2113gg0KbTc RLvp3qE+k8JLw1do4lbzY0NTynLi6cXx/RPgppuSoqQ8fYqtFfiFtY8ViQp3EpCsMI LrA1HoNV6636p8ylnUd3OHo0r6yXAYVAsq31EOBs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B674AF8087D; Tue, 30 Jul 2019 11:32:27 +0200 (CEST) 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 7CD01F8048D; Mon, 29 Jul 2019 14:14:54 +0200 (CEST) Received: from NAM05-DM3-obe.outbound.protection.outlook.com (mail-eopbgr730042.outbound.protection.outlook.com [40.107.73.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 998C0F800E4 for ; Mon, 29 Jul 2019 14:14:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 998C0F800E4 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="fu9BVBau" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fSEIuwhusDutLGgc026ffhCMkATWTOGT1qX2HJTOCArexyDttoy9L9+XDJwqFaWxF0KOMYH/6/8/CHm0Oi5wJ5//Dm6kQKZsZUdAXWdoiE/gfK5sMSF/2orYIE7/CGSSfeh6uGFrGqcdP70qHW1fAhM50xGwtTPY1kNXL9We/YxAp1Y7zpnnqRnmO/g+h0TaEQScKWzKKFimtGgbRfOGjHkA3a7UoH7Qpi5IXKmpDBwlLBQfOaMhe/uGVdI6CRwG6TZck04s4D0Xms8VEbz2ix7eM4SY67a7FXjGhNC82Fk1jn3HlFQBgzB7I6kNhMg74A8M2d5hdlk6lXCXIK+4GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xt2Z7zJ7v8ihvP1FrZ8G/yzCqlFzNhXpQffDP2sPaLg=; b=iZzNcCG86WMldzfd7/aQkPcHZYkpmGBn3wudX9ulUet68zdxPJauYUqucVzpXajUZ/nN9CTcDiFeXZ8nwBojPT47RzD9uUhYIZaUUYp5JA4GcVDW/qZ1uw4ZwX5s4jKGLktqoGPC+S718voyPgramSsWRKdZFLsa11ax1XqJ2jT732yGpu6O1sByJ98CikmJE3YReDDWjvOLgBqF4CN6bznJI1Df+pOWc+iJy96ke2tz8INndDKtSZsTQjHWEiFmGPKBYn92asNSQn3YTB/dIMnPXRuVyuqNnHM+nkHlJCj31nFEpZ6P1SYvXW+9xVcSZkDo2qTfhs7sAwcaXp5fGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=canonical.com smtp.mailfrom=amd.com;dmarc=permerror action=none header.from=amd.com;dkim=none (message not signed);arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xt2Z7zJ7v8ihvP1FrZ8G/yzCqlFzNhXpQffDP2sPaLg=; b=fu9BVBauQBH3AENk526qZECivetZ3IQsQ+7GwjVp2xfqOsfBrRkoT1JzhsC6ZUlC0tLQqHPqBvK95bDK2c3imBp3+x8v2yf+SZ4BCVCwTCf4sa7gIHR2otfyb7WjmDoKjKri1xepBvg96yRwzd6gtO3quPqvLHGjSjbahDhgd1w= Received: from SN1PR12CA0097.namprd12.prod.outlook.com (2603:10b6:802:21::32) by DM6PR12MB3514.namprd12.prod.outlook.com (2603:10b6:5:18a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.13; Mon, 29 Jul 2019 12:14:47 +0000 Received: from DM3NAM03FT010.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::201) by SN1PR12CA0097.outlook.office365.com (2603:10b6:802:21::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2094.16 via Frontend Transport; Mon, 29 Jul 2019 12:14:46 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; canonical.com; dkim=none (message not signed) header.d=none; canonical.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by DM3NAM03FT010.mail.protection.outlook.com (10.152.82.65) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2115.10 via Frontend Transport; Mon, 29 Jul 2019 12:14:46 +0000 Received: from vishnu-All-Series.amd.com (10.34.1.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.389.1; Mon, 29 Jul 2019 07:14:42 -0500 From: Ravulapati Vishnu vardhan rao To: Date: Mon, 29 Jul 2019 17:38:29 +0530 Message-ID: <1564402115-5043-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(396003)(376002)(346002)(136003)(39860400002)(2980300002)(428003)(189003)(199004)(356004)(6666004)(305945005)(70206006)(1671002)(70586007)(50466002)(48376002)(316002)(53416004)(47776003)(4326008)(126002)(54906003)(51416003)(2616005)(7696005)(68736007)(50226002)(36756003)(81156014)(53936002)(486006)(8676002)(8936002)(16586007)(476003)(426003)(336012)(86362001)(2906002)(109986005)(26005)(5660300002)(186003)(478600001)(81166006)(266003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR12MB3514; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: be1d4de8-e5b5-4b28-d902-08d7141e58c8 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328); SRVR:DM6PR12MB3514; X-MS-TrafficTypeDiagnostic: DM6PR12MB3514: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 01136D2D90 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: Y9nPWgL1ZLf6CPi5/48oVV18Pr/f6Irr/hi3u7fd+RwZCztzLYOFmyHtZTgRocmxrWzEfmGjPi2yPer9W9hjEgbY8p54JslgPc8G4wHUUaSiLh4kqFhF4lNPS6TnTR7XYGa4wXkZjrlXqgqFcL1QgEaKkYckiPaBMForhBlNWF87z+swKWaxTUrevwuhRfmbpPb1bj59VE6UrN+dODfHptL6+rx7nA0jjC2+p7hXqYj4jFxKkFQNOx6QdW8IG4Kna6e/KWXp1cdpl3bUZD4dW8I7SvnWymamawHoUdztkyKn105TvfdZhOWQ8nkRam14Shfp+5WG6Rt7nLo22tnKa3WYcY3KoepWpCb3x+SOsabmkTxBqXt+MP/s1tfheqjMBMlXDNdIwn15ExBBuOmd+lyGK5fMAwrkr6EjUjbNIf8= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2019 12:14:46.3303 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: be1d4de8-e5b5-4b28-d902-08d7141e58c8 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3514 X-Mailman-Approved-At: Tue, 30 Jul 2019 11:31:28 +0200 Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Maruthi Bayyavarapu , open list , Takashi Iwai , YueHaibing , Liam Girdwood , Ravulapati Vishnu vardhan rao , Mark Brown , Vijendar Mukunda , Alexander.Deucher@amd.com, Colin Ian King Subject: [alsa-devel] [PATCH 1/3] ASoC: amd: use DMA addr rather than CPU pa for audio buffer 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" X-Virus-Scanned: ClamAV using ClamSMTP We shouldn't assume CPU physical address we get from page_to_phys() is same as DMA address we get from dma_alloc_coherent(). On x86_64, we won't run into any problem with the assumption when dma_ops is nommu_dma_ops. However, DMA address is IOVA when IOMMU is enabled. And it's most likely different from CPU physical address when AMD IOMMU is not in passthrough mode. Signed-off-by: Vijendar Mukunda Tested-by: RAVULAPATI VISHNU VARDHAN RAO --- sound/soc/amd/raven/acp3x-pcm-dma.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c index a4ade6b..49c4872 100644 --- a/sound/soc/amd/raven/acp3x-pcm-dma.c +++ b/sound/soc/amd/raven/acp3x-pcm-dma.c @@ -31,7 +31,7 @@ struct i2s_stream_instance { u16 num_pages; u16 channels; u32 xfer_resolution; - struct page *pg; + dma_addr_t dma_addr; u64 bytescount; void __iomem *acp3x_base; }; @@ -211,11 +211,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id) static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction) { u16 page_idx; - u64 addr; + dma_addr_t addr; u32 low, high, val, acp_fifo_addr; - struct page *pg = rtd->pg; - /* 8 scratch registers used to map one 64 bit address */ + addr = rtd->dma_addr; + /* 8 scratch registers used to map one 64 bit address. + * For 2 pages (8192 * 2 bytes), it will be 16 registers. + */ if (direction == SNDRV_PCM_STREAM_PLAYBACK) val = 0; else @@ -229,7 +231,6 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction) for (page_idx = 0; page_idx < rtd->num_pages; page_idx++) { /* Load the low address of page int ACP SRAM through SRBM */ - addr = page_to_phys(pg); low = lower_32_bits(addr); high = upper_32_bits(addr); @@ -239,7 +240,7 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction) + 4); /* Move to next physically contiguos page */ val += 8; - pg++; + addr += PAGE_SIZE; } if (direction == SNDRV_PCM_STREAM_PLAYBACK) { @@ -340,10 +341,8 @@ static int acp3x_dma_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { int status; - u64 size; - struct page *pg; - struct snd_pcm_runtime *runtime = substream->runtime; - struct i2s_stream_instance *rtd = runtime->private_data; + uint64_t size; + struct i2s_stream_instance *rtd = substream->runtime->private_data; if (!rtd) return -EINVAL; @@ -355,8 +354,8 @@ static int acp3x_dma_hw_params(struct snd_pcm_substream *substream, memset(substream->runtime->dma_area, 0, params_buffer_bytes(params)); pg = virt_to_page(substream->dma_buffer.area); - if (pg) { - rtd->pg = pg; + if (substream->dma_buffer.area) { + rtd->dma_addr = substream->dma_buffer.addr; rtd->num_pages = (PAGE_ALIGN(size) >> PAGE_SHIFT); config_acp3x_dma(rtd, substream->stream); status = 0; From patchwork Mon Jul 29 12:08:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "RAVULAPATI, VISHNU VARDHAN RAO" X-Patchwork-Id: 11065453 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EFBD11395 for ; Tue, 30 Jul 2019 09:54:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DEEBB28716 for ; Tue, 30 Jul 2019 09:54:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2C982871A; Tue, 30 Jul 2019 09:54:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2A7FE28716 for ; Tue, 30 Jul 2019 09:54:48 +0000 (UTC) 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 8BEDA188A; Tue, 30 Jul 2019 11:53:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8BEDA188A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1564480486; bh=4dW+GK2pZfTNj2OtVXkgkmwi/hshNTB/so4pYh2kduY=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ualgww0qNxtUmw8jf5Q2IKM7Tc+lTmFqhfpSqxAw8mqdzzPGsXMxlJSrshEI/Pi5J rSbazXsC+Qwg09WkfScpvGO6JM8SV3l08EFNGEbu1N7qeGMrYBsmEOTvdFiOHpuZDi cRbQdKN+qrBtHbCJcyAPqXOu4sod6Z/2FkNaEuug= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9ACC6F808F5; Tue, 30 Jul 2019 11:32:29 +0200 (CEST) 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 8BB9EF8048D; Mon, 29 Jul 2019 14:15:07 +0200 (CEST) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-eopbgr750081.outbound.protection.outlook.com [40.107.75.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3BECBF800E4 for ; Mon, 29 Jul 2019 14:15:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3BECBF800E4 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="WCjMhcqU" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LpHGuDUfDEWIUUPrrGbzSQpbQ3n2iRt6Wh1WdZQXgvX49HJo1UZKL4nxY4pox2OlYmqMp4e313aiW9BFGgqzreXqVJjItj4oApkfyZ4FhvyIGVxUPEW4a01labxdRsOA6S9p0uRbmgConY9yEo7PFHaH3X0ZjDode/bMH37jGfMs2EG6OiX2ARsRqZcRSfFcbWVIXZQ45Lh1lBen/sZw9eOl9ofDxUpbfnoYM76SkGs1rs2L2nl0R2VJAWFaev3K0V5X2P7igfxBPe2uTHhDYnGJF6lD0X8RCKCJRkhiu2b50VwWZLOmLwA1Az5GGygcSCPTVB6Dxmdf6tGVDNxyjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+KibZTa7Um5IMVqKAdGaQYg7CocA3KVf7PrsxgWR+1M=; b=dvEwkyuL1Sc1KParvCZW4vBRAMZxAzVBETSFe3iejlSR8tVc0HkbSYSdFCLLv//e5+iWXIkZkQWhKZIssF5k86bSWPQ+kHWdVwpW/Wzg2N4hQ4xfczUPw4fm320IsmgUEcM36Mzhzo38FqMZfiaZ7GokpYEQfNCazTkYIoMWu0c85z6VjG8nWqiOsmj+rf15cmn52GYDFYhxc/XxxCmKNV5QeCJprGMvC/Z0pmEXYHhiWwx707LEUKLjCT7Kt3vxNp9276TcpfoGUYmIiGCg7dTgc5SvzqeRkDaU6sBm9luM6kHgR4aojBhAkdhSCp4SO8mn+vN4MHNpLtKZ5+J5hA== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=embeddedor.com smtp.mailfrom=amd.com;dmarc=permerror action=none header.from=amd.com;dkim=none (message not signed);arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+KibZTa7Um5IMVqKAdGaQYg7CocA3KVf7PrsxgWR+1M=; b=WCjMhcqUO6wK7chYprGTtZ36QAJ8MY9ALNq+OgZyJcAJ+rykV1iwTI66S02uBiZ3K0hOv7zBTjY5hAgvet4hhFAJd91xIcQ1Yw71nnNLpcSvQEht5DPsu1apxD5IJjA26uPjCPMXxjNobaVjqdxxoGiHJ7+JesYtQTFJWjCS+D4= Received: from BN6PR1201CA0023.namprd12.prod.outlook.com (2603:10b6:405:4c::33) by DM5PR12MB2533.namprd12.prod.outlook.com (2603:10b6:4:b5::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.17; Mon, 29 Jul 2019 12:15:01 +0000 Received: from DM3NAM03FT025.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::201) by BN6PR1201CA0023.outlook.office365.com (2603:10b6:405:4c::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2115.15 via Frontend Transport; Mon, 29 Jul 2019 12:15:01 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; embeddedor.com; dkim=none (message not signed) header.d=none;embeddedor.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by DM3NAM03FT025.mail.protection.outlook.com (10.152.82.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2115.10 via Frontend Transport; Mon, 29 Jul 2019 12:15:00 +0000 Received: from vishnu-All-Series.amd.com (10.34.1.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.389.1; Mon, 29 Jul 2019 07:14:58 -0500 From: Ravulapati Vishnu vardhan rao To: Date: Mon, 29 Jul 2019 17:38:30 +0530 Message-ID: <1564402115-5043-2-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564402115-5043-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> References: <1564402115-5043-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(396003)(376002)(39860400002)(346002)(136003)(2980300002)(428003)(199004)(189003)(76176011)(70586007)(109986005)(81166006)(5660300002)(486006)(50226002)(186003)(53416004)(26005)(4326008)(53936002)(86362001)(70206006)(8936002)(81156014)(36756003)(2906002)(1671002)(48376002)(356004)(68736007)(316002)(6666004)(54906003)(478600001)(8676002)(11346002)(126002)(47776003)(305945005)(446003)(476003)(7696005)(426003)(2616005)(16586007)(336012)(51416003)(50466002)(42413003)(266003)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB2533; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8b703bfa-16dc-436a-7b59-08d7141e6168 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328); SRVR:DM5PR12MB2533; X-MS-TrafficTypeDiagnostic: DM5PR12MB2533: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-Forefront-PRVS: 01136D2D90 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: yVIkozL0GQtpIxzSGYqqmtzdTclEbIuA1pJ6xvFe1h5YYO2hgve5ANCdoIovR0jK+x8BGjgpL+N+ckLWyY0kv84HUtzwMlpxlOt/sw2lUKdv1anuh0bNpfbHaSbP5GyMgl1X+yomPMpdcexO4YCPdrwXV/w/Qnc+0xYB5hY7Hmcvh3gcuhfaHDhUzLWkO0PjMrYOamcMTM7/2exhRJS+vRzrB60kGAU8jeDNBW13xFH5SYkgJxWWywdzVq/A5iGz4yUP2Pd9Ulfyn0RvXCHTZ7/HE2lwyXmllel+V8Au9AFzQsij6ESmg0LQ+6v9ty7J8QT4hsEKQJQoYmQynpuB2RSxI9b96bu44Uw7U4lBtjiPlQqWSPMBM8wO1bq8uvAs1/8RmPngAtcGTDIKnYXqYE1uP75tVDeKVmai76Uuet8= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2019 12:15:00.8653 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8b703bfa-16dc-436a-7b59-08d7141e6168 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB2533 X-Mailman-Approved-At: Tue, 30 Jul 2019 11:31:28 +0200 Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Maruthi Bayyavarapu , "Gustavo A. R. Silva" , open list , Takashi Iwai , YueHaibing , Liam Girdwood , Ravulapati Vishnu vardhan rao , Mark Brown , Vijendar Mukunda , Alexander.Deucher@amd.com Subject: [alsa-devel] [PATCH 2/3] ASoC: amd: use dma_ops of parent device for acp3x dma driver 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" X-Virus-Scanned: ClamAV using ClamSMTP AMD platform device acp_audio_dma can only be created by parent PCI device driver. Pass struct device of the parent to snd_pcm_lib_preallocate_pages() so dma_alloc_coherent() can use correct dma_ops. Otherwise, it will use default dma_ops which is nommu_dma_ops on x86_64 even when IOMMU is enabled and set to non passthrough mode. Though platform device inherits some dma related fields during its creation, we can't simply pass its struct device to snd_pcm_lib_preallocate_pages() because dma_ops is not among the inherited fields. Even it were, drivers/iommu/amd_iommu.c would ignore it because get_device_id() doesn't handle platform device. This change shouldn't give us any trouble even struct device of the parent becomes null or represents some non PCI device in the future, because get_dma_ops() correctly handles null struct device or uses the default dma_ops if struct device doesn't have it set. Signed-off-by: Vijendar Mukunda Tested-by: Ravulapati, Vishnu vardhan rao --- sound/soc/amd/raven/acp3x-pcm-dma.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c index 49c4872..c74b094b 100644 --- a/sound/soc/amd/raven/acp3x-pcm-dma.c +++ b/sound/soc/amd/raven/acp3x-pcm-dma.c @@ -384,9 +384,14 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_pcm_substream *substream) static int acp3x_dma_new(struct snd_soc_pcm_runtime *rtd) { - snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_DEV, - rtd->pcm->card->dev, - MIN_BUFFER, MAX_BUFFER); + struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, + DRV_NAME); + struct device *parent = component->dev->parent; + + snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, + SNDRV_DMA_TYPE_DEV, + parent, MIN_BUFFER, + MAX_BUFFER); return 0; } From patchwork Mon Jul 29 12:08:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "RAVULAPATI, VISHNU VARDHAN RAO" X-Patchwork-Id: 11065455 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0DDEB1399 for ; Tue, 30 Jul 2019 09:55:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F016E28714 for ; Tue, 30 Jul 2019 09:55:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E211028732; Tue, 30 Jul 2019 09:55:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 408B728714 for ; Tue, 30 Jul 2019 09:55:30 +0000 (UTC) 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 B344B1889; Tue, 30 Jul 2019 11:54:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B344B1889 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1564480528; bh=+zj7A9yi85qvqVRP9MaUe5PRbJhvze9JLxLkemv4KKk=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ZQOQFgkWkJO0WYjMxB1BoFCmi4mB9tAreD2m52TW3fHmCXo961492saoEJ3BJPhln fDpRiykFT6tRSbOD9Jo9PZujU9SmRjbHCw9KwquNrR9IU2Vpea9yp1nhIlq/xGcqQE B4JdR6sjqus719yzEhCThZEiNVS2zP9yEBXs0x2I= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C9893F804CF; Tue, 30 Jul 2019 11:32:31 +0200 (CEST) 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 C4F82F8048E; Mon, 29 Jul 2019 14:15:21 +0200 (CEST) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-eopbgr750044.outbound.protection.outlook.com [40.107.75.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 92A2FF800E4 for ; Mon, 29 Jul 2019 14:15:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 92A2FF800E4 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="xfag+hcz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U96lCyEQ0s+/Sg5KLeINhKlSa54+I39lKQXMqGw7LUs0qZqT1009RTSR3dlUtfDbVDb5WbFXmSJrd/2jFG5OQVu3Ctw8PY9SAKmbSPK2Kk8Nk/7ZiNKfUHmwmii4C9yMCFxapbSi4BmnKbstjsljEG6130+b+pTpz6KUzdS2fvxLCFhuiYpCU7hPw/qymzms2li0vlYn5lsSoxbSR5xLwHVQ23XhI/CFMs9+Zy6hRyT//gqkQZdgkd06i+vVDCIgr8wY8jCLUsmJJtFesebXdHWE3rBfUQau64sI5gt3sBkIWjowQWAB2cbYL1QcHEpy51Nd8Rqxdix8bChQ/yADGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2fz4utKxUE7fldrbZ2bvj3Cc8O6BbWVdybm87o97p0c=; b=XK451W0Yru3YdXXRQZARlEFOtZ3XYZ8Xbx4QEZFDiN+WJgkG172r+OkflGRBEYy3y0giokVssLqies+tBn84/vVeHO5Kayzq+XX2tsN9E03dJUho1Ot3RKkwsHVu3USkOLkjZuy+cdFiE8V6V+LsZilB7hTY5rd7Gt9ntE6u7X7hGl4y6wvhrlcBEpk2c1zp+RxM/D1X8bm7XCcnVJEYb5wxv96A+xBsvnzKoagn6u85lBE6Kw0GSeNIggezILHnJ7g0Bg/CE2rhjf0Zu++mKywmECFG5gJ76pi/TJOZFP7GO4piSVkBOAK8ayTUfr0LOL/1bAeuAcMfPZMuJX9MQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=alsa-project.org smtp.mailfrom=amd.com;dmarc=permerror action=none header.from=amd.com;dkim=none (message not signed);arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2fz4utKxUE7fldrbZ2bvj3Cc8O6BbWVdybm87o97p0c=; b=xfag+hcz6HIKQKRKU18EXrtNl92vkLOA9UAbGV/3RMeYxsNcgW1V+w46Txy7rl8solEGsCkw5I4sdYd72IULQ/ag3cgpmt9IHmnNQO9N2cWpOm4RvNE0jwQoza8sc81Ac2x4+A6qbRS4aPFJgcHXk2FWPfHfkNBB8xuQuA+3/ak= Received: from DM6PR12CA0026.namprd12.prod.outlook.com (2603:10b6:5:1c0::39) by MW2PR12MB2426.namprd12.prod.outlook.com (2603:10b6:907:8::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.14; Mon, 29 Jul 2019 12:15:15 +0000 Received: from DM3NAM03FT035.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::201) by DM6PR12CA0026.outlook.office365.com (2603:10b6:5:1c0::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2115.15 via Frontend Transport; Mon, 29 Jul 2019 12:15:15 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; alsa-project.org; dkim=none (message not signed) header.d=none;alsa-project.org; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by DM3NAM03FT035.mail.protection.outlook.com (10.152.82.188) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2115.10 via Frontend Transport; Mon, 29 Jul 2019 12:15:14 +0000 Received: from vishnu-All-Series.amd.com (10.34.1.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.389.1; Mon, 29 Jul 2019 07:15:13 -0500 From: Ravulapati Vishnu vardhan rao To: Date: Mon, 29 Jul 2019 17:38:31 +0530 Message-ID: <1564402115-5043-3-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564402115-5043-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> References: <1564402115-5043-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(4636009)(396003)(39860400002)(136003)(376002)(346002)(2980300002)(428003)(189003)(199004)(86362001)(8676002)(446003)(476003)(11346002)(126002)(316002)(16586007)(54906003)(2616005)(426003)(478600001)(70206006)(6666004)(356004)(70586007)(336012)(5660300002)(36756003)(53416004)(81166006)(81156014)(109986005)(305945005)(50226002)(50466002)(48376002)(4326008)(8936002)(486006)(68736007)(2906002)(53936002)(47776003)(186003)(7696005)(51416003)(1671002)(76176011)(26005)(266003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:MW2PR12MB2426; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 59e3deac-f884-4931-282b-08d7141e6989 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328); SRVR:MW2PR12MB2426; X-MS-TrafficTypeDiagnostic: MW2PR12MB2426: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:296; X-Forefront-PRVS: 01136D2D90 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: V+70G1wmObDP1XtV2jPbXEssiLYblU4iJQVG45Rli+GC+hJT4LMpFb4u42i5Ws63kec16VG/r1d1o0kuddXAbYHgv5fdNHa8MI8iffFmttlJGYYKkHwocPBX9XW9kN2WiKN0900YoW3//vD3lGh+jmblcPTrT0TXtKtjP0mGrTrL8zZ4BGc8cNUNgmut5XLYkGhzvIt6rm9NorCY24y+zAEroYmuMqN8H30h2TphZMAntpxjzMBJNRQ4LKrtYppsHrbvirST5UcRCaf6VwzS/T5EMIieJwppgUl9Xw7/W0k+VB2yJmgmLyB4m9oG7TkyHZ+haKASxgZC+pC65CBlcHmP4TkMj5PgIgx3kvpPcbq8o41TMzy4+ke2lu7X80CkSxlPWn5DmENrN6QnvbQT4eJs7AqFFum2zbUOffoGYVo= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2019 12:15:14.5512 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 59e3deac-f884-4931-282b-08d7141e6989 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB2426 X-Mailman-Approved-At: Tue, 30 Jul 2019 11:31:28 +0200 Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Maruthi Srinivas Bayyavarapu , open list , Takashi Iwai , Liam Girdwood , Sanju R Mehta , Ravulapati Vishnu vardhan rao , Mark Brown , Vijendar Mukunda , Alex Deucher Subject: [alsa-devel] [PATCH 3/3] ASoC : amd: reduced period size 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" X-Virus-Scanned: ClamAV using ClamSMTP Reduced period size and offsets. Signed-off-by:Ravulapati, Vishnu vardhan rao --- sound/soc/amd/raven/acp3x.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h index 4f2cadd..033e2a9 100644 --- a/sound/soc/amd/raven/acp3x.h +++ b/sound/soc/amd/raven/acp3x.h @@ -23,17 +23,17 @@ #define ACP_SRAM_PTE_OFFSET 0x02050000 #define PAGE_SIZE_4K_ENABLE 0x2 #define MEM_WINDOW_START 0x4000000 -#define PLAYBACK_FIFO_ADDR_OFFSET 0x400 -#define CAPTURE_FIFO_ADDR_OFFSET 0x500 +#define PLAYBACK_FIFO_ADDR_OFFSET 0x00 +#define CAPTURE_FIFO_ADDR_OFFSET 0x04 #define PLAYBACK_MIN_NUM_PERIODS 2 #define PLAYBACK_MAX_NUM_PERIODS 8 -#define PLAYBACK_MAX_PERIOD_SIZE 16384 -#define PLAYBACK_MIN_PERIOD_SIZE 4096 +#define PLAYBACK_MAX_PERIOD_SIZE 8192 +#define PLAYBACK_MIN_PERIOD_SIZE 1024 #define CAPTURE_MIN_NUM_PERIODS 2 #define CAPTURE_MAX_NUM_PERIODS 8 -#define CAPTURE_MAX_PERIOD_SIZE 16384 -#define CAPTURE_MIN_PERIOD_SIZE 4096 +#define CAPTURE_MAX_PERIOD_SIZE 8192 +#define CAPTURE_MIN_PERIOD_SIZE 1024 #define MAX_BUFFER (PLAYBACK_MAX_PERIOD_SIZE * PLAYBACK_MAX_NUM_PERIODS) #define MIN_BUFFER MAX_BUFFER