Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1847611lqa; Tue, 30 Apr 2024 00:28:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVTF/vtvo8lWZAR4s+hrnWiJseBGJjQsOGgUg6WKhrrFGQujuxkoffsvMb5ZlC36ja+sLMmiZQnFSCdg79Qwl68eqTyO2ajyviQIxBivQ== X-Google-Smtp-Source: AGHT+IHZV1awj8z95sT5FS4qbVWCtKB4wG4YFS46C+SCpHxh4xxoPl+k388m2cAYw2LaCmmp4wmk X-Received: by 2002:a05:6a00:22ca:b0:6e6:ccec:fdc0 with SMTP id f10-20020a056a0022ca00b006e6ccecfdc0mr13307943pfj.33.1714462099777; Tue, 30 Apr 2024 00:28:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714462099; cv=pass; d=google.com; s=arc-20160816; b=pm4h+5DHAdQyJ0uVvUAWIi/orT4XxVfI+qA83mYvlVPqKB9mPbn6UcJUrco83kHv/6 gyXWTDPxBXQbYDUq0XOjQ3CoFEU/cVlwWgl00JPvEKlzv1c2bqX94n+rVIaGs5TbqQ2U JMoE7Sr8zHJ5kgVHoG4JlDpT3lmWQE/8ZAPKblnJhn/Wh0AVy9ezyWFckAnF7httuSDv vZ43F33kni1pBgV6AnrXl03p7wgjtB5UQCNpBYeCOqubNy2VJ9zhXEleTEKb75T8MyPc 9ckQ287bG9ZGgifIdqClZJEesbLLLoy9xnD8XdxXM4IVl3enJ28KruItANrm5v8X4sLj 6YOQ== 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=KTYnkmUys+v1UyGXnvoxWeo9cURnTj9K09u6LrUM9CA=; fh=RFflp/pZEjLgfT79w+SzKVAE3yJsnbsS51FwORGpN20=; b=Y1zXoQwCeMQKI4bZzZCjpLrCAmU5bCgCLqQsOA4f6EVL2ExUSYodpcrlACuE1gX6PQ nnNUS/19JCHu99KFAY2G/RNhb1Xi/Yr+OT5wj/O3jRwKKqv6mQWnnfxNkG9BIXOCjtlf Hbn3CUaJkY8dhHzWXj82NIFdGoA6CUGqURu94vCxW48RLTaJlKwns4HO23dudWmNaL32 6pNbMIDB5WHvE4YH/oiUXH4cfmfS0XE1LI5WEzdE/ts+aREMjHPvf/HN84MIYhmvd74T Ludi92pl14Q7mAuxVhFMzi1QyD0jVtZo2VfWuUzWutffCcSG8XVZxwSvmYXHRP5niCx4 vBRg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GoTCIlfl; 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-163464-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163464-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id r190-20020a632bc7000000b0060068c8cf06si14653981pgr.600.2024.04.30.00.28.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 00:28:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163464-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GoTCIlfl; 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-163464-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163464-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 5A99DB21C46 for ; Tue, 30 Apr 2024 07:28:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E740C3F9C2; Tue, 30 Apr 2024 07:27:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="GoTCIlfl" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 4A2372C184 for ; Tue, 30 Apr 2024 07:27:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714462073; cv=none; b=YxGvfWYw0uDwehvj+VL0k6Ipztk4dqWvtFYzJkej46qJwIFN8huZGBRlRycSF4M7cXQPd39QOjgEaHiRKurG+h8T05YDa8OeHJf55/voIqVrmwdG7PrtrmRyyX8OCg2o74rzH0vNVCFnSKvmnvXA68u4/LgntqbNwysA3RGo2J8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714462073; c=relaxed/simple; bh=f4HexFXrgl33Xvb0NsdgdkEQEzHfWh5sA10LWpZKdS4=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=lh5bKCBRIhqy7Yv7nHm4vqC6t2aPlFhK6MjT8iuDMLU3TPPjd1E+4e02rAZ0p7O4mqV79kDLQ6tsdKO6NSVZEYRAIludam9tfdpe1qKmzMpwZDdIqcE1+j0WcWQJfZ5nihpbGvvU+ABx+b8j45wfiKJTvwL04hOa6RPhMWG3kZU= 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=GoTCIlfl; arc=none smtp.client-ip=198.47.19.142 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 fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 43U7QbNU087453; Tue, 30 Apr 2024 02:26:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1714461997; bh=KTYnkmUys+v1UyGXnvoxWeo9cURnTj9K09u6LrUM9CA=; h=From:To:CC:Subject:Date; b=GoTCIlflIYy4J7RgskGGNAOfB0uv3KFT0dmKyNc/UC1SFKtYY3meBzzuE+BpkaZ05 PbmjhSBbE+3ax88IjO6NkJgRpcjaMssHVtSA3XCQs7It2o8p0MRiA5Vug50H8Kam81 zj0UC/aNjsN6JPTvHp2QSAngJTksVlGRsNz1mWLs= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 43U7QbJr129537 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 30 Apr 2024 02:26:37 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 30 Apr 2024 02:26:36 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE106.ent.ti.com (157.170.170.36) 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; Tue, 30 Apr 2024 02:26:36 -0500 Received: from lelvsmtp5.itg.ti.com ([10.250.165.138]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 43U7QT59096668; Tue, 30 Apr 2024 02:26:30 -0500 From: Baojun Xu To: CC: , , , , , , , , <13916275206@139.com>, , , , , , , , , Subject: [PATCH v4 0/3] ALSA: hda/tas2781: Add tas2781 driver for SPI. Date: Tue, 30 Apr 2024 15:25:41 +0800 Message-ID: <20240430072544.1877-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: Add tas2781 hda driver based on SPI ALSA: hda/tas2781: Tas2781 hda driver for SPI ALSA: hda/tas2781: Firmware load for tas2781 hda driver based on SPI drivers/acpi/scan.c | 2 + .../platform/x86/serial-multi-instantiate.c | 13 + sound/pci/hda/Kconfig | 14 + sound/pci/hda/Makefile | 2 + sound/pci/hda/patch_realtek.c | 13 + sound/pci/hda/tas2781-spi.h | 149 ++ sound/pci/hda/tas2781_hda_spi.c | 1240 +++++++++ sound/pci/hda/tas2781_spi_fwlib.c | 2252 +++++++++++++++++ 8 files changed, 3685 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