]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda/realtek: Apply fixup for Lenovo Yoga Duet 7 properly
authorTakashi Iwai <tiwai@suse.de>
Tue, 14 Jun 2022 05:48:31 +0000 (07:48 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 15 Jun 2022 05:28:51 +0000 (07:28 +0200)
commitae744bcf98ba9c0f91a5a34e394c0d1846bccde2
tree735c9d26e8ed16523cb8c21cdcf046682aeb0adc
parent7be913c01ed9abbb9dfea4dfb5a3eb76ce1d0db9
ALSA: hda/realtek: Apply fixup for Lenovo Yoga Duet 7 properly

It turned out that Lenovo shipped two completely different products
with the very same PCI SSID, where both require different quirks;
namely, Lenovo C940 has already the fixup for its speaker
(ALC298_FIXUP_LENOVO_SPK_VOLUME) with the PCI SSID 17aa:3818, while
Yoga Duet 7 has also the very same PCI SSID but requires a different
quirk, ALC287_FIXUP_YOGA7_14TIL_SPEAKERS.

Fortunately, both are with different codecs (C940 with ALC298 and Duet
7 with ALC287), hence we can apply different fixes by checking the
codec ID.  This patch implements that special fixup function.

For easier handling, the internal function for applying a specific
fixup entry is exported as __snd_hda_apply_fixup(), so that it can be
called from the codec driver.  The rest is simply calling it with a
different fixup ID depending on the codec ID.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: nikitashvets@flyium.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/5ca147d1-3a2d-60c6-c491-8aa844183222@redhat.com
Link: https://lore.kernel.org/r/20220614054831.14648-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_auto_parser.c
sound/pci/hda/hda_local.h
sound/pci/hda/patch_realtek.c