From patchwork Tue Mar 26 01:09:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baojun Xu X-Patchwork-Id: 785184 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 210F0C6FD1F for ; Tue, 2 Apr 2024 06:48:55 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4120E23E2; Tue, 2 Apr 2024 08:48:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4120E23E2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1712040533; bh=0QsKgJQ19vq8y8tPl++NyerJ36KN8IVJkfJVqeiKsRc=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=IuI6RFnWy1jJFxr0yDM5dRS7fShgJ+TeEXpVhssjFQgRPbbKjk/AjRerWES4R6ty7 NhyBwXGg9umCh/4eTpW9rzG5mTem6VYyORnuMEjfwEGdPQDzw01WPmxfh2CLR4sH55 UmO4uATuity3FxBvRGto424gF+Q673WpCRdnNjiA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 85595F806B1; Tue, 2 Apr 2024 08:46:51 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9DE8BF806AC; Tue, 2 Apr 2024 08:46:50 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 974F5F8025F; Tue, 26 Mar 2024 02:09:55 +0100 (CET) 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 alsa1.perex.cz (Postfix) with ESMTPS id 89790F80093 for ; Tue, 26 Mar 2024 02:09:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 89790F80093 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=TAI5t4t7 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42Q19iAL003895; Mon, 25 Mar 2024 20:09:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1711415384; bh=q13WMrsqKgrXXFIBsB6QRe/kJCRfjBQkQH/hg2NF4RY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=TAI5t4t7Zwh91K504ahsw8ronbQcgeAvk83jH2SyycqlEEiwW7nvoSRnN9duRaCUd Pe8at9Woxf3eaM9O7YYbSKOWoG1ifmtLtPm4c2h4nIViLWqbfow0IqTR3cFWSH/LvM RVLTiZ4KaFwVcCttMMhmT4x7L03U8NwLZP8khjQQ= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42Q19ibB005275 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 25 Mar 2024 20:09:44 -0500 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 25 Mar 2024 20:09:44 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE102.ent.ti.com (10.64.6.23) 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, 25 Mar 2024 20:09:44 -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 42Q19AYB120020; Mon, 25 Mar 2024 20:09:38 -0500 From: Baojun Xu To: CC: , , , , , , <13916275206@139.com>, , , , , , , Subject: [PATCH v1 5/8] ALSA: hda/tas2781: Add tas2781 SPI-based driver Date: Tue, 26 Mar 2024 09:09:02 +0800 Message-ID: <20240326010905.2147-5-baojun.xu@ti.com> X-Mailer: git-send-email 2.43.0.windows.1 In-Reply-To: <20240326010905.2147-1-baojun.xu@ti.com> References: <20240326010905.2147-1-baojun.xu@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-MailFrom: baojun.xu@ti.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: EWFNQN43DUNKXBA3W2Y2UPWUVH5GUF2E X-Message-ID-Hash: EWFNQN43DUNKXBA3W2Y2UPWUVH5GUF2E X-Mailman-Approved-At: Tue, 02 Apr 2024 06:46:18 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add tas2781 spi driver support. Signed-off-by: Baojun Xu --- sound/pci/hda/patch_realtek.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index a17c36a36..9aef8b451 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -6886,6 +6886,12 @@ static void tas2781_fixup_i2c(struct hda_codec *cdc, comp_generic_fixup(cdc, action, "i2c", "TIAS2781", "-%s:00", 1); } +static void tas2781_fixup_spi(struct hda_codec *cdc, + const struct hda_fixup *fix, int action) +{ + comp_generic_fixup(cdc, action, "spi", "TXNW2781", "-%s:00", 2); +} + static void yoga7_14arb7_fixup_i2c(struct hda_codec *cdc, const struct hda_fixup *fix, int action) { @@ -7424,6 +7430,7 @@ enum { ALC236_FIXUP_DELL_DUAL_CODECS, ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI, ALC287_FIXUP_TAS2781_I2C, + ALC287_FIXUP_TAS2781_SPI, ALC287_FIXUP_YOGA7_14ARB7_I2C, ALC245_FIXUP_HP_MUTE_LED_COEFBIT, ALC245_FIXUP_HP_X360_MUTE_LEDS, @@ -9583,6 +9590,12 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK, }, + [ALC287_FIXUP_TAS2781_SPI] = { + .type = HDA_FIXUP_FUNC, + .v.func = tas2781_fixup_spi, + .chained = true, + .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK, + }, [ALC287_FIXUP_YOGA7_14ARB7_I2C] = { .type = HDA_FIXUP_FUNC, .v.func = yoga7_14arb7_fixup_i2c, @@ -9991,6 +10004,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x8b8d, "HP", ALC236_FIXUP_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x8b8f, "HP", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x8b92, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8b93, "HP Gemtree", ALC287_FIXUP_TAS2781_SPI), SND_PCI_QUIRK(0x103c, 0x8b96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), SND_PCI_QUIRK(0x103c, 0x8b97, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), SND_PCI_QUIRK(0x103c, 0x8bdd, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),