From patchwork Mon Mar 12 06:34:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 10275505 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 1B63260211 for ; Mon, 12 Mar 2018 06:33:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A9D12896D for ; Mon, 12 Mar 2018 06:33:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F260228AC8; Mon, 12 Mar 2018 06:33:56 +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 11AEA28AC1 for ; Mon, 12 Mar 2018 06:33:56 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 6C13B2676AC; Mon, 12 Mar 2018 07:33:46 +0100 (CET) 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 8468B2676B0; Mon, 12 Mar 2018 07:33:43 +0100 (CET) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0062.outbound.protection.outlook.com [104.47.40.62]) by alsa0.perex.cz (Postfix) with ESMTP id 3B8B6267614 for ; Mon, 12 Mar 2018 07:33:38 +0100 (CET) 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=bL4iL70fnEZnaKlpO05x2NZG8Vv4VLp8AVkQYSgZ1zI=; b=HBB2KN8WDoev2KWgZQe9JNmUKiF0nFxVu3Mvs9YqoKfvpGgw81JAKXOnvgyqee7WvXGmd6SbBQuszkPZpJ0yNeYimLQTcdG+3yyDpaOW/ZRupHPWjt1kjI6TMQGEcoH8Gr5r5ymbJOXrqrmvrvUnC73D1VsDREr7npApcZP7jno= Received: from DM5PR12CA0016.namprd12.prod.outlook.com (10.172.32.154) by CY1PR12MB0027.namprd12.prod.outlook.com (10.160.158.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Mon, 12 Mar 2018 06:33:37 +0000 Received: from CO1NAM03FT037.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::208) by DM5PR12CA0016.outlook.office365.com (2603:10b6:4:1::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.567.14 via Frontend Transport; Mon, 12 Mar 2018 06:33:36 +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 SATLEXCHOV02.amd.com (165.204.84.17) by CO1NAM03FT037.mail.protection.outlook.com (10.152.80.241) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.18 via Frontend Transport; Mon, 12 Mar 2018 06:33:36 +0000 Received: from LinuxHost.amd.com (10.34.1.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.382.0; Mon, 12 Mar 2018 01:33:34 -0500 From: Vijendar Mukunda To: , , Date: Mon, 12 Mar 2018 12:04:19 +0530 Message-ID: <1520836460-21809-7-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520836460-21809-1-git-send-email-Vijendar.Mukunda@amd.com> References: <1520836460-21809-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)(376002)(346002)(396003)(39380400002)(39860400002)(2980300002)(428003)(199004)(189003)(110136005)(336012)(16586007)(54906003)(2906002)(6666003)(2201001)(105586002)(36756003)(305945005)(51416003)(72206003)(86362001)(478600001)(76176011)(7696005)(316002)(5660300001)(47776003)(77096007)(26005)(186003)(2950100002)(104016004)(53936002)(50226002)(106466001)(81166006)(50466002)(8676002)(356003)(68736007)(48376002)(53416004)(8936002)(4326008)(81156014)(39060400002)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0027; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT037; 1:B4gNTNMdE1WEPO78Ni+1rAChaHBpGHqKmQsQsDALmLfyOAiXRaz8En2bocOi4/nynPw0zDn5udd75+p56C153yAeHnLrd8jlzNgTtvRgZuD+w1CY40V1PSDT0vce0qND X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 760d7b7d-06f0-45dd-5b21-08d587e32f7e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:CY1PR12MB0027; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0027; 3:/MePPFi+kiq6jisYE4sQvwx6aNczteQS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DqrYKKYOfgVY7l+hpxfDYhLVmJmTwQOZ7I+l8XhvRmlQWWy3ssYEp8QBjBuQR7YCmQx05SIL448xNyDDmkbhX8tuOricVewpqg3lYb7McP0k9mwmWJgVTOTuGi/dK85A+d2zNd/1j4gjFTvnDNt3nZ3ZywcODLSSjz5qn7v9W8RVOZm5yTusOZS9DuqkcDTc5t69uyx5jVtiaQdViBtFXOM5+dlWD0ny/EsxKVwixdrHJQU5MEdM8NFXmuSq64FysRiX3gqjE1Dcg1kXDi0WWuEa2+3Hgmpm1voQLmOjUgv83gF54Y6WBqyWNfwvhvetq7KYwAnRoY8wxOsqBddVPl6+bB95O/bg+QS1QBQfOBdDKEpY+neZtLkp28QctqgoXur6hNknP8fjxNIICLhMPWifxm6LDTZKf9hrnB0z7Pt/p275+T0apN 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)(93006095)(93003095)(10201501046)(3231220)(944501244)(52105095)(6055026)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:CY1PR12MB0027; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0027; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0027; 4:WeimQ//WGDspK4X0R/BwAgMd7XlWecejPdoTY3Uxz8I1TNLBBoEsgAyhG63soL/xvzyexqhf8QckJSlqYgErsMLyDhtIGTb/x1nL1k46Vqkzkka0qcB2sLNWlLmkSgJdR0BxYBPLtiIvzk3ryinOOtZVzYl1YZOdIFW6t9ckRlgdufK2DgHqNudS2bRXm4f/sie0TJX6ZCvSK54DuvnhlZKnQGwMlGJOKfbSUewk3o0IJbwxh5x5XPblrXQdgT/ncgakikWYu5aqa6xOoo0My7J7OCBkQallei1PBsfTd6kpnIWDMhwa2Cp2OtGaOJ0y X-Forefront-PRVS: 06098A2863 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR12MB0027; 23:x8aD2QSPeUT9n2jBskAQPfHOQeFZLs05LCb2I1oo1?= =?us-ascii?Q?D+4kygxiGTRjS80JT5JQBSN6hnfdROz8a5fdsStdpXOya9rGE25v/MTIG7SR?= =?us-ascii?Q?IQB8gzrDkeogxXVyvaYINF2F0UTXHrLsDFKlDHPdJg8AefJlSdxbo7pCrNr9?= =?us-ascii?Q?SNIsBxwx4h6ny/IHXQ1WjFM9nr+EbRhGOdh9erUlHg7+yN8rqs1JA6fCZbCx?= =?us-ascii?Q?kG99AASHBQ2BONHoCcNZsTg2OJuwnC8sKUEEgnYb1a71qg0mtDTEjlAkp06c?= =?us-ascii?Q?wwujHMQnCTV3O4qNspTOYN0S7XLAKtpLjUpjo8+QS5D4DnH5hqmD1/G7L4No?= =?us-ascii?Q?BFKi/rVfjH6Ivg0aYUQ7au1wZbWx6Wf4GPaHsU6l7EwXgKZhZMCUITLQpVU6?= =?us-ascii?Q?4/CEtM8YrUDwGh0fp7yFEgpvXvnFFgCt7EigyHaY0SqzsiiarFTRX/Mb/Naa?= =?us-ascii?Q?wCxG+K4BULN5o9glOSf7rJjJHJStEK4coIbEwoLxcWxzEIZI3+IjLbAqbda3?= =?us-ascii?Q?RgcXlnLpxHGku25mCklwm2ufJXI+PCUXu/9QZ788Wyv88YYY0LhdQ7glcgNK?= =?us-ascii?Q?Q/wD4PUafN8sLnF2/InqIgfCBQ7i3gLoh9rE712jU+YBTaVE0gLHYur+Xymx?= =?us-ascii?Q?o6ZivYJXVrrZuLb91IPLDuO4iHSPAhc1qRdoMRVWLcbArlD0t2/ZEDc6HSSQ?= =?us-ascii?Q?m/QiyNr5cclpnkJOVBXTRXUKS9EaojJLZxmJ/Zh4Vwy4SGEN8izLOnoNuBeE?= =?us-ascii?Q?XxNROwZjQnYfjpxjD5GTv3KRnz068pgULS6L41IP9RVQQkgNvF72m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5iUPubiQVGOi88OAtxJ8r7npmh8j0SLOqArpE9I6bsSH8sM0gziBl4ghBjxfHpz3lG8a7Jv7VTU+jXQtnQu9SDEJDKbuQbRYxktMNJmDZTXf39gwZ9QackA=; 24:mSkNairczNpax3IsYUVCxuqByhem4xH4YtXrdMUhny7SjKYtopu1sS0G5ZOvJ3DqqzhoMSc/MPaaV5VyqrSK2+YVYI5vTyUuyW80JP34BO4=; 7:RQ251rwWmmCAQATs8xcXuED5aiPL5SvNUHYQX8k+CD82wBRi0h55gZY35kRVJ9c6Y5xcJA0F6MKzio3NM786laS8tkBxd6boLuFdeen2PDou8KzrNwwOxqds6NDY1+8JwB8Wy+cDLFDWKdOjPw1Jsxtc4vlzCGUxHmAxkzImSGVomauKDPCd4f/qwSJDzigcfXTFwhd9Fnloiu+gHc3a81yU+oe2uWWfRV1+g1qdsEuqog24fxbV95TNeG/chaLE SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0027; 20:HqGAGajp3g4fzKShw2DlgHI2/0WjppY4mXDFUyJ2ME3A+wO8J5LR6wUYgpQKOF36197aMVT/vRETxfTtGP6nb7hz0+YRaBtI0v60NQ1CxAAUyVejB7TG8Tr3vbVy807bMmj+mPc9lHIxFLlNe37i8efsLUShre7EusDBNfsprI3ijAxNsutLbaKNmD+WiHCqsgzdk8/Dc0ti0snd0qABI7EMaFSd8c83af+Eu6U25DZoVqb9jPLcWxnSdF3qvYfW X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2018 06:33:36.3804 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 760d7b7d-06f0-45dd-5b21-08d587e32f7e 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: CY1PR12MB0027 Cc: tiwai@suse.de, Alexander.Deucher@amd.com, lgirdwood@gmail.com, Vijendar Mukunda Subject: [alsa-devel] [PATCH 6/7] 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 | 23 +++++++++++++++++++---- sound/soc/amd/acp.h | 1 + 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index ad46719..a6787ac 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -919,10 +919,25 @@ static int acp_dma_hw_params(struct snd_pcm_substream *substream, 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; + 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); diff --git a/sound/soc/amd/acp.h b/sound/soc/amd/acp.h index d40749a..cd83a03 100644 --- a/sound/soc/amd/acp.h +++ b/sound/soc/amd/acp.h @@ -105,6 +105,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 #define I2S_SP_INSTANCE 1 #define I2S_BT_INSTANCE 3 enum acp_dma_priority_level {