The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Marco Giunta <marco_giunta@outlook.it>
Cc: tiwai@suse.com, perex@perex.cz, lgirdwood@gmail.com,
	broonie@kernel.org, linux-kernel@vger.kernel.org,
	linux-sound@vger.kernel.org, rafael@kernel.org, lenb@kernel.org,
	hansg@kernel.org, ilpo.jarvinen@linux.intel.com,
	linux-acpi@vger.kernel.org, platform-driver-x86@vger.kernel.org,
	wangweidong.a@awinic.com, nadim@symbolic.software,
	imitoy@imitoy.top, munzirtaha@gmail.com, yakov.till@gmail.com
Subject: Re: [PATCH 0/8] ALSA: hda: Add AW88399 HDA side codec driver for Lenovo Legion
Date: Tue, 21 Jul 2026 13:32:33 +0200	[thread overview]
Message-ID: <87h5lsinn2.wl-tiwai@suse.de> (raw)
In-Reply-To: <DS7PR19MB77247D9AD698CF0FF37DB58BFCC62@DS7PR19MB7724.namprd19.prod.outlook.com>

On Fri, 17 Jul 2026 15:25:02 +0200,
Marco Giunta wrote:
> 
> Several Lenovo Legion laptops (Pro 7i 16IAX10H, Y9000P IAX10,
> Pro 7 16AFR10H, R9000P ADR10) use AWINIC AW88399 smart amplifiers
> to drive their bass woofers, connected via I2C as side codecs
> to a Realtek ALC287 HDA codec.
> 
> Without a driver for these amplifiers, only the tweeters produce
> sound, resulting in quiet and tinny audio.
> 
> An ASoC driver for the AW88399 already exists in-tree
> (sound/soc/codecs/aw88399.c), contributed by AWINIC, but it targets
> ASoC topologies and cannot drive the chip when it sits behind an
> HDA controller. This series adds a proper HDA side codec driver,
> following the established pattern used by the CS35L41, CS35L56,
> and TAS2781 drivers.
> 
> Patch 1 extracts the device-level functions from the existing ASoC
> driver into a shared library module (SND_SOC_AW88399_LIB) with a
> shared header at include/sound/aw88399.h, following the CS35L41
> precedent (SND_SOC_CS35L41_LIB / include/sound/cs35l41.h). This
> avoids a build-time dependency on the full ASoC codec module and
> ensures clean separation between the ASoC and HDA drivers.
> 
> Patches 2 through 5 prepare the shared library for use on ACPI-based
> HDA systems: patch 2 extends channel assignment to work without
> Device Tree properties, patch 3 adds a per-instance flag to bypass
> an unreliable hardware status bit on certain boards, patch 4 adds
> a firmware reload flag so that the HDA driver can signal that DSP
> firmware needs to be re-uploaded after system sleep, and patch 5
> adds a channel setter so that the HDA driver can configure the
> amplifier without depending on ASoC-internal device headers.
> 
> Patch 6 registers the AWINIC ACPI HID "AWDZ8399" with the ACPI scan
> ignore list and the serial-multi-instantiate driver for correct
> enumeration of the two amplifier instances.
> 
> Patch 7 adds the HDA side codec driver itself, structured after the
> CS35L41 HDA driver: an I2C bus driver, and a core driver implementing
> HDA component binding, playback hooks, power management, and per-model
> quirk matching using ACPI subsystem ID.
> 
> Patch 8 enables the driver on Lenovo Legion Pro models by adding
> the necessary Realtek ALC287 fixups (DAC rerouting for bass speaker
> volume control, internal microphone calibration) and AW88399 per-model
> quirks (I2C channel swap correction, BSTS status check bypass).
> 
> NOTE ON FIRMWARE: This driver requires the firmware file
> aw88399_acf.bin, which uses the same format and request path as the
> existing ASoC driver. This firmware is not yet available in the
> linux-firmware repository. We intend to coordinate with the AWINIC
> maintainers (CC'd) to arrange its inclusion. In the meantime, users
> can extract the firmware from the Windows driver and place it in
> /lib/firmware/.
> 
> This work builds on the initial driver development by Yakov Till
> ("Lyapsus") and the bounty effort organized by Nadim Kobeissi:
> https://github.com/nadimkobeissi/16iax10h-linux-sound-saga
> 
> Marco Giunta (8):
>   ASoC: aw88399: extract shared device library
>   ASoC: aw88399: derive channel from I2C address on ACPI systems
>   ASoC: aw88399: add per-instance BSTS status bypass flag
>   ASoC: aw88399: add firmware reload flag for resume
>   ASoC: aw88399: add channel setter for HDA side codec
>   ACPI/platform: add AWDZ8399 to serial-multi-instantiate
>   ALSA: hda/scodec: add AW88399 HDA side codec driver
>   ALSA: hda/realtek: enable AW88399 on Lenovo Legion Pro

Through a quick glance, the code changes look mostly OK.
But I believe the potential memory leak Sashiko suggested in the patch
7 is a real issue, and it should be fixed.
  https://sashiko.dev/#/patchset/DS7PR19MB77247D9AD698CF0FF37DB58BFCC62%40DS7PR19MB7724.namprd19.prod.outlook.com

In anyway, as this series spans over different areas, we'd need proper
ACK's from ASoC, ACPI and platform people in order to get those merged
to the upstream.


thanks,

Takashi

  parent reply	other threads:[~2026-07-21 11:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 13:25 [PATCH 0/8] ALSA: hda: Add AW88399 HDA side codec driver for Lenovo Legion Marco Giunta
2026-07-17 13:25 ` [PATCH 1/8] ASoC: aw88399: extract shared device library Marco Giunta
2026-07-21 15:21   ` Ilpo Järvinen
2026-07-21 16:57     ` Mark Brown
2026-07-17 13:25 ` [PATCH 2/8] ASoC: aw88399: derive channel from I2C address on ACPI systems Marco Giunta
2026-07-17 13:25 ` [PATCH 3/8] ASoC: aw88399: add per-instance BSTS status bypass flag Marco Giunta
2026-07-17 13:25 ` [PATCH 4/8] ASoC: aw88399: add firmware reload flag for resume Marco Giunta
2026-07-17 13:25 ` [PATCH 5/8] ASoC: aw88399: add channel setter for HDA side codec Marco Giunta
2026-07-17 13:25 ` [PATCH 6/8] ACPI/platform: add AWDZ8399 to serial-multi-instantiate Marco Giunta
2026-07-21 12:13   ` Rafael J. Wysocki (Intel)
2026-07-21 15:22   ` Ilpo Järvinen
2026-07-17 13:25 ` [PATCH 7/8] ALSA: hda/scodec: add AW88399 HDA side codec driver Marco Giunta
2026-07-17 13:25 ` [PATCH 8/8] ALSA: hda/realtek: enable AW88399 on Lenovo Legion Pro Marco Giunta
2026-07-21 11:32 ` Takashi Iwai [this message]
2026-07-21 18:19 ` (subset) [PATCH 0/8] ALSA: hda: Add AW88399 HDA side codec driver for Lenovo Legion Mark Brown

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=87h5lsinn2.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=broonie@kernel.org \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=imitoy@imitoy.top \
    --cc=lenb@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=marco_giunta@outlook.it \
    --cc=munzirtaha@gmail.com \
    --cc=nadim@symbolic.software \
    --cc=perex@perex.cz \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=tiwai@suse.com \
    --cc=wangweidong.a@awinic.com \
    --cc=yakov.till@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox