Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp746885lqb; Wed, 29 May 2024 09:19:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWWzJ+p07SxlZyP2LEzo8VD6sZlLtafHLzqCBA/vw5YoRkWKU1oVy1EUESK1vocBBNS21s1Y7xZ2ODXVSX1zUqppzFU1QiUhCl6Xgnfew== X-Google-Smtp-Source: AGHT+IEHxmAj8rP9/rr4fcNJ/g9YUYHb9v0fyDm/e9/NjX3KENWBY2vtsw8YhSn91NkbnAdhjSLD X-Received: by 2002:a17:902:e749:b0:1f4:a233:c94f with SMTP id d9443c01a7336-1f4a233cc04mr116624355ad.28.1716999553683; Wed, 29 May 2024 09:19:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716999553; cv=pass; d=google.com; s=arc-20160816; b=hfj9oogfJ7LVHd6nchXwMg7OPxcYJ13/bFg3S9wchjfaQMlF+9wCr/x97MFsHW2aTW Y+G5ZBg4j8PtlXoaRsOnRxW1WtqHPWdi6Zwn0Lpq15HJWCnuyd9TaP8IyFmWRYglGNQg H3ddqcXFoxAzxE6xpfexwk7kE0hsnof5TwKzO1JbfhKBr1eiSEarZsO9AZhy+ljJkI0v Ez+yEhT7ZmL7OK1r1bM9OFk031JL50cp9Y1YOn3TpFdHs94hugghU5kv2f/HZ14IK1TF 2CtdPbD3bbsvenjjr/MPcKczmJianVeNuxUzD30juauY+NOGLdMbw0/xvwXEoai34iIP iy1w== 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=VtlZBCIrXk7KWkQBoJWGM8oCenwDZWgPBkeKsS0cLy0=; fh=I+tqeZQgYuDXsRVEWj/o3TWesPe6tIWPSM0V/NPFdoI=; b=qzUgLmze5WMlWPZZ2v3byBRyejbv2dx3Qcq9C1WcWnZqvj/dWdVb6vutlhpWREvXGV BeHmgiJ3LNmGC24UU2SECdGMIwig5bfgJPWVl28txr0cZYPcOz2Z9sLIWK38iBj8zbeL picrGYUTzsbwQWMV5o1BS/C3+kuGdlq/eAlEVDWC9G78nG6QFQTdJBXQ8Zk93hiqCFNZ yRfuSmRAtFIHIsxyo+GAcaVc/HjxRFPhtb1wdIYRz/G1Qu9FNmw2gZQTEuvZm26SxlR5 Gejy08NYvqLLofWJsd5LcdpF9TPnnfWGTWSRN/FesqzU8O+xpl+kMY9eMoyuSH4aaPbH BgWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Bfx7xSsO; 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-194398-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194398-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. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f48b95a4a3si67062735ad.239.2024.05.29.09.19.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 09:19:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194398-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Bfx7xSsO; 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-194398-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194398-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 4DBA7B27B23 for ; Wed, 29 May 2024 15:58:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 15C61181D07; Wed, 29 May 2024 15:58:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Bfx7xSsO" Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 7553F181BB3 for ; Wed, 29 May 2024 15:58:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716998307; cv=none; b=hQuC7yLCXBeIvWKvUD0XGj0xFbiFhKlyQIFaS9eaqkFb43T/Vmk3mrXemtBcw8beAr12iyOdHI8IW4wisT2JdLkLeiSPhHrMczWV2NsoThCtPjlU7b7/ftTPt3e70RhKlRarQTQTA+wYL65w32xTDF7AwTx/04D+d8A0X0g/zn4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716998307; c=relaxed/simple; bh=F6cyAmkItPJMHlzbT5ed2RaRwc0dmuF+iURbDkk2joo=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=ge9AaptzzE62h615Hv+sWukMcd+1XX2948Ii50UhXrKhKmU8YEF9f0Mw9gzui9oTRqxmuIrBbMW3qmcd5hV3RI5PbZu+Vpd8XAGn6b49Nj/NrT8INsvqV+AHcAStIWr7JNwi1v0gQArcBnaKBdmyb3hAw3xxJpx79IrAGdnCjrQ= 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=Bfx7xSsO; arc=none smtp.client-ip=198.47.23.249 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 lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44TFvQiL092772; Wed, 29 May 2024 10:57:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1716998246; bh=VtlZBCIrXk7KWkQBoJWGM8oCenwDZWgPBkeKsS0cLy0=; h=From:To:CC:Subject:Date; b=Bfx7xSsOlRFaxh858qh8x9RRHbVRqngv2ZLfpVerQI7m2JI6dpJ+dAvj3Z6j/nUbD gjpwBmcEM1MAz9ZGa4wS1hmbvDWr0dct7PFdIPnuIGiNvBavS3kEcA2WCy1DpVYfUi f99qS9Lu9mMDQr/j8vMAZQYKLM2gy0tT+8IaARNc= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44TFvQVi032095 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 29 May 2024 10:57:26 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 29 May 2024 10:57:26 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) 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 via Frontend Transport; Wed, 29 May 2024 10:57:26 -0500 Received: from lelvsmtp5.itg.ti.com ([10.250.165.138]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44TFvHYp029748; Wed, 29 May 2024 10:57:18 -0500 From: Baojun Xu To: CC: , , , , , , , , <13916275206@139.com>, , , , , , , , , , Subject: [PATCH v6 0/1] Add tas2781 driver for SPI. Date: Wed, 29 May 2024 23:56:52 +0800 Message-ID: <20240529155653.3037-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 (1): ALSA: hda/tas2781: Add tas2781 hda driver based on SPI drivers/acpi/scan.c | 1 + .../platform/x86/serial-multi-instantiate.c | 12 + sound/pci/hda/Kconfig | 14 + sound/pci/hda/Makefile | 2 + sound/pci/hda/patch_realtek.c | 13 + sound/pci/hda/tas2781-spi.h | 148 ++ sound/pci/hda/tas2781_hda_spi.c | 1266 ++++++++++ sound/pci/hda/tas2781_spi_fwlib.c | 2101 +++++++++++++++++ 8 files changed, 3557 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