Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1992429lqo; Sun, 19 May 2024 08:06:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUOg2advq4Xu6poMrsaeqt/o7veeYc4OqW+1VuvH3A73EZlPjo7s2hViPo/6ggZunyBzoPgZzJFNXFydCWD5+iubIzinl0pstMgCedADA== X-Google-Smtp-Source: AGHT+IGKAb2Zblw3y9Phkv2x1qIcmwKhjaRXTX62mh8jyTAOMkaR/frDmGVrjfbdV6ZKHi27kyYk X-Received: by 2002:a05:6a00:174c:b0:6f4:5504:59b6 with SMTP id d2e1a72fcca58-6f4e038300cmr29725427b3a.29.1716131202283; Sun, 19 May 2024 08:06:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716131202; cv=pass; d=google.com; s=arc-20160816; b=ZHPhofykkqTX3sc6Thb9FPXzoqOg+2PaKG/UKDHlBechy0thSD2/ZakPPV5hZjnJF2 rK5Ga73mcQv0gMrE1fBpJ8bjE8i323McFTmuQmwJoM1Utv5KyXvj/lbfT1DiNE+JNJfp 6IMfgBubX79SH0gmXw9PeDDYzTrsNbjyqylgGVPF3znNiDziVjc9zWqcu0HCKwf3shj8 6GQyeHJ92PGBQBNGzGU08z/8GWsTpsuDyhJl+7uK3Wo0kWgT6RahbjVNCwCT65GHHgdm aeL46jKpSPyEMSNE5XeEM5bCiW5vyfFGLnhdSGrAjpQiixBq19M49Fds8uvbKc0j7Ouw MAlw== 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=Qncl48aX7pAcHQ1zL87QVnUocwPrehIzUGi9a9KR9HU=; fh=RFflp/pZEjLgfT79w+SzKVAE3yJsnbsS51FwORGpN20=; b=SwfgZckUxlck9CmSu0FG9FZcmWz1JWJPkHWbyHqg0JBPff9GGuKfd7u85RLXE9G3eP UFZ3JwYCtezCcbjBtvGkemRbLFfjfXhCcme0OoD1cYvbgtXl8yvKsERzzgOTKSjtkcg0 Ctj5/Cwz7dW2sP+CfOkB8uyTnXb8cf5Km8geIi2VZYhwL+whBhCzUC7o3e4VzMmXyAzC fkJ1Trwdz/Ysl0yFL4/f++ce4MzAHowqQAZ9g6XXV6mVXvRWHo06dnAy2fByAw5p55IG x9U/2s5LrwllK9jO/k3YNac1TnB7p1Dzjc7DnXTn/mpEX81I6Pp2dLoh7mNJ0jZlfnBb Zc8A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Kb6rh2Lb; 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-183137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183137-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 d2e1a72fcca58-6f6755dbd74si8069973b3a.178.2024.05.19.08.06.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 08:06:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183137-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=Kb6rh2Lb; 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-183137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183137-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 A1050B21276 for ; Sun, 19 May 2024 15:06:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 555F34CB2B; Sun, 19 May 2024 15:06:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Kb6rh2Lb" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 B2DDB481C6 for ; Sun, 19 May 2024 15:06:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716131193; cv=none; b=P2pLVyHOk7OPS8A01mmWmjxmlvV/mFcY/XOiSxGlh7gyNahu027K77QlsVH1w75FCykhMm34DqNMUH4k7fR5zXbhlpTsQCJuUletYnYCBkV8tgat5nWHoLh3l25nzfCviyPI+Tm2ZUH4cbs9MvMk5RVJ10YGqsd0Vd9veMz/rC0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716131193; c=relaxed/simple; bh=PWlBkt8hrc3yRUjuDGOwehNTi6Z2Iv1ZIjowVOxeb4I=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=j8Ez9tasAJ4ypRSZONTYX2f1DSFrpExi1xhc3+MlGSksYWWTYztUbOHw+RSEMyqR4LxllEsOLVg8zLfrcZZAHRnBaM0sk0VvurlkCs7FC1yD9LASSdxKiBVsCBx3zHFlBgC4BbCs3fHpvkiqJuEueprGFFS1cPRxd98O/GsrVNM= 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=Kb6rh2Lb; arc=none smtp.client-ip=198.47.19.141 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 fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44JF57U7115518; Sun, 19 May 2024 10:05:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1716131107; bh=Qncl48aX7pAcHQ1zL87QVnUocwPrehIzUGi9a9KR9HU=; h=From:To:CC:Subject:Date; b=Kb6rh2LbA4VK2PfEb6AiLUn/7kpL0TExJR6iaus4UuVfAYYi2vlkygJnud6uLXFgy hpY9QBH9kKLG4Q0z1lpO62FVH9GmIFW9+IpGwsYfbAw0ZWu0nQnRwW12uYXvlFnzaQ 1fLnwypz+qiK9yCckuZIDg9QrhK0i5bFph7g1KBs= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44JF57PY119203 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 19 May 2024 10:05:07 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Sun, 19 May 2024 10:05:06 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE109.ent.ti.com (10.64.6.30) 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; Sun, 19 May 2024 10:05:07 -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 44JF4xbC074474; Sun, 19 May 2024 10:04:59 -0500 From: Baojun Xu To: CC: , , , , , , , , <13916275206@139.com>, , , , , , , , , Subject: [PATCH v5 0/1] Add tas2781 driver for SPI. Date: Sun, 19 May 2024 23:04:31 +0800 Message-ID: <20240519150433.760-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 | 1234 +++++++++ sound/pci/hda/tas2781_spi_fwlib.c | 2247 +++++++++++++++++ 8 files changed, 3671 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