mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 00/11] soundwire: amd: add ACP7B/7E/7F SoundWire manager support
@ 2026-11-17  8:01 Vijendar Mukunda
  2026-11-17  8:01 ` [PATCH v2 01/11] soundwire: amd: add ACP7B/7E/7F register definitions and revision IDs Vijendar Mukunda
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Vijendar Mukunda @ 2026-11-17  8:01 UTC (permalink / raw)
  To: vkoul
  Cc: yung-chuan.liao, pierre-louis.bossart, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, venkataprasad.potturu, Syed.SabaKareem,
	Mario.Limonciello, Richard.Gong, Poojitha.N, linux-sound,
	linux-kernel, Vijendar Mukunda

This is v2 of the AMD ACP7B/7E/7F SoundWire manager support series.
It incorporates review feedback from v1 and rebases on the updated fix
and refactor series. These revisions represent a significant hardware
evolution compared to the ACP7.0/7.1/7.2 generation:

- Up to four SoundWire manager instances (ACP_SDW0 through ACP_SDW3),
  compared to two in earlier generations.
- Banked registers on the manager side for clock frequency and frame
  shape parameters, enabling seamless transitions without bus
  re-enumeration.
- Dynamic clock scaling with both fixed frame shape and dynamic frame
  shape selection, enabling efficient bandwidth use across a wider
  range of bus clock frequencies.
- Extended sample rate and bit-depth support (48/96/192 kHz,
  S16/S24/S32) and a broader set of supported bus clock frequencies
  compared to ACP7.0/7.1/7.2.
- Up to 22 DAIs per manager with 11 TX and 11 RX data ports and
  8 TX and 8 RX DMA channels, compared to fewer ports and DMAs
  in earlier generations.
- SSP synchronisation tag propagation per bus transfer, required by
  the ACP7B/7E/7F hardware and absent in older revisions.
- Shared per-platform wake enable control across all manager instances
  with software serialisation to prevent races between concurrent
  managers during clock stop.
- Separate wake and bus-event IRQ paths, giving cleaner interrupt
  handling compared to earlier generations.
- Per-revision IO pad pin assignments with hardware-required restore
  order on D0 resume after power-off (ACP7B, ACP7E, and ACP7F each
  have distinct physical SoundWire clock and data pin mappings).
- Custom bandwidth allocation with dynamic frame-shape selection
  across candidate clock frequencies.

The new backend amd_acp7x_manager.c plugs into the hw_ops dispatch
framework introduced by the refactor series. It handles the full
driver lifecycle: IRQ handling and slave status processing, port
configuration, DAI PCM capability registration, host wake
enable/disable, clock-stop suspend and resume, and IO pad management.

Multi-manager synchronisation (GSYNC) is planned for a future series
once the required design work is complete; the existing implementation
is structured to accommodate it incrementally.

Two patches to generic_bandwidth_allocation.c are included: one
fixes the hwidth computation for the skipped block-offset slot
(a correctness fix relevant to any user of the generic algorithm),
and one exports the bandwidth helper functions needed by the new
ACP7x compute_params callback.

The interrupt_enabled guard used by ACP6.3/7.0/7.1/7.2 to prevent
new work from being queued during teardown is mirrored in the ACP7x
enable/disable and IRQ thread paths. The corresponding ASoC-side
patches that guard interrupt_enabled checks in the ACP7B/7E/7F IRQ
handler are not included in this series and will be posted separately.

Changes since v1:
- Rebase on AMD SoundWire fix series v6 (23 patches) and refactor
  series v4 (11 patches) in place of fix v5 (25 patches) and refactor
  v3 (11 patches); all context lines and base commit SHAs updated
  throughout.
- Patch 2: treat IMM status cleanup timeout as fatal: replace
  dev_warn() (non-fatal, residual bit comment) with dev_err() and
  return ret.
- Patch 4: add missing return -EINVAL after dev_err() for unexpected
  acp_rev in register_dais(); use local dev variable in the error
  message consistently.
- Patch 6: extend amd_sdw_clock_stop() wake_en_mask dispatch to cover
  the full set of supported revisions (ACP63/70/71/72/7B/7E/7F) with
  a default returning -EINVAL; required because refactor v4 simplified
  the existing code to a plain unconditional write, so this patch must
  rebuild the complete dispatch table.
- Patch 7: revise pad_fully_torn_down comment to be concise and
  accurate for the ACP7x context; rephrase interrupt_enabled comment
  to describe what the guard prevents more precisely.
- Patch 11: use WRITE_ONCE()/READ_ONCE() for all interrupt_enabled
  stores and loads; move the interrupt_enabled guard to the top of
  amd_acp7x_sdw_irq_thread() (before register reads) so the full
  IRQ thread body is gated, not just the schedule_work() call.
- Link to v1:
  https://lore.kernel.org/linux-sound/20261108213520.3570680-1-Vijendar.Mukunda@amd.com/

Dependencies:

This series applies on top of the AMD SoundWire fix series (v6,
23 patches) and the AMD SoundWire refactor series (v4, 11 patches):
https://lore.kernel.org/linux-sound/20261117070906.803139-1-Vijendar.Mukunda@amd.com
https://lore.kernel.org/linux-sound/20261117071927.830373-1-Vijendar.Mukunda@amd.com

Vijendar Mukunda (11):
  soundwire: amd: add ACP7B/7E/7F register definitions and revision IDs
  soundwire: amd: add ACP7B/7E/7F hardware backend
  soundwire: amd: extend ctl_word_prep to set SSP_TAG for ACP7B/7E/7F
  soundwire: amd: add ACP7B/7E/7F DAI PCM capabilities in
    register_dais()
  soundwire: amd: enable host wake support for ACP7B/7E/7F
  soundwire: amd: add ACP7B/7E/7F clock-stop support
  soundwire: amd: add IO pad enable/disable for ACP7B/7E/7F D0/D3
    sequence
  soundwire: generic_bandwidth_allocation: fix hwidth for skipped block
    offset
  soundwire: generic_bandwidth_allocation: export bandwidth helper
    functions
  soundwire: amd: add ACP7x generic bandwidth allocation support
  soundwire: amd: add interrupt_enabled synchronization for ACP7B/7E/7F

 drivers/soundwire/Makefile                    |    2 +-
 drivers/soundwire/amd_acp7x_manager.c         | 1162 +++++++++++++++++
 drivers/soundwire/amd_init.c                  |  365 +++++-
 drivers/soundwire/amd_init.h                  |   13 +
 drivers/soundwire/amd_manager.h               |  297 +++++
 drivers/soundwire/amd_manager_common.c        |  146 ++-
 drivers/soundwire/bus.h                       |   10 +
 .../soundwire/generic_bandwidth_allocation.c  |  129 +-
 include/linux/soundwire/sdw_amd.h             |   17 +
 9 files changed, 2124 insertions(+), 17 deletions(-)
 create mode 100644 drivers/soundwire/amd_acp7x_manager.c

-- 
2.53.0


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

end of thread, other threads:[~2026-11-17  8:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-17  8:01 [PATCH v2 00/11] soundwire: amd: add ACP7B/7E/7F SoundWire manager support Vijendar Mukunda
2026-11-17  8:01 ` [PATCH v2 01/11] soundwire: amd: add ACP7B/7E/7F register definitions and revision IDs Vijendar Mukunda
2026-11-17  8:01 ` [PATCH v2 02/11] soundwire: amd: add ACP7B/7E/7F hardware backend Vijendar Mukunda
2026-11-17  8:01 ` [PATCH v2 03/11] soundwire: amd: extend ctl_word_prep to set SSP_TAG for ACP7B/7E/7F Vijendar Mukunda
2026-11-17  8:01 ` [PATCH v2 04/11] soundwire: amd: add ACP7B/7E/7F DAI PCM capabilities in register_dais() Vijendar Mukunda
2026-11-17  8:01 ` [PATCH v2 05/11] soundwire: amd: enable host wake support for ACP7B/7E/7F Vijendar Mukunda
2026-11-17  8:01 ` [PATCH v2 06/11] soundwire: amd: add ACP7B/7E/7F clock-stop support Vijendar Mukunda
2026-11-17  8:01 ` [PATCH v2 07/11] soundwire: amd: add IO pad enable/disable for ACP7B/7E/7F D0/D3 sequence Vijendar Mukunda
2026-11-17  8:01 ` [PATCH v2 08/11] soundwire: generic_bandwidth_allocation: fix hwidth for skipped block offset Vijendar Mukunda
2026-11-17  8:01 ` [PATCH v2 09/11] soundwire: generic_bandwidth_allocation: export bandwidth helper functions Vijendar Mukunda
2026-11-17  8:01 ` [PATCH v2 10/11] soundwire: amd: add ACP7x generic bandwidth allocation support Vijendar Mukunda
2026-11-17  8:01 ` [PATCH v2 11/11] soundwire: amd: add interrupt_enabled synchronization for ACP7B/7E/7F Vijendar Mukunda

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

all inboxes | Powered by JetHome®