Received: from DM5PR21CU001.outbound.protection.outlook.com (mail-centralusazon11011040.outbound.protection.outlook.com [52.101.62.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5BE133A6E4 for ; Tue, 20 Jan 2026 04:08:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.62.40 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768882133; cv=fail; b=RHE5+ic0XtKZ5MKeoI+RXKpzhycfg9zGV1xFj6Jl9lYnPFwlmVfFhuFBb6bm3KPkBm1Q1OfKWv+WtgQGMUZSQLt08ThpDsiJHsX3OAGi91K5b+ZpCCxC9OTFsTRoWnH5YOGE3hZLbo8xrwcHbyL7kc6t+YO+VTwWv9guU8iuNX0= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768882133; c=relaxed/simple; bh=RjjIHiJiv9531F94wOoV+dhTPSHhM/Jqw6zMwV4Qfx8=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=mFlxsEdzHRZmqh8QB1bVpCU6PJfJMWNjmy3RUcX2usQ8yVGUmHmS931RCFmosGV55ZsrEJzCwYEvIOEdF34kJTNw7jW32vCDfIV26L9sXYzG9ii8Tk62OXpTYMZYFh9W6/eKv6UUlHAU9BwDXCTsxEB7353mW3ZgBYBCU7K5VWQ= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=GNm+DUwQ; arc=fail smtp.client-ip=52.101.62.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="GNm+DUwQ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WRpd9QUkJAjY6ECqWLgtqBgSs0LPa3a4R+qnH/AhF8m6N3g46cHGacQ5NHdAL5G8gvbpkUuguYw+roHilKeujG8X0nj4bMEs4sOTVLDdf1SgIlpZGjjmcF9CVNNep88DcsMECqlMn2xkxSk+S+95GDentumZqd6bNw4VbV0lOM6rshZZoLNrPjaIRhyu1wEArhlHKemLurQhN4FELDkw0ophvj54OsKu9XlshiBE/4Q6LP8WZMTPIi5u10z+sG+l/YvrssxUkmZ9fKAxEHsV+F6MhZARxEwlUO4h7Deq7hHu2ue9u91+luYMxAvz7H+U63QOQY0BVx4wsKIqYKzojQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=d6o0SXukjM95sHW+vmem62SUoopxUUuaVTfthBen24o=; b=fzrx1wVELjCNKbBEM9pF9kN26pDmhOS4AVQ12SVA5Emx1A++34uBUs81ZXnCdbCMXMre+41CocHiSqWfqsodV+yU87Ym8grnR8Lw0vvlIDG5qnvOnPF9wOB2U+6ojimVH3Wj10rCMEXvWc1f3NlAvlLFKgjVBYVg/CN/sqi2bYgCa2XlRr8kfVryh0vq2Rr8UXFIK2l0FZ+Mj4UPoN9FW1Q3ANtGDXf5EQBtLjlspyG5AJXCQ9FGNDUk7a/ta8U+xjlH8iQ0CY73wJ44fRewa3NOr/TA2oVE0ojaSFj67SrupKCkC3xqULpo2uX2srDYFjBpgEeE+cLjDXjNlhebWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.21.195) smtp.rcpttodomain=intel.com smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=d6o0SXukjM95sHW+vmem62SUoopxUUuaVTfthBen24o=; b=GNm+DUwQBM4TFeum4Hrl9JOWYA7DlEoPwtXu8Gsil1C+4tDuk//0Wa4n21vmjhbuu5uLKObyEtp2eZ7056CFpQ3CEcI/GX4BlwmtJ7pwki2CDj/mo3hZr/ddmcK7o3BPjk/9xEZoL/Tm8R7m0IaGwq/HanXzP4u582g84xLHN90= Received: from BL1PR13CA0185.namprd13.prod.outlook.com (2603:10b6:208:2be::10) by CH4PR10MB8098.namprd10.prod.outlook.com (2603:10b6:610:238::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9520.12; Tue, 20 Jan 2026 04:08:47 +0000 Received: from BL6PEPF0001AB52.namprd02.prod.outlook.com (2603:10b6:208:2be:cafe::d) by BL1PR13CA0185.outlook.office365.com (2603:10b6:208:2be::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9542.8 via Frontend Transport; Tue, 20 Jan 2026 04:08:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.21.195) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.21.195 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.21.195; helo=flwvzet201.ext.ti.com; pr=C Received: from flwvzet201.ext.ti.com (198.47.21.195) by BL6PEPF0001AB52.mail.protection.outlook.com (10.167.241.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9542.4 via Frontend Transport; Tue, 20 Jan 2026 04:08:45 +0000 Received: from DFLE207.ent.ti.com (10.64.6.65) by flwvzet201.ext.ti.com (10.248.192.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Mon, 19 Jan 2026 22:08:44 -0600 Received: from DFLE215.ent.ti.com (10.64.6.73) by DFLE207.ent.ti.com (10.64.6.65) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Mon, 19 Jan 2026 22:08:44 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE215.ent.ti.com (10.64.6.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Mon, 19 Jan 2026 22:08:44 -0600 Received: from LTPW0EX92E.dhcp.ti.com (ltpw0ex92e.dhcp.ti.com [10.82.30.14]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 60K48bIw416239; Mon, 19 Jan 2026 22:08:38 -0600 From: Niranjan H Y To: CC: , , , , , , , , , , , , , , , , , Niranjan H Y , kernel test robot Subject: [PATCH v1] ASoC: tas2783A: fw loading for devices without pci bus Date: Tue, 20 Jan 2026 09:38:25 +0530 Message-ID: <20260120040825.1460-1-niranjan.hy@ti.com> X-Mailer: git-send-email 2.33.0.windows.2 Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB52:EE_|CH4PR10MB8098:EE_ X-MS-Office365-Filtering-Correlation-Id: d48dd34b-35f4-4e72-d53b-08de57d99b42 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|7416014|376014|36860700013|7053199007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?78RsW0kRQUbrqlVedFp0NtDElwG7f/wTolgWmcvRBCa91pbvX1CK5ywaSJB/?= =?us-ascii?Q?G4ymOvYbEeBZt6e9CL9zG7biTqk3RZR8mDlNZedTj/XoJCN5RcqnsvzXhY6N?= =?us-ascii?Q?3ovjZ1urCJq1PmxJzohjHwLSvULyI11mGlSwhmHobLdiyG7N4FBm/YpgX9U8?= =?us-ascii?Q?qr0nAZ4PWkDFlZLFMaw9AwPIqaVr3fX1YIvq2vtXuphVsya9SFG0rLIfnNI1?= =?us-ascii?Q?zJyo+9fr/6YMg2qVJGqGFlJshjB8MB1fh7SpvifxCDwZZ0f5k0hQ1IrJl0AQ?= =?us-ascii?Q?BQHFUGBrGW17dKBnDrSq5d/e9YHfLB4ZTpehDZoWKeZ/AOzvqCLmZfDbf/cZ?= =?us-ascii?Q?UKXS94fW4P53wIeyTKJgmUa45amakoDXoVb14eA3P1GGumtZBuixjnkiZoZd?= =?us-ascii?Q?Ppagbexd6Uf6eFZfhf4jvkF3AsLfEql5w6FMmvAEUCex87vfpn9xrHNLBoxB?= =?us-ascii?Q?472bD/aHrmGkYjLX274hWPqAg8pIzo0t9x5LNsIHqsrzm1BHq1nn86u6SFQ+?= =?us-ascii?Q?xbm10dx89rKxO26OE0m8vVY9O6U6G7GuOh2KViClWO5AL/m9lBSuHQpqAAwQ?= =?us-ascii?Q?uNSywvhyqnJO7EUiQhFx31jh0HJVoTEgIcA/WsM/1Wp/W/6HKPMfyaTjHJOw?= =?us-ascii?Q?55ngU2lALfFZF8t+QjrwUa25Ypt5oZ43kk3H58ll1eYT371ysyWd1gQodcWM?= =?us-ascii?Q?njQU37ckEgvPWLwrvRb/w9SJrHAssxZBXte4d5eJMlha4WBLKuBj1p4FaD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RuPN/YAn6V/yr/2RSPI?= =?us-ascii?Q?2CrVgQ=3D=3D?= X-Forefront-Antispam-Report: CIP:198.47.21.195;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:flwvzet201.ext.ti.com;PTR:ErrorRetry;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(7416014)(376014)(36860700013)(7053199007);DIR:OUT;SFP:1101; X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2026 04:08:45.6331 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d48dd34b-35f4-4e72-d53b-08de57d99b42 X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.21.195];Helo=[flwvzet201.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB52.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH4PR10MB8098 Currently, there is compilation error when the CONFIG_PCI is not enabled which is used for creating firmware name. This commit address this issue by adding fallback mechanism to construct unqiue name by using SounWire slave's link and unique ids alone when the CONFIG_PCI is not available. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202601190756.IpoMY5AJ-lkp@intel.com/ Signed-off-by: Niranjan H Y --- sound/soc/codecs/tas2783-sdw.c | 45 +++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c index 2851ce19f..193aee865 100644 --- a/sound/soc/codecs/tas2783-sdw.c +++ b/sound/soc/codecs/tas2783-sdw.c @@ -27,7 +27,9 @@ #include #include #include +#if IS_ENABLED(CONFIG_PCI) #include +#endif #include #include #include @@ -1106,21 +1108,33 @@ static const struct dev_pm_ops tas2783_sdca_pm = { RUNTIME_PM_OPS(tas2783_sdca_dev_suspend, tas2783_sdca_dev_resume, NULL) }; -static struct pci_dev *tas_get_pci_dev(struct sdw_slave *peripheral) +static void tas_generate_fw_name(struct sdw_slave *slave, char *name, size_t size) { - struct device *dev = &peripheral->dev; - - for (; dev; dev = dev->parent) - if (dev->bus == &pci_bus_type) - return to_pci_dev(dev); + struct sdw_bus *bus = slave->bus; + u8 unique_id = slave->id.unique_id; + bool pci_found = false; +#if IS_ENABLED(CONFIG_PCI) + struct device *dev = &slave->dev; + struct pci_dev *pci = NULL; + + for (; dev; dev = dev->parent) { + if (dev->bus == &pci_bus_type) { + pci = to_pci_dev(dev); + scnprintf(name, size, "%04X-%1X-%1X.bin", + pci->subsystem_device, bus->link_id, unique_id); + pci_found = true; + break; + } + } +#endif - return NULL; + if (!pci_found) + scnprintf(name, size, "tas2783-%1X-%1X.bin", + bus->link_id, unique_id); } static s32 tas_io_init(struct device *dev, struct sdw_slave *slave) { - struct pci_dev *pci; - struct sdw_bus *bus; struct tas2783_prv *tas_dev = dev_get_drvdata(dev); s32 ret; u8 unique_id = tas_dev->sdw_peripheral->id.unique_id; @@ -1128,13 +1142,6 @@ static s32 tas_io_init(struct device *dev, struct sdw_slave *slave) if (tas_dev->hw_init) return 0; - pci = tas_get_pci_dev(slave); - if (!pci) { - dev_err(dev, "pci device id can't be read"); - return -EINVAL; - } - - bus = slave->bus; tas_dev->fw_dl_task_done = false; tas_dev->fw_dl_success = false; @@ -1145,10 +1152,8 @@ static s32 tas_io_init(struct device *dev, struct sdw_slave *slave) } usleep_range(2000, 2200); - /* subsystem_id-link_id-unique_id */ - scnprintf(tas_dev->rca_binaryname, sizeof(tas_dev->rca_binaryname), - "%04X-%1X-%1X.bin", pci->subsystem_device, bus->link_id, - unique_id); + tas_generate_fw_name(slave, tas_dev->rca_binaryname, + sizeof(tas_dev->rca_binaryname)); ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_UEVENT, tas_dev->rca_binaryname, tas_dev->dev, -- 2.43.0