From patchwork Mon Mar 26 13:13:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 10307789 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5F07060386 for ; Mon, 26 Mar 2018 13:13:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FD90296BE for ; Mon, 26 Mar 2018 13:13:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 345C4296C0; Mon, 26 Mar 2018 13:13:11 +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=-1.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2998C296BE for ; Mon, 26 Mar 2018 13:13:10 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 129E0267338; Mon, 26 Mar 2018 15:12:56 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 33D1F2672BA; Mon, 26 Mar 2018 15:12:53 +0200 (CEST) Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0087.outbound.protection.outlook.com [104.47.32.87]) by alsa0.perex.cz (Postfix) with ESMTP id F0ECD26720A for ; Mon, 26 Mar 2018 15:12:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+LbXHRiG3FjXk//zmuc3oEXA+O7RiiVx0PEuFY60/pM=; b=mfbmu8m5/GNcjZWSJM4qUc6Dre7S4INiKX7vuoygVd8sHMPvVwbPSW88/Qo6aQD6WNcRWcVLgo1bDnO0sMzf0NsglghlGHQ1ALJYNWHnZ+Bf8vjmgg62Q3f81id/47q5PARIkggqzhJkkVcdDPD9Z7IRr5gYhF0WaQrt/8Ib2Eo= Received: from CY4PR1201CA0001.namprd12.prod.outlook.com (2603:10b6:910:16::11) by BN4PR12MB0756.namprd12.prod.outlook.com (2a01:111:e400:59bc::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.10; Mon, 26 Mar 2018 13:12:46 +0000 Received: from DM3NAM03FT012.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::204) by CY4PR1201CA0001.outlook.office365.com (2603:10b6:910:16::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.10 via Frontend Transport; Mon, 26 Mar 2018 13:12:46 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; gmail.com; dkim=none (message not signed) header.d=none; gmail.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 SATLEXCHOV01.amd.com (165.204.84.17) by DM3NAM03FT012.mail.protection.outlook.com (10.152.82.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.631.7 via Frontend Transport; Mon, 26 Mar 2018 13:12:46 +0000 Received: from LinuxHost.amd.com (10.34.1.3) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.382.0; Mon, 26 Mar 2018 08:12:45 -0500 From: Vijendar Mukunda To: , , Date: Mon, 26 Mar 2018 18:43:02 +0530 Message-ID: <1522069983-11381-8-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522069983-11381-1-git-send-email-Vijendar.Mukunda@amd.com> References: <1522069983-11381-1-git-send-email-Vijendar.Mukunda@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)(39860400002)(376002)(39380400002)(346002)(396003)(2980300002)(428003)(199004)(189003)(72206003)(48376002)(11346002)(106466001)(4326008)(26005)(478600001)(54906003)(316002)(39060400002)(5660300001)(8936002)(81166006)(8676002)(81156014)(50466002)(305945005)(186003)(53936002)(77096007)(110136005)(2616005)(336012)(16586007)(53416004)(76176011)(104016004)(446003)(2906002)(6666003)(105586002)(2201001)(47776003)(36756003)(97736004)(51416003)(7696005)(68736007)(426003)(575784001)(356003)(50226002)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN4PR12MB0756; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM03FT012; 1:hOeebiWGx9pxLIP6MMK+RMHQZX5R921EGvDeMeqIrVeIn+smvCfWSEKuyw/uhR3tHadIBFaXciiA3XdvPMzUmEgRG7T6QSna2L+hkWZQzgTqYe90i45yjzNx4QG6mp2d X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 73ed8bbb-d974-4262-276c-08d5931b4478 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:BN4PR12MB0756; X-Microsoft-Exchange-Diagnostics: 1; BN4PR12MB0756; 3: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6EAdeiXVgl7C8WnFnKMPC/cl7/0lbwEdOig8ZR8uoeVDWRLazhICvFJljUFT/f6tEL7Cep0d/cNxl6uc/bnKg2AU1rSoVSN+KydC42cUP1Bd8WoJDIsUKXdtAxT5cvCPGHsZCOik0FfnnVVWyGHEmB5R/plz3xGb+CZCkgai1tGcHNtW69/MevJMkHMR8kQ4BvLdaAPP0EveU325byAnF0Lp0YVZJT8tBGt5rGxaJ1oF8F82foXG6T4XCQihyYZYy/XdmOabTqmLs7WqxSMP2D1gGYKKrnm9maWCkf3qNNM6/gHd/jXbYsxQXyB46jNhMM8cTAKSsv2G4eFDhPlYv6Cr9GmaVnGqqVJ/E3OqG/xmpzFMWOti8SmxTYJlB/C+C1bfQIjtPKKO5WI52n2NdQJxtpY6c2GwX0z5ZiN2hcv9EULLKRTLPIZwHdHARh+K X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231221)(944501327)(52105095)(93006095)(93003095)(6055026)(6041310)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:BN4PR12MB0756; BCL:0; PCL:0; RULEID:; SRVR:BN4PR12MB0756; X-Microsoft-Exchange-Diagnostics: 1; BN4PR12MB0756; 4:w77r5xUeCBjFR7mrflFfwFVFtj7SoEvAlbsApmd50RTs42GI1fp9TXT7KZYR3LMZDfnzHDFvi+cCGvd1WzE3VYokT6Eluuai4W8lNGt+YbmNMfFnSx+ISKb3ffau8KQoQSXndt4c0/E4BaLC4d42Sl0LgrtIOZrBUS98/XQpbuyoLvJBibeZlj+h9ERveW/RtdjNtWLmXF0P7nM5/uoBhP7iuH2gLSTzQSrLGE2HA7pU5cGNvbs4X3X6Gez3rVwOp81EyUeUWZL1yjTCRT6/UrjLrx6lx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SPT60FB+P0xocAF5YUn8O/cnpwtyH9i0vcJld4NlxMihv5V9p6z7ohEBipF+p/JZN9CPgyuW9lVemHiLzvQM7hiQZfrsBRat3JE9/1QLMrPk32VV7bSQpFgn04yA3TlCvzUWDpTCrkeLcIBVxiabPa/gnXOQ==; 5:7HReD+MY4tPqqhad+dOEtk0yNjRneCfTdEg5mVy5lPV0fCeyB6bLloyV0Mo+dw07/8afgaKDr4snbCGkIIUiy29Egahc+N8bZhaF4ofZhafB8lzloh/AyAJB0ZRAskiYYPhI0E49o9oC/Zru607LhTciTL7TgoOeUaNueiIFUPQ=; 24:cj8J6hLNh6IgpXSaWLhFjkIHzzF5YJeCPiCP5OytJNw06YWDKLssztHozmMbUH6PHcDKl9H83fKieWHhmW0OV4qhxfdQUIuCIzUSdTTpHAU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN4PR12MB0756; 7:1Y+DMszaoECCHXJH+0lWKR35X/kXMvZ7tlw+48+BUcj5dDP8TOq+kzpBSwVe68L+2KfPtegytM8jTWnJAS5vBrls3Prct7YJrO8WdXtcrzKsNz66pMQEUCEc7sWEJe0srktb2ZpnjaRkkVsBt/r3Y3oDDsySFbAjk/wFF4PJzOEGVsou7sr1SarcoFKw0yTvn2DXsdmmzRBqWlsswHwqY6JMgILLdmBsdyKTM3NTPS3rPrISaSHi/x8BTzYELm+j; 20:k9H5VxacaFFcpdQuMfBbOLARyqPyVnl2lQjYnPQXNHZH05VFb5B1a8szk28wg8zvuGCCCOlruJ/mR4zhnfvJU4xaV3dBtTHmzhQPrGOSoWmXdCRAEThW768SwkgO7CHqPXVGHzOcmn2M39GWzLlG5F5H+YQdrg7pU9rYzUdY//Kx9Hu/1xBJRqdfMOqGqVBeQeqUi7ChfD+3ZgnF8HO2bgYkKYrXuBDVwBw2HsYGTCtNn9xy7XWOp74yV9jvGhBA X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2018 13:12:46.1793 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 73ed8bbb-d974-4262-276c-08d5931b4478 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=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR12MB0756 Cc: tiwai@suse.de, Alexander.Deucher@amd.com, Vijendar Mukunda , lgirdwood@gmail.com, Akshu.Agrawal@amd.com Subject: [alsa-devel] [PATCH 7/8] ASoC: amd: 16bit resolution support for bt i2s instance X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP added 16bit resolution support for bt i2s instance for stoney. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp-pcm-dma.c | 29 +++++++++++++++++++++++------ sound/soc/amd/acp.h | 1 + 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index c695e42..92b163a 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -916,12 +916,29 @@ static int acp_dma_hw_params(struct snd_pcm_substream *substream, return -EINVAL; if (adata->asic_type == CHIP_STONEY) { - val = acp_reg_read(adata->acp_mmio, mmACP_I2S_16BIT_RESOLUTION_EN); - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) - val |= ACP_I2S_SP_16BIT_RESOLUTION_EN; - else - val |= ACP_I2S_MIC_16BIT_RESOLUTION_EN; - acp_reg_write(val, adata->acp_mmio, mmACP_I2S_16BIT_RESOLUTION_EN); + val = acp_reg_read(adata->acp_mmio, + mmACP_I2S_16BIT_RESOLUTION_EN); + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { + switch (rtd->i2s_play_instance) { + case I2S_BT_INSTANCE: + val |= ACP_I2S_BT_16BIT_RESOLUTION_EN; + break; + case I2S_SP_INSTANCE: + default: + val |= ACP_I2S_SP_16BIT_RESOLUTION_EN; + } + } else { + switch (rtd->i2s_capture_instance) { + case I2S_BT_INSTANCE: + val |= ACP_I2S_BT_16BIT_RESOLUTION_EN; + break; + case I2S_SP_INSTANCE: + default: + val |= ACP_I2S_MIC_16BIT_RESOLUTION_EN; + } + } + acp_reg_write(val, adata->acp_mmio, + mmACP_I2S_16BIT_RESOLUTION_EN); } size = params_buffer_bytes(params); status = snd_pcm_lib_malloc_pages(substream, size); diff --git a/sound/soc/amd/acp.h b/sound/soc/amd/acp.h index b697dcb..a91f0a9 100644 --- a/sound/soc/amd/acp.h +++ b/sound/soc/amd/acp.h @@ -106,6 +106,7 @@ #define mmACP_I2S_16BIT_RESOLUTION_EN 0x5209 #define ACP_I2S_MIC_16BIT_RESOLUTION_EN 0x01 #define ACP_I2S_SP_16BIT_RESOLUTION_EN 0x02 +#define ACP_I2S_BT_16BIT_RESOLUTION_EN 0x04 enum acp_dma_priority_level { /* 0x0 Specifies the DMA channel is given normal priority */ ACP_DMA_PRIORITY_LEVEL_NORMAL = 0x0,