Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Viktor Menshin <ripeeerr@gmail.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de
Subject: ALC287 (SSID 17aa:3912) audio distortion on Lenovo Xiaoxin Pro 14 ASP10 - root cause and headphone fix
Date: Sun, 30 Aug 2026 17:35:30 +0900	[thread overview]
Message-ID: <20260830083530.6461-1-ripeeerr@gmail.com> (raw)

Hi,

Reporting an audio issue on a Lenovo Xiaoxin Pro 14 ASP10 (83LR), AMD
Ryzen AI 9 365 (Strix Point), with a Realtek ALC287 codec, PCI SSID
17aa:3912.

Symptom: both the internal speakers and headphone output produce heavy
distortion/crackling (not volume-dependent) on every Linux kernel and
distro tested, and also on Windows before installing the Realtek driver
package.

$ uname -a
Linux riper-83lr 7.1.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 04 Aug 2026 11:19:27 +0000 x86_64 GNU/Linux

$ lspci -nnk | grep -iA3 audio
c2:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Ryzen HD Audio Controller [1022:15e3]
	Subsystem: Lenovo Device [17aa:38b2]
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

Relevant dmesg:
snd_hda_codec_alc269 hdaudioC1D0: ALC287: picked fixup  for PCI SSID 17aa:0000
snd_hda_codec_alc269 hdaudioC1D0: autoconfig for ALC287: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
snd_hda_codec_alc269 hdaudioC1D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
snd_hda_codec_alc269 hdaudioC1D0:    inputs:
snd_hda_codec_alc269 hdaudioC1D0:      Mic=0x19

Root cause: there's no quirk entry for SSID 17aa:3912 in patch_realtek.c,
so the codec falls back to the generic "17aa:0000" Lenovo fixup. The
ALC287 vendor-specific processing coefficients (node 0x20) are left at
generic/uninitialized defaults, while the Windows Realtek driver programs
a model-specific coefficient table into this node at init. That's what
causes the distortion.

To find the real values, I passed the physical HD Audio controller
(0000:c2:00.6) through to a Windows 10 VM via VFIO, ran the stock Realtek
driver, and logged CORB verb traffic with a patched QEMU, using
https://github.com/ryanprescott/realtek-verb-tools
(wiki: https://github.com/ryanprescott/realtek-verb-tools/wiki/How-to-sniff-verbs-from-a-Windows-sound-driver)

Headphones: fixed. A single coefficient write completely eliminates the
distortion on the headphone output, confirmed stable across reboots and
under load:

  hda-verb /dev/snd/hwC1D0 0x20 SET_COEF_INDEX 0x36
  hda-verb /dev/snd/hwC1D0 0x20 SET_PROC_COEF 0x77d7

As a kernel-style fixup:

  static void alc287_fixup_lenovo_xiaoxin_pro14_asp10_hp(struct hda_codec *codec,
                                                          const struct hda_fixup *fix, int action)
  {
          if (action != HDA_FIXUP_ACT_INIT)
                  return;

          alc_write_coef_idx(codec, 0x36, 0x77d7);
  }

Suggested quirk table entry:

  SND_PCI_QUIRK(0x17aa, 0x3912, "Lenovo Xiaoxin Pro 14 ASP10",
                ALC287_FIXUP_LENOVO_XIAOXIN_PRO14_ASP10_HP),

Speakers: not fixed yet. I captured a much larger coefficient table from
a speaker-only session (headphones unplugged) and replayed it, but it did
not resolve the speaker distortion. Still investigating.

Full codec dump (cat /proc/asound/card1/codec#0) available on request.

Thanks,
Viktor Menshin

                 reply	other threads:[~2026-08-30  8:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260830083530.6461-1-ripeeerr@gmail.com \
    --to=ripeeerr@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox