Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ASoC: aw88461: add the Awinic AW88461 speaker amplifier
@ 2026-11-30 23:47 Qianhui Xu
  2026-11-30 23:47 ` [PATCH v2 1/2] ASoC: dt-bindings: awinic,aw88395: add the AW88461 variant Qianhui Xu
  2026-11-30 23:47 ` [PATCH v2 2/2] ASoC: codecs: aw88461: add the Awinic AW88461 speaker amplifier driver Qianhui Xu
  0 siblings, 2 replies; 4+ messages in thread
From: Qianhui Xu @ 2026-11-30 23:47 UTC (permalink / raw)
  To: broonie
  Cc: lgirdwood, robh, krzk+dt, conor+dt, wangweidong.a, perex, tiwai,
	linux-sound, devicetree, alsa-devel, linux-kernel

This adds support for the Awinic AW88461, a speaker amplifier of the
AW88xxx family that is used as the speaker PA on Lenovo TB322FC (SM8750)
tablets, where two instances drive the left and right speaker.

The part reports PID 0x2308 and is tuned from an ACF firmware image, so
the existing AW88395 device library is reused for parsing and profile
selection.  It differs from the other family members in two ways: it has
no sample-level VCALB backup register, so the startup ramp is done by the
driver itself, and it is always wired to a reset GPIO and always needs a
firmware image, which is why the new compatible makes both properties
mandatory in the binding.

Patch 1 extends the existing awinic,aw88395 binding, patch 2 adds the
driver (Kconfig + Makefile + sound/soc/codecs/aw88461.c).

Changes in v2:
- Do not latch a permanent error when the start sequence fails.  The
  amplifier is parked muted and powered down, so the next playback can
  retry; the reset line is cycled only for a real hardware fault.
- After such a reset, replay both the ACF register sequence and the I2S
  format computed in hw_params(), which the reset would otherwise drop.
- Only over-current, over-temperature and boost faults are treated as
  fatal, and they are checked inside the poll loops, so a stuck clock
  fault ends as a retryable power-down instead of a timeout.
- Select the Music profile by name for V1 ACF images, whose profile ids
  the library renumbers sequentially.
- Initialise the software volume to the profile level, so the amplifier is
  not stuck at maximum attenuation before userspace sets a level.
- Verify the expected SYSST bits after each poll loop; a stop/start race
  could otherwise enable the output without PLL lock.
- Add the driver to SND_SOC_ALL_CODECS.

*** AI-assistance disclosure ***
This patch was prepared with the help of an LLM coding assistant.  The
author reviewed every line, checked every quoted claim against the tree,
and ran the gates quoted in the cover letter; the design decisions and
any errors are the author's.

Qianhui Xu (2):
  ASoC: dt-bindings: awinic,aw88395: add the AW88461 variant
  ASoC: codecs: aw88461: add the Awinic AW88461 speaker amplifier driver

 .../bindings/sound/awinic,aw88395.yaml        |  11 +
 sound/soc/codecs/Kconfig                      |  14 +
 sound/soc/codecs/Makefile                     |   2 +
 sound/soc/codecs/aw88461.c                    | 645 ++++++++++++++++++
 4 files changed, 672 insertions(+)
 create mode 100644 sound/soc/codecs/aw88461.c


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-30 23:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 23:47 [PATCH v2 0/2] ASoC: aw88461: add the Awinic AW88461 speaker amplifier Qianhui Xu
2026-11-30 23:47 ` [PATCH v2 1/2] ASoC: dt-bindings: awinic,aw88395: add the AW88461 variant Qianhui Xu
2026-11-30 23:47 ` [PATCH v2 2/2] ASoC: codecs: aw88461: add the Awinic AW88461 speaker amplifier driver Qianhui Xu
2026-11-30 23:57   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox