Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1724542lqe; Mon, 8 Apr 2024 19:49:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVezqZ6rCcLV0bxAuE/FOkJvn7vDP1b/deuYcXZ/lMtI/USqUfs6XLYYE65yAV2LlPuArmyq4qF89tyEzeSnGnIKNLBFRStdHUTK+t8EQ== X-Google-Smtp-Source: AGHT+IE1VeeNyITSh311x4O1CDW8o+1l51QJAuX/d+dTi8Upg3IswiVRegVCYnODwKjSnLg0VgSU X-Received: by 2002:a05:620a:1218:b0:78d:699b:2893 with SMTP id u24-20020a05620a121800b0078d699b2893mr2642797qkj.23.1712630994112; Mon, 08 Apr 2024 19:49:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712630994; cv=pass; d=google.com; s=arc-20160816; b=sZiQ65JkHhhxWJKR4pfXsiDnIJnHSNuZJQYVfUVcSqgTmtRZojEdDjMC53/pztsuCj n3Mq+EU6Ty9jczDjfvSI6XMVruqCvim79iid+0F0Qb3pT/ymHni6bTFQ3vG37fgjD6w5 jGE1ddNeWPNXCuympnSdHKYVEfdjbP+2+czDzu4bm6euiJDcKGEM+qrsLstIEZUiIQ64 623IDLPhIZMabBkzqtd6kDK/L0iNhSABHrAZboiFTNBR5MNqUeW0WirThGxP3Mxkh+1X 7rtQQQAnZ21ABWfudHPQlpBDQWAp+aUtZPGaU+cZuWGc25Gkvaq/5lR1nQafqnlKT//W Oq2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=dU9aZ6uKGPORdccriw5y521hjgLvs8ulO4Q71rRgmaA=; fh=ikVTzBXux48kDp6+OYjpO2lfhshOkqgm8emGTv1DGuk=; b=iRCKZzUi8/72IwHXpfd64PbMN7F/hvzULXt52M6Nga+QueIkm30EaJ/O2misjgWz7U tSwg9JgNchgnTTgx1aEzTKZ8eMiOQpbjFAvjh+NqbgYNmldo9fTh97n9xjH6pGPdtuWO 9HHVfdKXrH0UvgXRZsJBmyShdHVqja69/PHrJKQ4MMcPOXBywdpC/rG1OGLZ5rYjiWLd K42hQ9cRXJzZBNlCPgu4FuGOjwy9E4bfX1S6I7895S9MNp0a5JVBNWnOaDnQMHeNz/ib 4BFWJ4PKuS5hag5HNUswK+PDCj8exYMpc8K9rrDPGcVlItdsbZsgtsYHz/FO6GiM6Sa0 NzcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GYNZwNdq; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-136149-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136149-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id z10-20020ae9e60a000000b0078d33603c90si9316755qkf.711.2024.04.08.19.49.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 19:49:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136149-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GYNZwNdq; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-136149-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136149-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D23FB1C241E0 for ; Tue, 9 Apr 2024 02:49:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4E955577E; Tue, 9 Apr 2024 02:49:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="GYNZwNdq" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 7D66654F95 for ; Tue, 9 Apr 2024 02:49:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712630986; cv=none; b=DaD7bWV5Z5I7RTWvxLZyeNYk/UAPLUmD/OHQ5G87rEloYgGqd5lN5ccnh3BR6XuvEDUK5+H7mv7BcvPgPmXXcIn4qEslzK+8Y7L0I3yrA0so/4F1wQE+jSyHGI8QvzDco/6DH64+OHXrslLjgX7vRb6AGDC67DW+xDVc74pv3UQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712630986; c=relaxed/simple; bh=k0KGMptnz+F1UC0zIJgwuo+OTxL6NVxrxti4vjkbAO8=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=A6ZzxScxw60KwI6u3owsyIKdy8kalrDr0mPEp8xbyGGy7fKHhN1KLYgOlRPQqLWCM1nf4cmRnPmCwsOciYHOYxs1wcngarwVIl8V49yrGKFJoRT1INUuDfwvZSheIgVrS1da9ugltBuvu6sOpQS5aGzqFPyHYNhAcsMUqOBPxtM= ARC-Authentication-Results:i=1; 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=GYNZwNdq; arc=none smtp.client-ip=198.47.23.248 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 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 4392mprT035069; Mon, 8 Apr 2024 21:48:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1712630931; bh=dU9aZ6uKGPORdccriw5y521hjgLvs8ulO4Q71rRgmaA=; h=From:To:CC:Subject:Date; b=GYNZwNdqiecEjxVLwd/GflJPsm351Uy41Sf+oy5DRCfQoyM+tdGKIeJfj0KUre6NN Bhxst1fIa8xo5xp0CrzZgzX77PoMx1YR0HjpABrWmU1Xa+LkXL/bT0Cr99G/UZyHMo DCyQmADIVZmyWxe6zA+LJr8v8n5qny6cGWpwD/3s= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 4392mpPg021108 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 8 Apr 2024 21:48:51 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 8 Apr 2024 21:48:50 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 8 Apr 2024 21:48:50 -0500 Received: from lelvsmtp6.itg.ti.com ([10.250.165.138]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4392mikr024930; Mon, 8 Apr 2024 21:48:45 -0500 From: Baojun Xu To: CC: , , , , , , , , , , , , , , Subject: [PATCH v2 0/3] ALSA: hda/tas2781: Add tas2781 driver for SPI. Date: Tue, 9 Apr 2024 10:48:12 +0800 Message-ID: <20240409024816.1180-1-baojun.xu@ti.com> X-Mailer: git-send-email 2.43.0.windows.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 This patch was used to add TAS2781 devices on SPI support in sound/pci/hda. It use ACPI node descript about parameters of TAS2781 on SPI, it like: Scope (_SB.PC00.SPI0) { Device (GSPK) { Name (_HID, "TXNW2781") // _HID: Hardware ID Method (_CRS, 0, NotSerialized) { Name (RBUF, ResourceTemplate () { SpiSerialBusV2 (...) SpiSerialBusV2 (...) } } } } And in platform/x86/serial-multi-instantiate.c, those spi devices will be added into system as a single SPI device, so TAS2781 SPI driver will probe twice for every single SPI device. And driver will also parser mono DSP firmware binary and RCA binary for itself. Signed-off-by: Baojun Xu Baojun Xu (3): ALSA: hda/tas2781: Modification for add tas2781 driver for SPI ALSA: hda/tas2781: Main code of tas2781 driver for SPI ALSA: hda/tas2781: Firmware load for tas2781 driver for SPI drivers/acpi/scan.c | 1 + .../platform/x86/serial-multi-instantiate.c | 10 + sound/pci/hda/Kconfig | 15 + sound/pci/hda/Makefile | 2 + sound/pci/hda/patch_realtek.c | 15 + sound/pci/hda/tas2781-spi.h | 162 ++ sound/pci/hda/tas2781_hda_spi.c | 1336 ++++++++++ sound/pci/hda/tas2781_spi_fwlib.c | 2289 +++++++++++++++++ 8 files changed, 3830 insertions(+) create mode 100644 sound/pci/hda/tas2781-spi.h create mode 100644 sound/pci/hda/tas2781_hda_spi.c create mode 100644 sound/pci/hda/tas2781_spi_fwlib.c -- 2.40.1