From patchwork Mon Jan 17 11:58:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajit Kumar Pandey X-Patchwork-Id: 12715343 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 06EDFC433F5 for ; Mon, 17 Jan 2022 12:02:27 +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 52E2817D5; Mon, 17 Jan 2022 13:01:35 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 52E2817D5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1642420945; bh=n5eHGMl0zb2nIiQRI6ccweHq2sPweyjQrjpTcd7MYQg=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=fwlIykg+4NOEEVTOOl1eTJtEyaaxEkg3WHB5YKun9GwFzLBk6W9Uvrvz3nPemOnME ZU4imygFJRPz0mqEfddm9PwuQF7mewvj3j4swyXYn5Ye9+uttsZmobCAAw9Mpj4kGO 6Dp/Ne4KCPqk40lBt2KrCGRu2b1rTNiORVEv3g0g= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D4FF3F80254; Mon, 17 Jan 2022 13:01:04 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AE30AF80249; Mon, 17 Jan 2022 13:01:02 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2084.outbound.protection.outlook.com [40.107.243.84]) (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 3F1EEF80249 for ; Mon, 17 Jan 2022 13:00:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3F1EEF80249 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="DZnitXcn" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dxsgAyRp+T1xQ6yqWO87wEWesHQGh9AkdmfuL9Dy4D9BdnFVFPZKQG74uakauUiIge+1KVdH5InhHCHOD3AzIG++1pWmxuKqTzkdxMUmBMXqRJTcdHAc3Gycl8eqJ08Kvt8r0cZGkw9sR1zHoT2fI4TdVAsM0dNcHdHHF/pm8G7VjGtRkJCvCZOuC+nm/n4zGrkGxetnlx6wnXsmozZy0Q1RJBMcxR1bvKWC/d1+JD8y0BQci6QYpYAAJCyzRPkpLd3dDDh7irAiy5wxxd9e+HnCEaCmTJnbVOpF02HLnmSLZqpzqJ8N0jC3czrZwMqTQNDblpNXgqF+0lnuZcnbYg== 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=OXDcSj3NhHz8Yy5J8tGL976lb9dugtbIoOjOGzrwwTU=; b=aXikpEWaX7OoBLmiozMTKZCOmCjWfpBFXywvhrTnBjxeLz4t19hg1Fm8OF02Ot0aPkOXmBP198D/0KlYIT2LYoJkePWtIfP+uuXgq2/1uc8yGXVqxUGVFJh2IzU1uf3NuGK5BU46SMkFlqpCpEsWAAu/YE7q1Tk44qHqAPUhM0J95x++CwJa8koPO7HRomamUMxfOpJiIqrvQMWVVcY3TXIgyOSUZQliIRCk6KYpC9inI6GXgDSXb+hfNR/3G3w325bmw2QCu9RwMuEtSmE1x4aXGm72agSpqTbcz7EWOadBpNZybpLhxkTAF+lqjyt+EFxfs4TgZRzh9mNGmLc7Ww== 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=OXDcSj3NhHz8Yy5J8tGL976lb9dugtbIoOjOGzrwwTU=; b=DZnitXcnH14FuT1mQF1ICHagqM/3Izazsi6Ti3qKQoMzqT4ZSWgoBwFhVQUbOVi6eCN3+Of1sLNmCgqngoenkA5AKPt85UT/+j6e8uoUZ8C8au/nhbCAmyuZ41lT50yEx4CXK94aNfqObft1W74iSh5JjtsdRrCoRCAK0lNurRU= Received: from MWHPR11CA0026.namprd11.prod.outlook.com (2603:10b6:300:115::12) by MN2PR12MB3007.namprd12.prod.outlook.com (2603:10b6:208:d0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Mon, 17 Jan 2022 12:00:52 +0000 Received: from CO1NAM11FT016.eop-nam11.prod.protection.outlook.com (2603:10b6:300:115:cafe::e1) by MWHPR11CA0026.outlook.office365.com (2603:10b6:300:115::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.9 via Frontend Transport; Mon, 17 Jan 2022 12:00:52 +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 CO1NAM11FT016.mail.protection.outlook.com (10.13.175.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4888.9 via Frontend Transport; Mon, 17 Jan 2022 12:00:52 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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.18; Mon, 17 Jan 2022 06:00:49 -0600 Received: from chrome.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2375.18 via Frontend Transport; Mon, 17 Jan 2022 06:00:46 -0600 From: Ajit Kumar Pandey To: , Subject: [PATCH v3 5/6] ASoC: amd: acp: acp-legacy: Add DMIC dai link support for Renoir Date: Mon, 17 Jan 2022 17:28:53 +0530 Message-ID: <20220117115854.455995-6-AjitKumar.Pandey@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220117115854.455995-1-AjitKumar.Pandey@amd.com> References: <20220117115854.455995-1-AjitKumar.Pandey@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fb7f2f2b-b68b-47a4-0491-08d9d9b1027e X-MS-TrafficTypeDiagnostic: MN2PR12MB3007:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zo3e8W1WHaMS7TGfS3EX/LM9FUlrP3ZXdiXhLL9wlaEzgp5X+etn/GZOlHJmLB14D9XG6BwBVtOHPrwIGkCS5xvgM0xpIeq8Rs7YcDFWa2ykKzTTSBwRtoOdT/cKy9TQl/bz95aBFPlx8olnmZzwXI1d4yj0EQ8Q1fk5Dz4jayBiSKjEnXfnunigDrjajLFV8bL1JWTm3Iqx53aHDKtCDHv9PEmr97LFxWDxLwj+v7qtzYfGpQYgin9MKPO9QC3r8+K90eImuQ+uzpGRpJFaXepWKBTT3akicrGQnw2wBWkaw0AF4ICzPXdvGWMK+ktJZ19avfyU4kci0IhpxydXCpGUqw8Y0lxAB5uuhVGPCdwEvBVP/jOXFuJs2Mgh0emSsePZc4GoaQn2ALIOGcZRhz1b3muF12dNZFDo9eHwEo3CQrInOkLX4ESE6fXwEE9zyPqGTBKV9CUG02vmURxFz+M3fPi/J05p2SFfFFB2TXcnQIOPB6NlsMLGo8ESuMwnfcVYYDe8jfz04fkbIZMGlonG2AK5I0UJTMZWO8TzZiurQo383ouenaY/bX/CNUV+NZdAwewxKCr4qTVaQjr2koLJyp8X9K8erfGAd558OP8t4dTTabCCl8olV4ItfBuLhQOfK98PuY2lfW8PpajHL8dVIVE0A+iZH0J03MFMeEN/B1TmEH/dSqzyA/4HizwwFyv2QAJrDz9mgUo2A+viRRcybYooNCG23t/Bcc6T9gpUy0KpURwSVh3kDjUUfZazUkG+mpbXgML1FSiP05lds7GKNcXvr2tGfem6RiXaHz0= 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)(40470700002)(36840700001)(46966006)(2616005)(110136005)(336012)(186003)(426003)(36860700001)(508600001)(70206006)(70586007)(316002)(8676002)(54906003)(40460700001)(82310400004)(8936002)(1076003)(47076005)(81166007)(4326008)(6666004)(86362001)(5660300002)(7696005)(83380400001)(356005)(2906002)(26005)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2022 12:00:52.2169 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fb7f2f2b-b68b-47a4-0491-08d9d9b1027e 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: CO1NAM11FT016.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3007 Cc: Sunil-kumar.Dommati@amd.com, Ajit Kumar Pandey , open list , Basavaraj.Hiregoudar@amd.com, Takashi Iwai , Liam Girdwood , V sujith kumar Reddy , Vijendar.Mukunda@amd.com, Alexander.Deucher@amd.com 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" Add DMIC related dai link for pdm-dmic dai on Renoir platform with generic dmic codec dai. Signed-off-by: Ajit Kumar Pandey --- sound/soc/amd/acp/acp-legacy-mach.c | 4 ++-- sound/soc/amd/acp/acp-mach-common.c | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/sound/soc/amd/acp/acp-legacy-mach.c b/sound/soc/amd/acp/acp-legacy-mach.c index 0ad1cf41b308..91140d15691b 100644 --- a/sound/soc/amd/acp/acp-legacy-mach.c +++ b/sound/soc/amd/acp/acp-legacy-mach.c @@ -23,10 +23,10 @@ static struct acp_card_drvdata rt5682_rt1019_data = { .hs_cpu_id = I2S_SP, .amp_cpu_id = I2S_SP, - .dmic_cpu_id = NONE, + .dmic_cpu_id = DMIC, .hs_codec_id = RT5682, .amp_codec_id = RT1019, - .dmic_codec_id = NONE, + .dmic_codec_id = DMIC, .gpio_spkr_en = EN_SPKR_GPIO_GB, }; diff --git a/sound/soc/amd/acp/acp-mach-common.c b/sound/soc/amd/acp/acp-mach-common.c index c9caade5cb74..b45442a56c40 100644 --- a/sound/soc/amd/acp/acp-mach-common.c +++ b/sound/soc/amd/acp/acp-mach-common.c @@ -438,6 +438,8 @@ SND_SOC_DAILINK_DEF(sof_sp, DAILINK_COMP_ARRAY(COMP_CPU("acp-sof-sp"))); SND_SOC_DAILINK_DEF(sof_dmic, DAILINK_COMP_ARRAY(COMP_CPU("acp-sof-dmic"))); +SND_SOC_DAILINK_DEF(pdm_dmic, + DAILINK_COMP_ARRAY(COMP_CPU("acp-pdm-dmic"))); int acp_sofdsp_dai_links_create(struct snd_soc_card *card) { @@ -613,6 +615,25 @@ int acp_legacy_dai_links_create(struct snd_soc_card *card) links[i].ops = &acp_card_maxim_ops; links[i].init = acp_card_maxim_init; } + i++; + } + + if (drv_data->dmic_cpu_id == DMIC) { + links[i].name = "acp-dmic-codec"; + links[i].id = DMIC_BE_ID; + if (drv_data->dmic_codec_id == DMIC) { + links[i].codecs = dmic_codec; + links[i].num_codecs = ARRAY_SIZE(dmic_codec); + } else { + /* Use dummy codec if codec id not specified */ + links[i].codecs = dummy_codec; + links[i].num_codecs = ARRAY_SIZE(dummy_codec); + } + links[i].cpus = pdm_dmic; + links[i].num_cpus = ARRAY_SIZE(pdm_dmic); + links[i].platforms = platform_component; + links[i].num_platforms = ARRAY_SIZE(platform_component); + links[i].dpcm_capture = 1; } card->dai_link = links;