All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baole Fang <fbl718@163.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Jeremy Szu <jeremy.szu@canonical.com>,
	Werner Sembach <wse@tuxedocomputers.com>,
	Hui Wang <hui.wang@canonical.com>,
	Cameron Berkenpas <cam@neo-zeon.de>,
	Kailang Yang <kailang@realtek.com>, Sami Loone <sami@loone.fi>,
	Elia Devito <eliadevito@gmail.com>,
	alsa-devel@alsa-project.org (moderated list:SOUND),
	linux-kernel@vger.kernel.org (open list)
Cc: gregkh@linuxfoundation.org, Baole Fang <fbl718@163.com>
Subject: [PATCH] ALSA: hda/realtek: Add quirk for Legion Y9000X 2020
Date: Wed,  5 Jan 2022 22:08:54 +0800	[thread overview]
Message-ID: <20220105140856.4855-1-fbl718@163.com> (raw)

Legion Y9000X 2020 has a speaker, but the speaker doesn't work.
This can be fixed by applying alc285_fixup_ideapad_s740_coef
to fix the speaker's coefficients.
Besides, to support the transition between the speaker and the headphone,
alc287_fixup_legion_15imhg05_speakers needs to be run.

Signed-off-by: Baole Fang <fbl718@163.com>
---
 sound/pci/hda/patch_realtek.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 28255e752c4a..c7232f9be690 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6784,6 +6784,8 @@ enum {
 	ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
 	ALC233_FIXUP_NO_AUDIO_JACK,
 	ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME,
+	ALC285_FIXUP_LEGION_Y9000X_SPEAKERS,
+	ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -8380,6 +8382,18 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
 	},
+	[ALC285_FIXUP_LEGION_Y9000X_SPEAKERS] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc285_fixup_ideapad_s740_coef,
+		.chained = true,
+		.chain_id = ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE,
+	},
+	[ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc287_fixup_legion_15imhg05_speakers,
+		.chained = true,
+		.chain_id = ALC269_FIXUP_THINKPAD_ACPI,
+	},
 	[ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS] = {
 		.type = HDA_FIXUP_VERBS,
 		//.v.verbs = legion_15imhg05_coefs,
@@ -8923,6 +8937,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
 	SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME),
 	SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
+	SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
 	SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP),
 	SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
 	SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
-- 
2.25.1



             reply	other threads:[~2022-01-05 14:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 14:08 Baole Fang [this message]
2022-01-05 15:43 ` [PATCH] ALSA: hda/realtek: Add quirk for Legion Y9000X 2020 Takashi Iwai
2022-01-05 15:43   ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2022-01-05  3:41 Baole Fang
2022-01-05  8:26 ` Takashi Iwai
2022-01-05  8:26   ` Takashi Iwai
2022-01-05 10:55   ` Greg Kroah-Hartman
2022-01-05 10:55     ` Greg Kroah-Hartman
2022-01-05 11:39     ` Baole Fang
2022-01-05 11:39       ` Baole Fang
2022-01-05 11:44       ` Greg Kroah-Hartman
2022-01-05 11:44         ` Greg Kroah-Hartman
2022-01-05 12:29         ` Baole Fang
2022-01-05 12:29           ` Baole Fang
2022-01-05 12:33           ` Greg Kroah-Hartman
2022-01-05 12:33             ` Greg Kroah-Hartman
2022-01-05 12:53             ` Baole Fang
2022-01-05 12:53               ` Baole Fang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220105140856.4855-1-fbl718@163.com \
    --to=fbl718@163.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=cam@neo-zeon.de \
    --cc=eliadevito@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hui.wang@canonical.com \
    --cc=jeremy.szu@canonical.com \
    --cc=kailang@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=sami@loone.fi \
    --cc=tiwai@suse.com \
    --cc=wse@tuxedocomputers.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.