Skip to content

ASoC/soundwire: AMD ACP6x (Rembrandt) SoundWire speaker support

Corey Smith linux-sound 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11soundwire: amd: add ACP6x PCI revision idsinclude/linux/soundwire/sdw_amd.h+2 -00 replies
2/11soundwire: amd: support ACP6x SoundWire managersdrivers/soundwire/amd_manager.c+8 -00 replies
3/11ASoC: amd: ps: add ACP6x PCI revision idssound/soc/amd/ps/acp63.h+5 -00 replies
4/11ASoC: amd: ps: support ACP6x in the SoundWire DMA driversound/soc/amd/ps/ps-sdw-dma.c+11 -10 replies
5/11ASoC: amd: acp: add ACP6x (Rembrandt) SoundWire machine tablesound/soc/amd/acp/Makefile sound/soc/amd/acp/amd-rmb-acpi-match.c sound/soc/amd/mach-config.h+65 -10 replies
6/11ASoC: amd: acp-config: route HP Dragonfly Pro ONE through the ACP6x SDW stacksound/soc/amd/acp-config.c sound/soc/amd/mach-config.h+25 -00 replies
7/11ASoC: amd: ps: probe the ACP6x SoundWire stacksound/soc/amd/ps/pci-ps.c+66 -190 replies
8/11ASoC: amd: acp: add ACP6x SoundWire quirks and machine supportsound/soc/amd/acp/acp-sdw-legacy-mach.c sound/soc/amd/acp/soc_amd_sdw_common.h+22 -00 replies
9/11soundwire: amd: accept the legacy mipi-sdw-master-list propertysound/soc/amd/acp/amd-sdw-acpi.c+12 -30 replies
10/11ASoC: amd: ps: harden the ACP interrupt path for ACP6xsound/soc/amd/ps/pci-ps.c+32 -120 replies
11/11soundwire: amd: provide defaults for the bus clock propertiesdrivers/soundwire/amd_manager.c+25 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/11] ASoC/soundwire: AMD ACP6x (Rembrandt) SoundWire speaker support

The HP Dragonfly Pro ONE (AMD Rembrandt, ACP PCI revision 0x60) has no working internal speakers under Linux. Its speakers are two Realtek RT1316 SDCA amplifiers on SoundWire link 0 of the ACP SoundWire controller:

\_SB.PCI0.GP17.ACP.SDWC.SLV0.AF04 (_ADR 0x000030025D131601) \_SB.PCI0.GP17.ACP.SDWC.SLV1.AF04 (_ADR 0x000031025D131601)

-> manufacturer 0x025D (Realtek), part 0x1316 (RT1316)
-> link 0, unique id 0/1, aggregated as one stereo "Speaker" endpoint

None of the in-tree AMD ACP drivers can drive these amplifiers:

* snd_pci_acp6x (sound/soc/amd/yc) is the only driver that accepts the ACP6x revision (0x60). It implements the PDM/DMIC path only, so the machine results in a capture-only card (pcmC1D0c) and the speakers never appear.
* snd-pci-ps (sound/soc/amd/ps, ACP6.3/7.x) has the SoundWire manager,

    SDW DMA and machine plumbing, but rejects revision 0x60.

* drivers/soundwire/amd_manager.c only knows the ACP6.3 and ACP7.x register maps.
* sound/soc/amd/acp/amd-sdw-acpi.c only reads the modern "mipi-sdw-manager-list" property; Rembrandt firmware uses the legacy "mipi-sdw-master-list" name.

This series makes the ACP6x SoundWire path usable and routes this board through it:

  1-2   accept the ACP6x PCI revisions in the SoundWire manager driver
  3-4   accept them in the Pink Sardine (ps) platform header and SDW DMA
  5     add an ACP6x RT1316 machine table
  6     add a FLAG_AMD_LEGACY_SDW DMI entry for board 8A7F so that
        snd_pci_acp6x releases the device to snd-pci-ps
  7     teach snd-pci-ps to probe the ACP6x SoundWire (and integrated PDM)
        hardware
  8     teach the generic amd_sdw machine driver about ACP6x
  9     accept the legacy "mipi-sdw-master-list" property
  10    harden the ACP interrupt path (fixes a boot panic found in

testing: the IRQ handler runs before the platform devices exist)
11 restore the legacy bus clock defaults when firmware omits the
MIPI DisCo clock properties (fixes a -22 SDW probe failure found in testing)

Assumptions that need hardware validation by the reporter:

* The ACP6x SoundWire manager and SDW DMA register blocks are register compatible with ACP6.3 (the series reuses the ACP6.3 register maps and stream/IRQ associations). AMD shares the ACP_SW_* register definitions between ACP6.3 and ACP7.0, which makes this plausible, but it is not verified against a Rembrandt datasheet.
* The ACP6x SDW controller child is the device at _ADR 0x02 under the ACP, and Rembrandt firmware does not describe the PDM controller (DMIC) in ACPI, so the PDM path is enabled unconditionally for ACP6x.

The series has been built and booted on the target machine; the ACP6x SoundWire controller is now probed. The register-map assumptions above still need to be confirmed by actually playing audio.

Corey Smith (11):
soundwire: amd: add ACP6x PCI revision ids
soundwire: amd: support ACP6x SoundWire managers
ASoC: amd: ps: add ACP6x PCI revision ids
ASoC: amd: ps: support ACP6x in the SoundWire DMA driver
ASoC: amd: acp: add ACP6x (Rembrandt) SoundWire machine table
ASoC: amd: acp-config: route HP Dragonfly Pro ONE through the ACP6x
SDW stack
ASoC: amd: ps: probe the ACP6x SoundWire stack
ASoC: amd: acp: add ACP6x SoundWire quirks and machine support
soundwire: amd: accept the legacy mipi-sdw-master-list property
ASoC: amd: ps: harden the ACP interrupt path for ACP6x
soundwire: amd: provide defaults for the bus clock properties

 drivers/soundwire/amd_manager.c         |  33 +++++++
 include/linux/soundwire/sdw_amd.h       |   2 +
 sound/soc/amd/acp-config.c              |  19 +++++
 sound/soc/amd/acp/Makefile              |   2 +-
 sound/soc/amd/acp/acp-sdw-legacy-mach.c |  20 +++++
 sound/soc/amd/acp/amd-rmb-acpi-match.c  |  63 ++++++++++++++++
 sound/soc/amd/acp/amd-sdw-acpi.c        |  15 +++-
 sound/soc/amd/acp/soc_amd_sdw_common.h  |   2 +
 sound/soc/amd/mach-config.h             |   7 ++
 sound/soc/amd/ps/acp63.h                |   5 ++
 sound/soc/amd/ps/pci-ps.c               | 129 ++++++++++++++++++++++++--------
 sound/soc/amd/ps/ps-sdw-dma.c           |  12 ++-
 12 files changed, 273 insertions(+), 36 deletions(-)
 create mode 100644 sound/soc/amd/acp/amd-rmb-acpi-match.c