Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3038730lqp; Mon, 25 Mar 2024 18:11:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXFLWzw5PXhLkKKo5pj69Tsdy9s7er5gsEYlZH9SVIry1x0qjrCIccWzaDEQDliiqH8R12R3DWFYDbXhx0lepCeWGm+ztChrrMbKRjlQw== X-Google-Smtp-Source: AGHT+IEqyGJluj/auLOxfs3Ye0xOGtib1D70Col866sXtKME5UTsNm7M9tAGOopW6gC34r5VlYLH X-Received: by 2002:a05:6214:5084:b0:696:1ed8:3a6d with SMTP id kk4-20020a056214508400b006961ed83a6dmr9959802qvb.41.1711415476072; Mon, 25 Mar 2024 18:11:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711415476; cv=pass; d=google.com; s=arc-20160816; b=0q25LR/xWzvPKLllEV7ktESS3iyoTIum8UzL3FCEybf4+LhBcgP0Qaww5SitEClmnf xCYdp0DGKeM8LejxnfWOr0FdrlgORnh1rnjrs1wEtnqffV01GFcnrv2xIjbk8EYdRKM6 PgXtsMiFhM1AJC3AZkwzRfSLpP2R23cU0iSPnvkvk7iBktV2laTT73Br2cRrhmiGnupl 61nuydhOkT/nyHu5Z18oVdM/JW4aWdu2iRs2DFAllgWDGkr52F+jPXcujLJZmLIx4vhw j6Rskaa+uAJTiHE04AvAsR0SSpRr/oVj9ym+CRx3AcbD1Pc+EM5kWKpipx5169TbuhSg AojA== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=q13WMrsqKgrXXFIBsB6QRe/kJCRfjBQkQH/hg2NF4RY=; fh=6oy9jfJy8+AiL1bSP0U2AJJiP5oBj63l8sWrosFA4Ek=; b=0oBHg37ZLYGDJo9uNuJ7yWhyC78WXeK7hhscWgCsskv1YyWjhauFgpJ8T1LTMbcBvW X+anphVcOJzEXDtCIR0zbLH1Hu+IoCuaQXIVePc09ACUv0VrJzsAZbjfRgJzCOoQfQFi AiQZznnQ4qz6jzcFPjXbe6C4HjDESLRAcHExG99/xbFZRCRTc2JC3lryvUgpI8fVUN7A YnkWFzkpKjuW118d/y1YgUarTLby8vC3MgoJcodBRoyXonbLgpPVvbp+HRzqlko3goIy DKfo/cOSrfBncoz1dnppO21xRpOTqGNFzu+gjBiN4i470BB6cd6BHJCHD6vJIeHP6J8q Yvtg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=TAI5t4t7; 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-118235-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118235-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id iw10-20020a0562140f2a00b0069698c6c014si1224624qvb.242.2024.03.25.18.11.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 18:11:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118235-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=TAI5t4t7; 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-118235-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118235-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C668E1C331C2 for ; Tue, 26 Mar 2024 01:11:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4AFF01CAB8; Tue, 26 Mar 2024 01:10:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="TAI5t4t7" 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 A26D2208BC for ; Tue, 26 Mar 2024 01:10:39 +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=1711415441; cv=none; b=bXw9IuYgaVCQNWHXmUvM0BkT3M4ZAjCPGm43P/IVyf+hMl72XYBVONVvYPofe0kH9UT7ocl8a0Pif+FOVsJOknbly44/aKW3F4vpq/THrKZxwqhvTPqIqC7aZKYnkYnCJV53evRxr5HOw7lDV5bb52hgPObwyKD+bf8ueq76kDQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711415441; c=relaxed/simple; bh=0QsKgJQ19vq8y8tPl++NyerJ36KN8IVJkfJVqeiKsRc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=R2apqrfIzZYNZepNuWdY7HhSOqcN4KWB/z+6c31vW2C+tYpimVBsaaCyeQvYUeyjBtjfGpSGfPjU4DLXY2CFAxRtgeTpgIcBW15UZPnaMDTfntcuWmDCJrWUPmSenCphdmuDaQPtN07kcmT+Ue8TQgWktCfDQ5F5hwjIp2gUcGk= 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=TAI5t4t7; 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 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> 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 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), -- 2.40.1