From patchwork Mon May 27 15:55:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Chiu X-Patchwork-Id: 1939997 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vp0hG0hMjz20ds for ; Tue, 28 May 2024 01:59:25 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1sBckm-0000oU-Ih; Mon, 27 May 2024 15:59:16 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1sBckj-0000nn-H5 for kernel-team@lists.ubuntu.com; Mon, 27 May 2024 15:59:13 +0000 Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id B8B373FE13 for ; Mon, 27 May 2024 15:59:12 +0000 (UTC) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-1f44b4ed24aso31108815ad.1 for ; Mon, 27 May 2024 08:59:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716825551; x=1717430351; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bhzFYp/ii+hPvW5pjUjqF7U4cnHuj+ZmOXMCZwpC/+E=; b=mLXKIPK1vtV2zkflGxkw3tWYc+958RfwsF3z5e5xCFK0w6V+ckxT3QliRVTxEr3W9E 1edp7EJzx6D7Tk9pQTxY13gFYJ5JS1BSYMsaSIDVtwE0e/IvrWLBc7SrgbfdjRqcNRha yWtI1uwHv/ZGNgUXQC+8iFpB/0RkxJ5p2+AYOfsekfnqrQqmQsYQ3PPytgOd6Box8LOU W71g4VDhA3edTjr2F9OLYif8GMBJP/ZXAts0Nm7ZvxvWAUT0/jrk2wqgtdg1AQoweqGM 0jXPi2Ry26BioD6Dl2ET5B6XZ5wZHpc12c1/mmLTVPO96CJJFcZ/47UY77XFZkxa0CIC WbWA== X-Gm-Message-State: AOJu0YwLhSomSj1tnJrfc+3zAUzRzg26ybc8DELBqZXCH4srEraHWRZE FpwQhbkg/Oq/+Iv65JVUfMvcWybAefR4oO/ggYHxeGhqM5XUqoUSlakyo8snQfD1zT42aJ17pEP FnDn7sTqsSaNja6Xj7vyWzEZK/NigXNmkf8aMxuyNVpLKoQ0Vu386/9cAtU7LL9t3B8NdwaUFNf UQ38IG1WYsWwEK X-Received: by 2002:a17:902:d483:b0:1f4:9e9f:57df with SMTP id d9443c01a7336-1f49e9f732amr38169565ad.58.1716825551212; Mon, 27 May 2024 08:59:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG24Nyfrcur5FrWBltsc+muGq9gFBAEzz4iCZetaaruZsc6Ds/Y0QAIrvn/Maslj1tz+gz/iw== X-Received: by 2002:a17:902:d483:b0:1f4:9e9f:57df with SMTP id d9443c01a7336-1f49e9f732amr38169315ad.58.1716825550688; Mon, 27 May 2024 08:59:10 -0700 (PDT) Received: from localhost.localdomain (220-136-200-183.dynamic-ip.hinet.net. [220.136.200.183]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c79b9f1sm62755425ad.76.2024.05.27.08.59.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 08:59:10 -0700 (PDT) From: Chris Chiu To: kernel-team@lists.ubuntu.com Subject: [SRU][N][PATCH 2/2] ALSA: hda/realtek: Add quirks for HP G11 Laptops using CS35L56 Date: Mon, 27 May 2024 23:55:59 +0800 Message-Id: <20240527155559.561244-3-chris.chiu@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240527155559.561244-1-chris.chiu@canonical.com> References: <20240527155559.561244-1-chris.chiu@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Simon Trimmer BugLink: https://bugs.launchpad.net/bugs/2062135 Add quirks for two HP G11 laptops that use a Realtek HDA codec combined with four CS35L56 amplifiers using SPI. The CS35L56 driver uses the component binding interface, so uses the same setup code as the CS35L41 quirks. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20240125123301.41692-1-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai (backported from commit b2d6a1fd0e3e513f5ebfc152d6fedae093df8e21) [Chris Chiu: remove un-necessary fixups from the kernel 6.9] Signed-off-by: Chris Chiu --- sound/pci/hda/patch_realtek.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6e4b88cf3af4..a74bc67d38b0 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -6988,6 +6988,11 @@ static void alc287_fixup_legion_16ithg6_speakers(struct hda_codec *cdc, const st comp_generic_fixup(cdc, action, "i2c", "CLSA0101", "-%s:00-cs35l41-hda.%d", 2); } +static void cs35l56_fixup_spi_four(struct hda_codec *cdc, const struct hda_fixup *fix, int action) +{ + comp_generic_fixup(cdc, action, "spi", "CSC3556", "-%s:00-cs35l56-hda.%d", 4); +} + static void tas2781_fixup_i2c(struct hda_codec *cdc, const struct hda_fixup *fix, int action) { @@ -7501,7 +7506,7 @@ enum { ALC2XX_FIXUP_HEADSET_MIC, ALC289_FIXUP_DELL_CS35L41_SPI_2, ALC294_FIXUP_CS35L41_I2C_2, - ALC256_FIXUP_HEADPHONE_AMP_VOL, + ALC245_FIXUP_CS35L56_SPI_4_HP_GPIO_LED, }; /* A special fixup for Lenovo C940 and Yoga Duet 7; @@ -9691,9 +9696,11 @@ static const struct hda_fixup alc269_fixups[] = { .type = HDA_FIXUP_FUNC, .v.func = cs35l41_fixup_i2c_two, }, - [ALC256_FIXUP_HEADPHONE_AMP_VOL] = { + [ALC245_FIXUP_CS35L56_SPI_4_HP_GPIO_LED] = { .type = HDA_FIXUP_FUNC, - .v.func = alc256_decrease_headphone_amp_val, + .v.func = cs35l56_fixup_spi_four, + .chained = true, + .chain_id = ALC285_FIXUP_HP_GPIO_LED, }, }; @@ -10034,6 +10041,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x8c47, "HP EliteBook 840 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x8c48, "HP EliteBook 860 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x8c49, "HP Elite x360 830 2-in-1 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8c52, "HP EliteBook 1040 G11", ALC245_FIXUP_CS35L56_SPI_4_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8c53, "HP Elite x360 1040 2-in-1 G11", ALC245_FIXUP_CS35L56_SPI_4_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x8c70, "HP EliteBook 835 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x8c71, "HP EliteBook 845 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x8c72, "HP EliteBook 865 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),