From patchwork Thu Jun 22 15:23:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Saba Kareem, Syed" X-Patchwork-Id: 695303 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 33F39EB64DA for ; Thu, 22 Jun 2023 15:28:39 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3E0EA1EF; Thu, 22 Jun 2023 17:27:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3E0EA1EF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687447717; bh=MRP0InxQls3A/qD8smrKvjN3jzJCbSuM0cMRRpKT1Rc=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=BQLkavgJTQaSfuhoWwAx4WtZM7NKlWRf86T8+pkSOOIlPpLBCQrgRBGxIZ+NxtApc oyMf9om4FU54BX6/SD7M6Hn3IsjHbzzMVOrwOlVqOzAQzhlaMT1R3nZep2LVkVZelx HIaQidh4lHgKLPVs9lHsmUAQci/Wp5lLAVzoaGW0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B6C29F805AA; Thu, 22 Jun 2023 17:27:00 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C9B7BF8055B; Thu, 22 Jun 2023 17:26:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C434FF805A0; Thu, 22 Jun 2023 17:26:55 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on20614.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eab::614]) (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 CCF92F8057D for ; Thu, 22 Jun 2023 17:26:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CCF92F8057D Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=5D8VVm2h ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bNP2QP5Ni+R04gUfBIZ/ME/Gg1p0hdux+QAscFzn4rPhpRPejY1XoQMhkBAR8+HfC8zbyWNKJkpyQXELxzIY9JklCAZrCk1wxlbe99rrleJTJZRU0tq4TotMhuQm5SPwTWK7JAnzvPq5AGYflxLjR9EE7qYFBGArPb66Wk7lio/n+iqYloirRyEhLw//vDEpHsktJYXa5CPnluhaMnYH2PXFBms6hNvhQYh96eN/H4kJnMld68KJBqs0wToiRezhtKtPkjlERmY+5UOEb2rstsiFG/wo7ti/3UqOWPfDDxUeI+FQminv0TuCSR+LDILYqIBGQg6x3YuoX3BZneTyUw== 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=y1gJUJChraGI/0cF68p/+kGmZoqkKWvMw/xcvMoaTYc=; b=GSJj0pAvu8KP+LFVJFDiCfrC0bCODaahDkW4D9KrlN3QtgrrinXQik7dJ4L4rAUdw81iPo7hUiqa6Dtg7lagctwcMdc+HgKJ1/kokmBAGzv/B4e/tKvQLTc+Qm8Xvulpl73dPRaXsuDeWEd2RqG9ftkrZg+H+J7pJp/a2wKO20jS0YTa+P9m4uGBsrdpC7/6ITl4aT2URFvALN9GXbY5Jcb0UBj6GJApKT1z0QyzsE3kWNGiIpEJfkdUC3/34KjExXD6AgA6la2y7YrIZBYsFHO+GYwEpNSiOgqhXjPRFb8z+iMDA4FxW8dLgk7FoeZgOy62V699riOId/IeqMsjvQ== 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=y1gJUJChraGI/0cF68p/+kGmZoqkKWvMw/xcvMoaTYc=; b=5D8VVm2h4Bp+FbQHygieZtd/DEnUODNOxQbl1o7CtgEdSRu9c9c1F9QZGfGszssPhLHuc3OdloiooXbc9kUuMeJwcllwH2Lowa0gX/rCU6BJBYOH6zMc/Ci3nbIChhgGP9ZoTDnNPoACljLVCVOcN83ie0L+3/NNGVqsEvWEIsQ= Received: from SA1P222CA0033.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:2d0::6) by DM4PR12MB7648.namprd12.prod.outlook.com (2603:10b6:8:104::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Thu, 22 Jun 2023 15:26:29 +0000 Received: from SA2PEPF00001504.namprd04.prod.outlook.com (2603:10b6:806:2d0:cafe::f1) by SA1P222CA0033.outlook.office365.com (2603:10b6:806:2d0::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24 via Frontend Transport; Thu, 22 Jun 2023 15:26:29 +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; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by SA2PEPF00001504.mail.protection.outlook.com (10.167.242.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6521.17 via Frontend Transport; Thu, 22 Jun 2023 15:26:29 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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.2507.23; Thu, 22 Jun 2023 10:26:27 -0500 Received: from amd-B450M-DS3H.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Thu, 22 Jun 2023 10:26:24 -0500 From: Syed Saba Kareem To: , CC: , , , Syed Saba Kareem , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , V sujith kumar Reddy , Venkata Prasad Potturu , Ajit Kumar Pandey , open list Subject: [PATCH 07/11] ASoC: amd: acp: store xfer_resolution of the stream Date: Thu, 22 Jun 2023 20:53:51 +0530 Message-ID: <20230622152406.3709231-14-Syed.SabaKareem@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230622152406.3709231-1-Syed.SabaKareem@amd.com> References: <20230622152406.3709231-1-Syed.SabaKareem@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00001504:EE_|DM4PR12MB7648:EE_ X-MS-Office365-Filtering-Correlation-Id: 66355664-f616-494e-2040-08db73350d42 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sjCB3Ll2q8XJjWgq0BeDcjq1LOU1Y/jp+ztjS/quar5R9bs/M4VnqNmKlqA2yvoL/0uKz//gQlYaxnQTgoI37SkBD8cMkY0JJXfLUJe11hi3KfYfcgLdXZbBO1XvAE6rnT7qEklQBiGYJwBDLXBYDZaY0P8J9ECIKeYTZ7CV0L/lFtIFRsoKboHYdRP3Yf12xKyE5FKnFbulqV6dd2Wx07iscWR43WFLslgSYErXfRql6YoAnTy5tPwp0OWvxTCPkQD3fXfr7Is8bHPZuBwDA8N9E3pJkabrvsHpDwKfgkf7beHL/eBP5qyvBiVw0JQ/7NW9QMnZrKR9gJ6a6je2854d2irPbfmRpoKXeFr63sTA8iBbbcEr8rHGKS5ZSxVtx1+dnVv4A6xA89YQXgRZsWdi/CpRTNlgn6ezbBEWFVs6jmfipP4mq6Qoa9ivJAuZY/DyDQ9K38VpJiIqxKaWOVbjCK7e2wYXOd7ZwAKouAfuB/WN4zhV2eabluI6J43yu6jRpq9SXWEJ2qZnlk2MSfl17vYuMG0rnEyAtZAAA4fqOfozo50YkZaeLaMwHbU/sMgVXzRxLbAVGxDob3kIja/+lVVAguE/JbpCsUpjLe43gkbjAHrBfuiX6qb+mC5LfSqik7knHVrTtkeys1C3Q/ru4P/vb3n5Ga21AKnvRiMw2dvDAP86I37//4IycpaVINfD1PY93D//hcd810vAi/xvgmlJ3aNyNCo4m7yg2edxescziMhMHpucDL2j7HsmXnvxnUWx+KB4MqN/Aywmkg== 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:(13230028)(4636009)(136003)(376002)(346002)(39860400002)(396003)(451199021)(46966006)(40470700004)(36840700001)(82310400005)(40480700001)(40460700003)(86362001)(41300700001)(8676002)(8936002)(336012)(70586007)(70206006)(2616005)(316002)(426003)(5660300002)(7696005)(1076003)(47076005)(478600001)(6666004)(4326008)(186003)(26005)(54906003)(110136005)(82740400003)(356005)(81166007)(36860700001)(2906002)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2023 15:26:29.5330 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 66355664-f616-494e-2040-08db73350d42 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: SA2PEPF00001504.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7648 Message-ID-Hash: S3XKXW5PRXBD7PFIG23F52WU6QHIRBCI X-Message-ID-Hash: S3XKXW5PRXBD7PFIG23F52WU6QHIRBCI X-MailFrom: Syed.SabaKareem@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Store the 'xfer_resolution' of the stream in private data structure, it will be used to reprogram the xfer_resolution for the active stream during system level resume. Signed-off-by: Syed Saba Kareem --- sound/soc/amd/acp/acp-i2s.c | 2 ++ sound/soc/amd/acp/amd.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c index 09b6511c0a26..09dc5f2c0bfc 100644 --- a/sound/soc/amd/acp/acp-i2s.c +++ b/sound/soc/amd/acp/acp-i2s.c @@ -149,6 +149,7 @@ static int acp_i2s_hwparams(struct snd_pcm_substream *substream, struct snd_pcm_ dev_err(dev, "Invalid dai id %x\n", dai->driver->id); return -EINVAL; } + adata->xfer_tx_resolution[dai->driver->id - 1] = xfer_resolution; } else { switch (dai->driver->id) { case I2S_BT_INSTANCE: @@ -167,6 +168,7 @@ static int acp_i2s_hwparams(struct snd_pcm_substream *substream, struct snd_pcm_ dev_err(dev, "Invalid dai id %x\n", dai->driver->id); return -EINVAL; } + adata->xfer_rx_resolution[dai->driver->id - 1] = xfer_resolution; } val = readl(adata->acp_base + reg_val); diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h index f53613216397..38c152c6c8c6 100644 --- a/sound/soc/amd/acp/amd.h +++ b/sound/soc/amd/acp/amd.h @@ -166,6 +166,8 @@ struct acp_dev_data { struct acp_resource *rsrc; u32 tdm_tx_fmt[3]; u32 tdm_rx_fmt[3]; + u32 xfer_tx_resolution[3]; + u32 xfer_rx_resolution[3]; }; union acp_i2stdm_mstrclkgen {