Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1055826lqb; Wed, 17 Apr 2024 21:04:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVbB6frGhQuTnmjs2r5Goh8q7IB67l/XIVhqzIgPGYyqD/nOX6ZSce3xnrfwFQa7hzY2g+LABqLGHivDMffaqSvVq4l1k0TpfwAFK4Tdg== X-Google-Smtp-Source: AGHT+IEXGVrmP8isZKgI9UHI3vXnVKKXIpEZGgu/grvcpc9FR/HLTj8sXO1MxOi0gc4RFm/yuJpp X-Received: by 2002:a17:906:fc0a:b0:a52:13ee:8124 with SMTP id ov10-20020a170906fc0a00b00a5213ee8124mr1198200ejb.35.1713413081122; Wed, 17 Apr 2024 21:04:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713413081; cv=pass; d=google.com; s=arc-20160816; b=kJAc6+a+XM0/d7JMMv15cTWrHHOXOTgFJqjRQLAtCm6iGokOHw7+6jqDzqKHEBLqk0 WXDOx3aC5UJ6kGySPiQRpkjGZYXFayvPsJCeUeiYluySgS8dKtO27crHDuSCO3XIDqLk tn3jn2RUZkAomAcpy6Iry/tErV1G8hduZ/Jt/I6vyj/tEu4swnbPWLDq/2XKoIO7oy5k atnEu9uJGI1Ebx2Gfx3ySmEgxmBdnvrnsKbWK6PMWJn0Z1aOygBYem17/zwbT7RZsxDY 3U0Y4OzIcv+hhI78ttM6QavMVOjkZYtZ8x3TnNf3ahEHCNqqmT/bfBLipLYf/Y3LSAJc n09g== 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=spfUr/qhLIVWEOh0la3CmouAOkTlfQqnVFmDsZxox7g=; fh=RFflp/pZEjLgfT79w+SzKVAE3yJsnbsS51FwORGpN20=; b=CAF57eFpLfsNBiOkVrhXLE4SQmzFFLP1uGn4DIX3NbgLfc3qoLELfs0cgf5642UddE 6fHDtuu0gHHWw27XLBgltQzd3TuMSboBKS3ucEJI3ErFogNSdPrRmRRzA98NgMYrI7gW eNyxnSnc97bgSUSMl80DXBXtLrGkR4aAv94FXc257dUnQuby+fg/EQhJbqIhLv9W5eei hgrTEvo6aC3t+1Zl2x/NFwIuZRB3eIkQAx4ihn4TIw7/eocSqrdxvQHAWQHquu++doYO XJvePIVrnFBpwxiPodt+y+KckXRGW0lfmlfn3scCRzCsHVehb8hCI9AWx+lUwrIzFBJ0 1Ibg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="Yao/4Z9G"; 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-149488-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149488-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id cw5-20020a170906c78500b00a5555081349si353449ejb.669.2024.04.17.21.04.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 21:04:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149488-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="Yao/4Z9G"; 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-149488-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149488-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9A0D81F219BD for ; Thu, 18 Apr 2024 04:04:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56FE454664; Thu, 18 Apr 2024 04:04:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Yao/4Z9G" 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 1BC66535A2 for ; Thu, 18 Apr 2024 04:04:28 +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=1713413070; cv=none; b=o2ps3lmRSj8Wqnt2/xAxce6bq712FEfd+S58unDCef08VT9TSmQdhRPCVMcdltTmb3X5pdIT3eIhtSvxqfhUIcgYn5Szs/HcUANXPxVv+bLmWD3ejQpwMd0WQQjxInr5O/ieaNI4hv1ta3yO10m20EkMmQCUGaj6C+nby9F6F8k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713413070; c=relaxed/simple; bh=4yYFpI40HF8hoBgPI51w7Phe0yr2o8NsS/vauU47CsY=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=QO36zIpWbpENrv/WpRSVYq+OY55jk1V48ngRSpnDmKyXr+3tHHgo2IvPddsAVxrOsAJqcBhT/4hHLBgLLtqDE4IIQaXhuaqQPXL9AJ8oq6vWps4vIpWC83OdGTKP+nPuE3tFhY6QsUEacfcLexq2MpOFiCJfkKc3N9hVVXAxn+U= 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=Yao/4Z9G; 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 fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 43I43FnE128703; Wed, 17 Apr 2024 23:03:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1713412995; bh=spfUr/qhLIVWEOh0la3CmouAOkTlfQqnVFmDsZxox7g=; h=From:To:CC:Subject:Date; b=Yao/4Z9G4WBWCC+7UFMYQZZjusSa9GuBGXjGGWU2n8kKS1N10NqWT5RHx/4X1cX+O RfWBh2dA4qMEBwonsFe6jiihMlRDS2qkF2Jd7ODslVZNZvCRO+mekT+KNgJfFbPzpq 2bO3UpmNjWEx2hFHskL2XqzWLoFBCRnoEo874HQ4= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 43I43FSf016107 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 17 Apr 2024 23:03:15 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 17 Apr 2024 23:03:15 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE106.ent.ti.com (10.64.6.27) 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; Wed, 17 Apr 2024 23:03:15 -0500 Received: from lelvsmtp6.itg.ti.com ([10.250.165.138]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 43I439ik070557; Wed, 17 Apr 2024 23:03:09 -0500 From: Baojun Xu To: CC: , , , , , , , , <13916275206@139.com>, , , , , , , , , Subject: [PATCH v3 0/3] ALSA: hda/tas2781: Add tas2781 driver for SPI. Date: Thu, 18 Apr 2024 12:02:36 +0800 Message-ID: <20240418040240.2337-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 | 13 + sound/pci/hda/tas2781-spi.h | 165 ++ sound/pci/hda/tas2781_hda_spi.c | 1305 ++++++++++ sound/pci/hda/tas2781_spi_fwlib.c | 2272 +++++++++++++++++ 8 files changed, 3783 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