From patchwork Wed Dec 6 11:06:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkata Prasad Potturu X-Patchwork-Id: 174512 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp4028966vqy; Wed, 6 Dec 2023 03:07:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpfZ45ZLH1uXLa7NmmmsZQSx7IuTzoqNXqHE7aXR7+ZJuTBwnnQSn60ehFGCW4KmBrUZwp X-Received: by 2002:a05:6a00:4305:b0:6ce:72f9:8680 with SMTP id cb5-20020a056a00430500b006ce72f98680mr493849pfb.38.1701860868316; Wed, 06 Dec 2023 03:07:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701860868; cv=pass; d=google.com; s=arc-20160816; b=LGtak7ttuD/by99NKfmyvdRd4BTPVat3UyV4mxj/aP02adATRXeMb3d1+mLAb/lP6m 7th0SmKhCcz7KdwzmRe8tw93ARTaZg6Yst9yO9IgcQLdWpdg5PLxJWkoUROyDZ1R/zxi aftsfQFDu2WfvjCxFqqYX7l7jIC9WT1KLgC5Y5DtCMV3D0egRb0OrKGJxVyigx5ZYN+F 1Bd6RF7GtRrvNVx9a/RWAyReIqH0mIRVL/QEMt6Eq0g+7xdM18eblAMazxjiY+hVO18a b8C7Td8WDLG+mMOeYF5U4e9U+vThTKsY6ZNNbqDscnQY8VobsfzU6ZS6w8AwAeJeQ7om /yJg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PEKAv+2ap2RpYec7O8hW6yqQYk+MEILSgfpLaFATnJI=; fh=QRbGC+BkhZgiZHrFc14SkNryJhSADcHS0gCx3Rj5fQU=; b=h/XB25ih5o5kOM9BEAEjxKDKbazzn6jpnNZU0JWoGHvcc6AseHYNYBTvILm9VIU5wo lwT3u8Ms8a4h08cWud1GmgCsDsQYOsrxykkhEhOo23c447OKk8n5cuT197gAdpOUz3P8 DB4kRCJFPpuQqQsy2ERB5CqIBRbxdKru6Eba49xEUfzGgCHeAp6UlOMkoc/9I/X1r7QP YZFxvOwDMyaKohsxc6xc3++ZqPhpWXuJbARrxh2bsvnlEl8PNRjMFjLJX/PcFBNMdR9U oVFehzc8lmneHGPfMBxF4tni5oTjHcPX/3UJJfBU4DaIQXxJTKFUWghvajdzhdk4IwzB EAhg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=kl1ImfvD; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id y126-20020a636484000000b005c65defc409si7337217pgb.748.2023.12.06.03.07.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 03:07:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=kl1ImfvD; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 0CD5080BE09A; Wed, 6 Dec 2023 03:07:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377955AbjLFLHa (ORCPT + 99 others); Wed, 6 Dec 2023 06:07:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377933AbjLFLHZ (ORCPT ); Wed, 6 Dec 2023 06:07:25 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DCE8B9; Wed, 6 Dec 2023 03:07:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KLAxRUWjBtgz7Bup2q/kUDCjSLA3fKdYvG0rayfVuKY5Hmpmu2cSW/yo0Y5qd7oOutOFb4PkZwE0oI8ZWTDIiL86aaD4KPQqkHfYmtcE4SDl+BcuXUqA3JxELOXxobk5wl2Eq0ECARU8xvwYbATQJslbguWyRBQuDHidZzRHdltpy85xZwsz4GEhJHTCkKkBqC2ksqg47yvmfkxxQPk2xvcFFd6EjvNTGdjHezRykgn5JXnCTJ0JV2j/q027D6OS7sreBgbljGg9cuuPDLP85GR1x25hq+DJ8Jgz/F/aVMOiT1CXnzuxUSWPfNx8KYWq152cKgtwU64OqURjYMNWFQ== 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=PEKAv+2ap2RpYec7O8hW6yqQYk+MEILSgfpLaFATnJI=; b=PehT5ZGOVnGa+xwVTVJ+PkdSwfG7h5dxdTtD08G2U4ubmK+oTPkpcb0AjlijDwSiOASAMQeWXZ9tdRVg1C91gHZ8xyEto5kC7NBDMcKVY3DExbVeLvQfd4APf75Z7tM0CyxYcBF+aUZQCsm02VqTmmjQWiBXVlcbJ5as4wtNJBBUO4tEBumeC2yqiQjfb0AhnyTaK3thDNzoACaLqHFDDwVTqlg9HSFiuK0Jau3eKbjucEo5U84HohhuQcQ0yCy07IBZTmY9dzVYVNC0z3JDomzsOHCtwcOaoCsWmZ+1AYRs5NNI48Ss0Y+1T8WlLvoV9zIm1wn3LJuSwq2awPhmKw== 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 (0) 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=PEKAv+2ap2RpYec7O8hW6yqQYk+MEILSgfpLaFATnJI=; b=kl1ImfvDtNjXAA68zKg27hE/C/cN6ldFnktMNqAXrbOEH7KRQnbizIqnpOFs+q15RHs2BhQSkBdQnN4STJ9Txyv9/aYaAgYHk29tNJg2dM9K9jtb8gnJ+nC/gdnwgs5HZ9fFoLrRcTkDk6Vq7U3eMsT1EqhLpnFQ65l4QWBPWN8= Received: from DM6PR03CA0045.namprd03.prod.outlook.com (2603:10b6:5:100::22) by DS7PR12MB6311.namprd12.prod.outlook.com (2603:10b6:8:94::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34; Wed, 6 Dec 2023 11:07:25 +0000 Received: from DS1PEPF00017090.namprd03.prod.outlook.com (2603:10b6:5:100:cafe::95) by DM6PR03CA0045.outlook.office365.com (2603:10b6:5:100::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34 via Frontend Transport; Wed, 6 Dec 2023 11:07:25 +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; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF00017090.mail.protection.outlook.com (10.167.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7068.20 via Frontend Transport; Wed, 6 Dec 2023 11:07:24 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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.2507.34; Wed, 6 Dec 2023 05:07:16 -0600 Received: from prasad-lnx-mach.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.34 via Frontend Transport; Wed, 6 Dec 2023 05:06:36 -0600 From: Venkata Prasad Potturu To: , CC: , , , , "Venkata Prasad Potturu" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Alper Nebi Yasak" , Syed Saba Kareem , Peter Ujfalusi , Kuninori Morimoto , Marian Postevca , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 4/7] ASoC: amd: acp: Add new cpu dai and dailink creation for I2S BT instance Date: Wed, 6 Dec 2023 16:36:15 +0530 Message-ID: <20231206110620.1695591-4-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231206110620.1695591-1-venkataprasad.potturu@amd.com> References: <20231206110620.1695591-1-venkataprasad.potturu@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017090:EE_|DS7PR12MB6311:EE_ X-MS-Office365-Filtering-Correlation-Id: 88b8142a-6ba5-4a26-5b2c-08dbf64b8700 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CGyNFivQ5Ohu5+Dh/SE+jUcWvaZQvmg4vWgWkF0u3H93mHeesA4jc8J1eJQ44KXJBvQhHdUk2OGdJ9sZUaUAjkGIKyMQmcWxW0Rf5L5Cq4aFHn9HCbGviwBTHnzZIOD+bk6Z47sWHJg41atqkcI53wbDvSumezRRbVUePtcU+76UcUeyM5a5UA2ougBIjJ5SqL9GxOXPRiMHGXV2cp+t7td+punV/qcdf9TXCmWbf9cwKO/JAitYpbXOdyUVPMXsqMgrY8hMH8Hwuj9SCEfK/LjoIMRuKMnaeljPGH91iYi3VN6hnpLl8PRVdNbMaa4bNcyT28kWJQ1eaO+ZRKel/0oyv1O4pkMlfadMXmHh6ND7B6IHmBRSbRi/gDqcx2C491m7Fo8UxDjnTsisHcLelAbXPYcWgenk8cKaeyPI6TUZxG0nEesxSBPNbPuwGQkizVmkri272bP4YZuGQIt0wnersLBb2TxcXlGpklWIP04N2qr2AGfLJ5ra+1nieQscBRaQiBINEHpgLQnXw48lCVHEgD7hjVE4n5qvVQlQCIM9wvqJqBFQtRfw8JrcnR2CUUvX+XldPWJc7vwVBH5Dv6GJMjvLzj9ZJD7VPALbMeiD7E9IMEQDsXn3U7lR0odZRQFOhzvDtu4uYB7F0yV+09IVeSvGwB5PcJbPboUdkfX9XJqSULjOw7xH6iaMEqxIFgfTh9THiWxtDVoaDNXbARuNguPHSvLPvhWGcADSTtjg+Q6P2irrTA/mkLQhdTjTQIplF9PSfiiHWmgo4vbGrg== 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:(13230031)(4636009)(39860400002)(376002)(136003)(346002)(396003)(230922051799003)(82310400011)(64100799003)(1800799012)(186009)(451199024)(36840700001)(46966006)(40470700004)(2906002)(86362001)(5660300002)(7416002)(426003)(83380400001)(336012)(40480700001)(36860700001)(81166007)(356005)(82740400003)(47076005)(36756003)(7696005)(40460700003)(2616005)(6666004)(1076003)(26005)(8676002)(8936002)(4326008)(41300700001)(478600001)(110136005)(316002)(54906003)(70586007)(70206006)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2023 11:07:24.9891 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88b8142a-6ba5-4a26-5b2c-08dbf64b8700 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: DS1PEPF00017090.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6311 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 06 Dec 2023 03:07:45 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784530461905662323 X-GMAIL-MSGID: 1784530461905662323 Add sof_bt cpu id and create dailink for i2s bt instance in acp common machine driver. Signed-off-by: Venkata Prasad Potturu --- sound/soc/amd/acp/acp-mach-common.c | 25 ++++++++++++++++++++++++- sound/soc/amd/acp/acp-mach.h | 3 +++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/sound/soc/amd/acp/acp-mach-common.c b/sound/soc/amd/acp/acp-mach-common.c index 34b14f2611ba..4631af028f15 100644 --- a/sound/soc/amd/acp/acp-mach-common.c +++ b/sound/soc/amd/acp/acp-mach-common.c @@ -3,7 +3,7 @@ // This file is provided under a dual BSD/GPLv2 license. When using or // redistributing this file, you may do so under either license. // -// Copyright(c) 2021 Advanced Micro Devices, Inc. +// Copyright(c) 2021, 2023 Advanced Micro Devices, Inc. // // Authors: Ajit Kumar Pandey // Vijendar Mukunda @@ -1290,6 +1290,8 @@ SND_SOC_DAILINK_DEF(sof_hs, DAILINK_COMP_ARRAY(COMP_CPU("acp-sof-hs"))); SND_SOC_DAILINK_DEF(sof_hs_virtual, DAILINK_COMP_ARRAY(COMP_CPU("acp-sof-hs-virtual"))); +SND_SOC_DAILINK_DEF(sof_bt, + DAILINK_COMP_ARRAY(COMP_CPU("acp-sof-bt"))); SND_SOC_DAILINK_DEF(sof_dmic, DAILINK_COMP_ARRAY(COMP_CPU("acp-sof-dmic"))); SND_SOC_DAILINK_DEF(pdm_dmic, @@ -1348,6 +1350,8 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card *card) if (drv_data->hs_cpu_id) num_links++; + if (drv_data->bt_cpu_id) + num_links++; if (drv_data->amp_cpu_id) num_links++; if (drv_data->dmic_cpu_id) @@ -1497,6 +1501,25 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card *card) i++; } + if (drv_data->bt_cpu_id == I2S_BT) { + links[i].name = "acp-bt-codec"; + links[i].id = BT_BE_ID; + links[i].cpus = sof_bt; + links[i].num_cpus = ARRAY_SIZE(sof_bt); + links[i].platforms = sof_component; + links[i].num_platforms = ARRAY_SIZE(sof_component); + links[i].dpcm_playback = 1; + links[i].dpcm_capture = 1; + links[i].nonatomic = true; + links[i].no_pcm = 1; + if (!drv_data->bt_codec_id) { + /* Use dummy codec if codec id not specified */ + links[i].codecs = &snd_soc_dummy_dlc; + links[i].num_codecs = 1; + } + i++; + } + if (drv_data->dmic_cpu_id == DMIC) { links[i].name = "acp-dmic-codec"; links[i].id = DMIC_BE_ID; diff --git a/sound/soc/amd/acp/acp-mach.h b/sound/soc/amd/acp/acp-mach.h index cd681101bea7..a48546d8d407 100644 --- a/sound/soc/amd/acp/acp-mach.h +++ b/sound/soc/amd/acp/acp-mach.h @@ -28,6 +28,7 @@ enum be_id { HEADSET_BE_ID = 0, AMP_BE_ID, DMIC_BE_ID, + BT_BE_ID, }; enum cpu_endpoints { @@ -68,9 +69,11 @@ struct acp_mach_ops { struct acp_card_drvdata { unsigned int hs_cpu_id; unsigned int amp_cpu_id; + unsigned int bt_cpu_id; unsigned int dmic_cpu_id; unsigned int hs_codec_id; unsigned int amp_codec_id; + unsigned int bt_codec_id; unsigned int dmic_codec_id; unsigned int dai_fmt; unsigned int platform;