From patchwork Tue Dec 21 16:57:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ajit Kumar Pandey X-Patchwork-Id: 12690139 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A3FCEC433EF for ; Tue, 21 Dec 2021 16:59:26 +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 E7A74179D; Tue, 21 Dec 2021 17:58:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E7A74179D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1640105965; bh=/vPy7Cr+1maa4Unnl4Gh1wilwMJejT+UBdPJ80f3xtU=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=bWV7Pfc+Jfs9DWYfdEOvyoGjj74FNanD6MVhnHuGDRZJubAr+i/Tu2ChIPy8HbvN6 Ep2hCvhhZY1AeNIGZHIsE9g2hFmlI87zECsIS2NokUz6qy4yqnKnaPZC4fkpFKSEZg 64PWFNJ/FsdYQBNPUPKmTpSTvmz1AVjxB5zRqyaE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 83D17F8010B; Tue, 21 Dec 2021 17:58:34 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 154D5F80084; Tue, 21 Dec 2021 17:58:33 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2077.outbound.protection.outlook.com [40.107.236.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0FDB5F800B5; Tue, 21 Dec 2021 17:58:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0FDB5F800B5 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="cosPw0I0" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YxQx6jrhd35myjD75U9x8SzgHG5uFmH5yZbL1KwxhUGivaj+f87IykO8gAmSoU8KoGkAKyr/JBzgMJdwTJWmWFmm4M+YLdZzaVsk63swqygQ/LEn3EzhzC1J7e0gRNj2N+2Jxy3qcr7lwvaNHQvmDSABinILxBV58GGH2WbnAP1fUkM1E3GsA1f+qTBB5foUlYbHBDtgO89qAk4cax7p+yMuJhDSuGPaKb1XK81WG4DvjwJh0DUYzwugKFMwympbM7ku1Clw8aCVh/MwpdvekvoW14PnSjGw679/ADco4+CRGWrk8J8zw3FJLDeyNV71Mq6KAWuiBKwDdRHiwXDwog== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=guuz+3S5Y3y8QhWp4Gx1t5PJCx+cKgic+o6QtzrCju0=; b=LevfJKQW+K21donL3pWTwOkCETdVXk89rHe1uGajIFVi2CzK3Y+SSOiBkliARlFa4b/SDS76wZGviQzy8xQKqd4ueW2BzqdP3af5mOTpncmoHlBIvvWvp3M86ifJU7Yn+zOURgZsZUZT6IWzKa+ijt7MIAsD3XwdCHR1lTRz2X2+e/ZVNycJyo12b8ovrqaMJAJQtwsHcbcsF6hO1xyOu6nl1DsjWI7pDSOiBXL5eTnIu6ec5sRZdVrKhqeEgivubyDPTcu3J839RwLlV7N29IBfxbiMXyEegtd797lxdI/4rUt6bjDu7m8tW3Xlb8B6XjODbm8KkNq8RaPOCRvjZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=guuz+3S5Y3y8QhWp4Gx1t5PJCx+cKgic+o6QtzrCju0=; b=cosPw0I0+pvJBCgfN222PqB9AUTpxxiz093nMlAiJpTKL+wCEZBGK+0H0V/LWAO8nxcVLixZ9quiq3/d5NKxqoOZyH+0sSwAwtJbrIgwv7tNdKRECAdJDAiwee3qgG2mLoUt0jFmhoO9P773AoKiMZF88wtV8VTwcycoGyUzOUI= Received: from BN6PR20CA0049.namprd20.prod.outlook.com (2603:10b6:404:151::11) by BY5PR12MB4952.namprd12.prod.outlook.com (2603:10b6:a03:1d8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.17; Tue, 21 Dec 2021 16:58:20 +0000 Received: from BN8NAM11FT016.eop-nam11.prod.protection.outlook.com (2603:10b6:404:151:cafe::e0) by BN6PR20CA0049.outlook.office365.com (2603:10b6:404:151::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.14 via Frontend Transport; Tue, 21 Dec 2021 16:58:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT016.mail.protection.outlook.com (10.13.176.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4801.14 via Frontend Transport; Tue, 21 Dec 2021 16:58:19 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 21 Dec 2021 10:58:19 -0600 Received: from chrome.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 21 Dec 2021 10:58:14 -0600 From: Ajit Kumar Pandey To: , Subject: [PATCH v2 1/3] ASoC: SOF: AMD: simplify return status handling Date: Tue, 21 Dec 2021 22:27:57 +0530 Message-ID: <20211221165802.236843-1-AjitKumar.Pandey@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2b7141fd-4b67-45db-149c-08d9c4a31741 X-MS-TrafficTypeDiagnostic: BY5PR12MB4952:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:923; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F2Mpx9jQNTKKNHTIH9PMah568lF7ci4RruiEJwaVqfNiBLgcO5UjWJ9Juzqj4YxHb2JfMHoZu2Iy/r3aq3EKRbQv1EHXf5GYfLUO5dcPRxu6inZ6eyuY+Ig9rFqdfAvl4kLbLi54yk0Hkv64ldGY0SlBuDLieDY8qAg1aBtxKb8oAiKywYILHuSMQ70+vwq8VLeXe9LyN1PXwTEGTERNfZ44vBHG3NC7ckIgOWMH3CTX1GOcBXVB+F0EqzfkHcFnDe9eM/EO5eQjolZFq4KBAQwJSk7NsLNIU0iqksxPCUrV+GqrCqHmBuqsgiIELxmX2HLedYIc2smkIdIq8Yb4GhX3syT8+o9HSQHH7/xHmtLxUB8vIbSIp4qPAOu2sd980LtGbg6Jif6Kv2LDQT/qqeM8792buV83EBmIOV4hjIaOB7zxJb0z1Q1iDHGgBKJQnRinTdSQnvemaVp+Igahus+JfWK6R2padg38y0R+t01jWHh4EfrQvAts9Z0lVjyeZbqYRbIaeNAi6cIXidO9ztdGH3nUlstCtC5PM/KVGQp/sXc0kcaff/xDxHFYo6ZbYD4L4qm9UnQxCvA1OGPHnUHEhz5zA1kgFL8LTdWvVUkmrzHXjCid0A/FzRVte5ov2VVLQ3bFeIiLPI6FpqWZFGDhjfhL408lR4KK1phA9YNaPzKfnX+NhL5dH+ozOmsDQd9FAz0CoGpfxvALL2df4Sb2BiOxbpP7EGYzVHYovAsVmrqG1nE7wRRBvPjenb+KcsnyS3R4MRqcz2e4Cw8rbrLNCtAMgFAy9gWn+Fqdn0g= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(36840700001)(40470700002)(46966006)(2906002)(2616005)(7416002)(36756003)(1076003)(5660300002)(316002)(54906003)(81166007)(26005)(508600001)(40460700001)(110136005)(86362001)(7696005)(6666004)(70586007)(4326008)(8676002)(47076005)(356005)(8936002)(186003)(66574015)(36860700001)(83380400001)(70206006)(426003)(82310400004)(336012)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2021 16:58:19.8021 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2b7141fd-4b67-45db-149c-08d9c4a31741 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=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT016.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4952 Cc: Sunil-kumar.Dommati@amd.com, open list , Kai Vehmanen , Ajit Kumar Pandey , Daniel Baluta , Basavaraj.Hiregoudar@amd.com, Ranjani Sridharan , Pierre-Louis Bossart , Liam Girdwood , Ranjani Sridharan , Vijendar.Mukunda@amd.com, Alexander.Deucher@amd.com, Takashi Iwai , =?utf-8?q?P=C3=A9ter_Ujfalusi?= , Bard Liao , "moderated list:SOUND - SOUND OPEN FIRMWARE \(SOF\) DRIVERS" 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" From: Pierre-Louis Bossart cppcheck warning: sound/soc/sof/amd/acp.c:222:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/sof/amd/acp.c:213:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/sof/amd/acp.c:222:9: note: Returning identical expression 'ret' return ret; ^ Just return 0; on success. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Signed-off-by: Ajit Kumar Pandey --- sound/soc/sof/amd/acp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c index 4c5550e8d364..fe9b7dc5bc86 100644 --- a/sound/soc/sof/amd/acp.c +++ b/sound/soc/sof/amd/acp.c @@ -219,7 +219,7 @@ int configure_and_run_sha_dma(struct acp_dev_data *adata, void *image_addr, return -EINVAL; } - return ret; + return 0; } int acp_dma_status(struct acp_dev_data *adata, unsigned char ch) From patchwork Tue Dec 21 16:57:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajit Kumar Pandey X-Patchwork-Id: 12690141 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 398CAC433EF for ; Tue, 21 Dec 2021 17:00: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 356E117AD; Tue, 21 Dec 2021 17:59:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 356E117AD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1640106002; bh=S16gPPuGlUxa/fk0hqnBOJP0ohxQom1wD6mS5J7t6MM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=OrKJv46ON5oIeBgiQ2OTVawi4twotT8j2CtoUpvtERa9rZZegHKWbxSI7+2zb05LO KWF8tY27FFxHggEqwXOZbuMZIPgyxQK4JXZrhb1ldjbo3fnE6M1FyHFaPmXqinku4X pyGyj4DXxaCTcmypZFDdfCFdiVZpYUnk8/vjkN8k= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7BFBBF804D9; Tue, 21 Dec 2021 17:58:42 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1B612F804E2; Tue, 21 Dec 2021 17:58:41 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on20609.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eb2::609]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 49D5DF8032B for ; Tue, 21 Dec 2021 17:58:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 49D5DF8032B Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="HRnziHMF" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fRArfNDJhXyofGII/J2qJEZrhOwVVjRJlp9hzUMinIQbTR22x9SaIPeM/C7BQWVOINH7is0fHcAnYUqKNNV/0oZGt/Y+enqgFMtVuU8lQqglaliBEU0ogwJczzZ9NjoPfAEjp101WlH0/V/rDQRiVUS3Gj1cDscFosXXVxvfiGxgOI6uoA/LajThQ7mqR346cZncGlbHdgnHwLR1sujSIm3ilTBjJxFXmJqSFooeaLH7PwXPAHqSQznk4XOoqrOMezjnD+C5TMdP0LlZdI3VlAw4fRJTfiKTV/z1dEvKEPnKT2/Kg9Sav8efs9fTE5EJOnRUN/NcqqbM3nvak+8bXg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6HOPp8SIaCsf8ymzbSkTja/Ct8WQHh4JyKDf7i6huNo=; b=PkUakz+IR2kBZ5fgZxrwhNJeHVTqQ34g/F+d5PQKQ49MZa2gah83V+ZO7dgWpnw37uh6/8wmd8rkQr0WCSlHvdsHKZgtABo2emb2G882Wjuwauq58AmVIwRkqKPZ591wYfAajZXSFNWRMk6EeDv/fFckGXKXOcFCRnavFoFV5IUl9nbmuVKvyLjyHIqDid0cnvTi2eRQHXtTrj0QrEUKFS19eACUVRtTpln3kJ5KD52qgWKTikN/SXCOa8innGTwbYroLfxzEnFRjPfHcl66Pxx8Dy+aFdkrFNH3HPF85gxln05qWFPUaxsSFr7k/dsx0GIEGOUdY3+lgph4XmT9ug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6HOPp8SIaCsf8ymzbSkTja/Ct8WQHh4JyKDf7i6huNo=; b=HRnziHMFwKkUKXkTd66dSw4ZueDSxuRxCk6lEJnpHsoWSANEHAYPrh9c4XGvqxt7cdYJYEfA2z8Pax1pKTUbiXrglMl/7cGpxH39+VnyBLstf4L+WhrOzk+/MsW9vcfuXX+Jz93Ur/4H0gq3RhsICpEaRFj6hq2ePbY5ysr08Zc= Received: from MWHPR19CA0004.namprd19.prod.outlook.com (2603:10b6:300:d4::14) by BY5PR12MB4965.namprd12.prod.outlook.com (2603:10b6:a03:1c4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.16; Tue, 21 Dec 2021 16:58:28 +0000 Received: from CO1NAM11FT056.eop-nam11.prod.protection.outlook.com (2603:10b6:300:d4:cafe::21) by MWHPR19CA0004.outlook.office365.com (2603:10b6:300:d4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.15 via Frontend Transport; Tue, 21 Dec 2021 16:58:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; Received: from SATLEXMB03.amd.com (165.204.84.17) by CO1NAM11FT056.mail.protection.outlook.com (10.13.175.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4801.14 via Frontend Transport; Tue, 21 Dec 2021 16:58:28 +0000 Received: from SATLEXMB08.amd.com (10.181.40.132) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 21 Dec 2021 10:58:27 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB08.amd.com (10.181.40.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 21 Dec 2021 08:58:27 -0800 Received: from chrome.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 21 Dec 2021 10:58:23 -0600 From: Ajit Kumar Pandey To: , Subject: [PATCH v2 2/3] ASoC: amd: acp-config: Enable SOF audio for Google chrome boards. Date: Tue, 21 Dec 2021 22:27:58 +0530 Message-ID: <20211221165802.236843-2-AjitKumar.Pandey@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211221165802.236843-1-AjitKumar.Pandey@amd.com> References: <20211221165802.236843-1-AjitKumar.Pandey@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bc63b9a6-cd7e-4850-9889-08d9c4a31c81 X-MS-TrafficTypeDiagnostic: BY5PR12MB4965:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3631; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DbUEhH8/y/uGDgZ3h4pBQBRrweNAsHnA4gbXOiYRDr5PXva4ITkGpvjYdVHZC7avwKbiaSRdz5rZP2e0lKKA46FDW7NwCzWZll/KbcWD9x6Du1VPw6jgTAi5iuJ0vI+2OdMAzHKNDOvS3UFBcnVvf139KXEj8FrOJZspXEo6Ur3vE++tDQsSpDLpKLvyqoX1fZ1rXdQQSsRRiJmY0ecjlmL+Ocsxb+t4cvXWHEXoBHwAfk7Q3tQ3VomLt7odD9o/Nk62qZlIka6JKYIIL0EvDI+wZ27M232U438p2cNV0Oo2h6PnsFx/55XJHHq41+ZJ8g1KD5t7KBfSD6tgvHULn13WVHOBHAzxur/E2AWKoZWN5GKBwjmFfNI9T1RjNV4trNnhYgBcENIcNvJkmJceimOalmmfeUVSpBjMk/xTcnwXH//qZeYk+TB1GKp6JYrqn2Q6FMbuVW35g7WikBYv3Pz+O7gAqe1Wkezghj2iScNpgkjLf0F3BkhHL9TreRFGT306FdTJ4nMx7RNyqhj2ri+TqiZ//HPNLCrm8jXqHkca7zk9Z5eoFXN/686tuUuTDjrwxo/qghDtPHcTAT3mEuygDp8kcRW4jEwDnpXXdxPKuj8ANbxbTC5bS1Eu37D58XAVDavsxRVWkh84Mab8nKXPL7J7bEfpSOq97vdXUerYHvg+WlDvDgRCOb/UYbE99B/esqMyxGqfQiuZe/p2P5mUYDp0VaeCeKyJy6T/ed35U7pITCPT658RAxcg5VOz+pHymoiGibKAgpwxhOaP/YNDs1HhY/pPvHh3jIK/Lsw= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(36840700001)(40470700002)(46966006)(426003)(70206006)(2616005)(1076003)(4326008)(5660300002)(36860700001)(336012)(86362001)(508600001)(40460700001)(6666004)(82310400004)(356005)(81166007)(47076005)(36756003)(316002)(70586007)(26005)(54906003)(8936002)(110136005)(7696005)(8676002)(186003)(2906002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2021 16:58:28.4885 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc63b9a6-cd7e-4850-9889-08d9c4a31c81 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT056.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4965 Cc: Sunil-kumar.Dommati@amd.com, Ajit Kumar Pandey , Kai Vehmanen , open list , Basavaraj.Hiregoudar@amd.com, Takashi Iwai , Pierre-Louis Bossart , Liam Girdwood , Vijendar.Mukunda@amd.com, Alexander.Deucher@amd.com, Daniel Baluta 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" We need to support sof audio on different variants of Google boards. Add new entry in dmi table to enable SOF flag on Google chrome boards. Also add newer machines to sof_machines list with codecs and amps acpi id check to register sof sound cards on different variants. Signed-off-by: Ajit Kumar Pandey Reviewed-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen --- sound/soc/amd/acp-config.c | 53 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/sound/soc/amd/acp-config.c b/sound/soc/amd/acp-config.c index 1493d52c9290..c0bbcdb1761d 100644 --- a/sound/soc/amd/acp-config.c +++ b/sound/soc/amd/acp-config.c @@ -35,6 +35,18 @@ static const struct config_entry config_table[] = { {} }, }, + { + .flags = FLAG_AMD_SOF, + .device = ACP_PCI_DEV_ID, + .dmi_table = (const struct dmi_system_id []) { + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Google"), + }, + }, + {} + }, + }, }; int snd_amd_acp_find_config(struct pci_dev *pci) @@ -43,6 +55,10 @@ int snd_amd_acp_find_config(struct pci_dev *pci) u16 device = pci->device; int i; + /* Do not enable FLAGS on older platforms with Rev id zero */ + if (!pci->revision) + return 0; + for (i = 0; i < ARRAY_SIZE(config_table); i++, table++) { if (table->device != device) continue; @@ -56,7 +72,44 @@ int snd_amd_acp_find_config(struct pci_dev *pci) } EXPORT_SYMBOL(snd_amd_acp_find_config); +static struct snd_soc_acpi_codecs amp_rt1019 = { + .num_codecs = 1, + .codecs = {"10EC1019"} +}; + +static struct snd_soc_acpi_codecs amp_max = { + .num_codecs = 1, + .codecs = {"MX98360A"} +}; + struct snd_soc_acpi_mach snd_soc_acpi_amd_sof_machines[] = { + { + .id = "10EC5682", + .drv_name = "rt5682-rt1019", + .pdata = (void *)&acp_quirk_data, + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &_rt1019, + .fw_filename = "sof-rn.ri", + .sof_tplg_filename = "sof-acp.tplg", + }, + { + .id = "10EC5682", + .drv_name = "rt5682-max", + .pdata = (void *)&acp_quirk_data, + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &_max, + .fw_filename = "sof-rn.ri", + .sof_tplg_filename = "sof-acp.tplg", + }, + { + .id = "RTL5682", + .drv_name = "rt5682s-max", + .pdata = (void *)&acp_quirk_data, + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &_max, + .fw_filename = "sof-rn.ri", + .sof_tplg_filename = "sof-acp.tplg", + }, { .id = "AMDI1019", .drv_name = "renoir-dsp", From patchwork Tue Dec 21 16:57:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajit Kumar Pandey X-Patchwork-Id: 12690143 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 981CEC433EF for ; Tue, 21 Dec 2021 17:00:18 +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 D16B017B9; Tue, 21 Dec 2021 17:59:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D16B017B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1640106016; bh=Ks/DPFfL2CzZD3Da1XlMEUHLgU4bsnHxrqz4hYKqSVM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aYsliTSiYK4UTexSz/JhEc1ztGH5vWEXziETZKLRJPT9HhfCThK65snMW/xb+R1OI OdrT5IQl+nTHExji7h7Hwz6vSHnwRQ7OulRWTVUCmhbEgjGz4N7lX5qEKpLm8Gq/SF qxqW47xvwFs4hizz78IE3oAAyLP6CV53vqH+5Ja8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7F2C9F804FE; Tue, 21 Dec 2021 17:58:51 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8373DF804EC; Tue, 21 Dec 2021 17:58:50 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2085.outbound.protection.outlook.com [40.107.236.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 948BBF804EC for ; Tue, 21 Dec 2021 17:58:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 948BBF804EC Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="E9Licbpw" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cgHTUf+BJ4eoSPoYdTdMEQzXJ4YLUrVIeb/T6jwSNkbN36gxjTtl/46/4s2CS8oiFU1YG7q9IAnCwQ/z8NfOjr+QJHxc+/nhCeu8dlrwyCnPgl1WXVVqEsd+ph4NlS+Wg6G4Cl0eXOvx2gzv7elwYoi2sN1mHdck08xfrV7H2KnnbRZxFCTozMekVHpTdihOXIj51Oiw9kVE8+b41GHqZ83hZvmuLTL/g86mNETaZUoSt0l5VsnYfdurlpwoMogvC8Za6PFQD2yIm767VsFP5ORw6LErjBOUrEArotfaPOBCRXP5TBJ37qdujKl7LUpGkvDtjcxSXmV/DEUklYaB/Q== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rItwZkKUxti8nGR81PnvwHALhzE3fm9ukB6UAKqP8EM=; b=eEdUtK5iDz+qGA6e4E08s0ezwJe8WfXV/p2VSsv4Dyhlkn/HlSgn8+Yipg8I0ydK77aklr6gPt0v8H9BwVCxhnTMjAdCPam4X1Lmvmw+545tmXfFL+K8oqZ/Pc9Ngfxd++35ubqSZBPnqlJASDz2e77wjeMOrlG9UH9dNQIAlLSdXQuJDuLukANbZmdQdnfJ/Kn+0EXJVZ3YycGi5TFW5MTEnuLsE7QJSJrsh3zpHC5FjaJ8B24Cs/cpBR/67NqvMsf7kiRY7p4qRkbH30jCV/BhekiM/iV/BtfAAXXIcrEgeZoy5hteiQUQmpFC5ISYhjf1xbq1SYXfBM1PY7GzVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rItwZkKUxti8nGR81PnvwHALhzE3fm9ukB6UAKqP8EM=; b=E9Licbpwt7Xvqz6/yaUcsJ7x7jDlSBJLfqpYe+IldPkWTq0S6Tgl1Tr/kBP25WGDwXTDPIxlHZ/6B6vBt+JihyB9zvQVGjHbiKcICijCEui/16nkKEMsABGeW5rSyjHncqmnWlPs+tER9PBseSFYiENh/aWXCscsy4J8c4Ij4AM= Received: from BN0PR04CA0046.namprd04.prod.outlook.com (2603:10b6:408:e8::21) by DM5PR12MB1660.namprd12.prod.outlook.com (2603:10b6:4:9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.14; Tue, 21 Dec 2021 16:58:36 +0000 Received: from BN8NAM11FT034.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e8:cafe::6e) by BN0PR04CA0046.outlook.office365.com (2603:10b6:408:e8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.17 via Frontend Transport; Tue, 21 Dec 2021 16:58:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT034.mail.protection.outlook.com (10.13.176.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4801.14 via Frontend Transport; Tue, 21 Dec 2021 16:58:36 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 21 Dec 2021 10:58:35 -0600 Received: from chrome.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 21 Dec 2021 10:58:31 -0600 From: Ajit Kumar Pandey To: , Subject: [PATCH v2 3/3] ASoC: amd: acp-config: Update sof_tplg_filename for SOF machines Date: Tue, 21 Dec 2021 22:27:59 +0530 Message-ID: <20211221165802.236843-3-AjitKumar.Pandey@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211221165802.236843-1-AjitKumar.Pandey@amd.com> References: <20211221165802.236843-1-AjitKumar.Pandey@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f3d3da10-f21a-4d9b-40b7-08d9c4a320ff X-MS-TrafficTypeDiagnostic: DM5PR12MB1660:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1388; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TJe3ljX38qNBC+xeg5gmtgXbr0TVHt15sWkdlSLLWibyDpToXIZp+QLDVsjAWGYDUpgmzZ7AQKtIxCnZx2TmGQFVtF+JIocoJ61oLXuOD2X3SqOS2tdM9rFzBwhPifVEngXjsoLiKz6C7zI+4OQ3GZGlaf93Re5IPMlTO8+ds8hI6paeOMmqYGf9b/UKydo5uoCz7XGIxFiinkdTOOQPcH3Jyfl2ckeBCRpiL6WGCSqDOHLCLL9ztDa3KwcgTW5dPreLeAMJUJF2vYDKUTr6K796qfW/XUBqHlUnsxj4QW5YGMqdeEZEj1cQTwudk+YUJCFQg0th0T9MLgyjmpp007bHvkJlHW+1HrMSE5h4YTkWCPIiCbSwKsMJvK4gVd9Cc7XU0E3+zkh2ysMe29ismaQPb4uK1yz2dS5PS3eF7TPht2lHVWJK6VXoj2/FK4XIX5Gc9hkUyRzkUyaFGcxmUOBIZ6Ej6rcSYs4AGL/GkvmaYM3E5qOICyqTght5CD9hhl6984vvUfVoc5S4zWpXP6QcXegeT7zYWF3j1bxOBCFbd/p5miadMjGrdzA/IxiY4y2f/Kl6JJ8d+MTdglBMnkdRFg99KNvsDwfyeE1D6MAmcDUygT31PuyvoW94R9r9IAtPN+Xli6UmVTIz5HvWVS5sLK207SFxlhUYmrYtOeEKkz31uhKWV7iANZ6/YndA5B3nAsnGzlc1XUvMR+y8dwegmWttBg3b7+O3bWiIrnZLn4aJ19HoVD+QCLQ0o2Sixivy8SVSjD+qEqaILwyEGL+JG5VCdl02wHlhIeDcCnc= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(40470700002)(36840700001)(46966006)(110136005)(2616005)(54906003)(7416002)(6666004)(1076003)(8676002)(40460700001)(82310400004)(508600001)(426003)(47076005)(83380400001)(86362001)(316002)(336012)(2906002)(5660300002)(186003)(8936002)(15650500001)(7696005)(70586007)(70206006)(356005)(26005)(36860700001)(81166007)(4326008)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2021 16:58:36.1479 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f3d3da10-f21a-4d9b-40b7-08d9c4a320ff 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=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT034.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1660 Cc: Sunil-kumar.Dommati@amd.com, Ajit Kumar Pandey , Curtis Malainey , open list , Basavaraj.Hiregoudar@amd.com, Takashi Iwai , Pierre-Louis Bossart , Liam Girdwood , Kai Vehmanen , Vijendar.Mukunda@amd.com, Alexander.Deucher@amd.com, Daniel Baluta 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" SOF machines support different codec end points and hence required different topologies configuration. Update tplg filename in machine struct to load different topology files for SOF machines. Signed-off-by: Ajit Kumar Pandey Reviewed-by: Curtis Malainey Reviewed-by: Pierre-Louis Bossart --- sound/soc/amd/acp-config.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/amd/acp-config.c b/sound/soc/amd/acp-config.c index c0bbcdb1761d..c9e1c08364f3 100644 --- a/sound/soc/amd/acp-config.c +++ b/sound/soc/amd/acp-config.c @@ -90,7 +90,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_sof_machines[] = { .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &_rt1019, .fw_filename = "sof-rn.ri", - .sof_tplg_filename = "sof-acp.tplg", + .sof_tplg_filename = "sof-rn-rt5682-rt1019.tplg", }, { .id = "10EC5682", @@ -99,7 +99,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_sof_machines[] = { .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &_max, .fw_filename = "sof-rn.ri", - .sof_tplg_filename = "sof-acp.tplg", + .sof_tplg_filename = "sof-rn-rt5682-max98360.tplg", }, { .id = "RTL5682", @@ -108,7 +108,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_sof_machines[] = { .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &_max, .fw_filename = "sof-rn.ri", - .sof_tplg_filename = "sof-acp.tplg", + .sof_tplg_filename = "sof-rn-rt5682-max98360.tplg", }, { .id = "AMDI1019",