All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/8] ASoC: SDCA: enable on DT platforms and add Qualcomm WCD9378 (Tambora) codec
@ 2026-07-22 23:42 Srinivas Kandagatla
  2026-07-22 23:42 ` [RFC PATCH 1/8] ASoC: SDCA: hw_params: program upstream Input Terminals for OT DAI Srinivas Kandagatla
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Srinivas Kandagatla @ 2026-07-22 23:42 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Charles Keepax, Maciej Strozek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Srinivas Kandagatla
  Cc: Bard Liao, Pierre-Louis Bossart, Richard Fitzgerald,
	Jorijn van der Graaf, linux-sound, linux-arm-msm, devicetree,
	patches, linux-kernel, Srinivas Kandagatla

Hi all,

At Linux Plumbers 2025 in the Devicetree MC I raised the "SDCA and the
classic ACPI-DT problem" [1]: MIPI SDCA is built around ACPI/DisCo
firmware descriptors, and the in-tree ASoC SDCA framework
(sound/soc/sdca/) enumerates functions, entities, controls and PDEs by
walking those tables. On ARM64 DT platforms there is no DisCo, so the
framework is unreachable and sdca codecs will not be able to use the
generic sdca drivers and duplicating.

The direction from that discussion was to let DT platforms reuse the
same class/function auxiliary driver plumbing and have codec drivers
supply the small amount of static function/entity metadata that DisCo
would otherwise carry, plus hooks for device-specific bring-up.  This
series is a first cut at that, with the Qualcomm WCD9378 ("Tambora")
SDCA codec on the Glymur CRD as the first consumer. Static table that in
part of this codec is generated from acpi tables.

About WCD9378: the same silicon ships in two very different platform
modes.  In "mobile mode" (Qualcomm phone/tablet SoCs) is enumerated as
as tx and rx device, each of which has dedicated control and data lines.
mobile mode is addressed by Jorijn's posting [2].
In "compute mode" (Qualcomm compute platforms such as Glymur / X2 Elite)
the same part is enumerated as a single standard MIPI SDCA class device
on SoundWire and is driven purely through the SDCA framework, which
is what this series covers.  Both modes share the same MIPI class ID
and, in DT, the same compatible; qcom,compute-mode selects which
driver path is taken.

Framework enablement (patches 1-6):

 * 1: hw_params fix for OT DAI upstream Input Terminals (found while
   bringing up Tambora capture).
 * 2: allow sound/soc/sdca/ to build without ACPI.
 * 3: turn sdca_class into an exported library and introduce
   struct sdca_class_hw_ops with hw_init + get_function_data, so a
   codec driver registers its own sdw_driver, supplies static function
   descriptors when there is no DisCo node, and owns regulators/reset
   at probe time.  The built-in class_sdw_driver stays for
   pure-generic parts (hw_ops = NULL).
 * 4: pde_pre_pmu / pde_post_pmu hooks in hw_ops so vendor drivers
   can stage/commit register writes around PDE PS0 transitions.
 * 5: of_xlate_dai_name that resolves sound-dai cells by entity index
   rather than positional DAI order.
 * 6: register SDCA_FUNCTION_TYPE_SIMPLE_JACK in the class function
   driver.

First consumer (patches 7-8):

 * 7: WCD9378 SoundWire slave binding.  Compatible is shared with
   Jorijn's mobile WCD9378 posting [2]; qcom,compute-mode selects the
   SDCA/compute-mode probe path and gates the compute-only properties.
 * 8: Tambora codec driver - registers its own sdw_driver, calls into
   the class library, supplies SimpleJack + HID functions via
   get_function_data, owns supplies/reset/mic-bias in hw_init, uses
   pde_*_pmu for the FU + IT_USAGE writes the PDE sequencer needs.

RFC because patches 1-6 touch the SDCA framework, is what I
would most like feedback on.  Tested on Qualcomm Glymur CRD:
headphone playback, capture work end-to-end via the Tambora
codec over the mulit master SoundWire bus.
Platform bits (LPASS clock controller, SoundWire aggregate
controller, machine-driver DT, defconfig, ...) are held back for a
separate posting once this shape is agreed.

Next steps
==========

The most obvious follow-up is figuring out how the mobile-mode and
compute-mode WCD9378 drivers coexist under one compatible.  Jorijn's
mobile driver [2] and this compute-mode driver target the same silicon
and register the same MIPI class ID on the SoundWire bus, and today
they discriminate purely on the qcom,compute-mode DT property.  We
need to agree on a cleaner arbitration. Probably a shared
sdw_driver stub in wcd9378-common that reads the mode and dispatches
to the mobile or compute code path - so that both drivers can live in
tree without racing to bind the same slave.  I would like to line this
uip with Jorijn as a follow-up to this series. Cleanup some of the
static volume setting to a proper volume control.

Links
=====

[1] LPC 2025, Devicetree MC:
    "DeviceTrees - MIPI SoundWire Device Class for Audio (SDCA) and
     classic ACPI-DT problem"
    https://lpc.events/event/19/contributions/2024/

[2] Jorijn Rikhof, mobile-mode WCD9378 posting:
    https://lwn.net/Articles/1081648/

Thanks,
Srini

Srinivas Kandagatla (8):
  ASoC: SDCA: hw_params: program upstream Input Terminals for OT DAI
  ASoC: SDCA: allow building without ACPI
  ASoC: SDCA: expose class helpers with hw_ops for non-DisCo platforms
  ASoC: SDCA: add PDE pre/post-pmu hooks to hw_ops
  ASoC: SDCA: class_function: xlate sound-dai cell by entity index
  ASoC: SDCA: register SDCA_FUNCTION_TYPE_SIMPLE_JACK in class function
    driver
  dt-bindings: sound: qcom: add Tambora WCD9378 SDCA codec
  ASoC: codecs: add Qualcomm Tambora (WCD9378) SDCA codec

 .../bindings/sound/qcom,wcd9378-sdw.yaml      |  201 +++
 include/sound/sdca.h                          |    2 +-
 sound/soc/codecs/Kconfig                      |   12 +
 sound/soc/codecs/Makefile                     |    2 +
 sound/soc/codecs/wcd9378-sdca.c               | 1202 +++++++++++++++++
 sound/soc/sdca/Kconfig                        |    6 +-
 sound/soc/sdca/sdca_asoc.c                    |   84 +-
 sound/soc/sdca/sdca_class.c                   |   83 +-
 sound/soc/sdca/sdca_class.h                   |   41 +
 sound/soc/sdca/sdca_class_function.c          |   80 +-
 sound/soc/sdca/sdca_device.c                  |    4 +
 sound/soc/sdca/sdca_function_device.c         |    2 +-
 sound/soc/sdca/sdca_functions.c               |    4 +
 13 files changed, 1710 insertions(+), 13 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd9378-sdw.yaml
 create mode 100644 sound/soc/codecs/wcd9378-sdca.c

-- 
2.53.0


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

end of thread, other threads:[~2026-07-23  0:03 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22 23:42 [RFC PATCH 0/8] ASoC: SDCA: enable on DT platforms and add Qualcomm WCD9378 (Tambora) codec Srinivas Kandagatla
2026-07-22 23:42 ` [RFC PATCH 1/8] ASoC: SDCA: hw_params: program upstream Input Terminals for OT DAI Srinivas Kandagatla
2026-07-22 23:54   ` sashiko-bot
2026-07-22 23:42 ` [RFC PATCH 2/8] ASoC: SDCA: allow building without ACPI Srinivas Kandagatla
2026-07-22 23:59   ` sashiko-bot
2026-07-22 23:42 ` [RFC PATCH 3/8] ASoC: SDCA: expose class helpers with hw_ops for non-DisCo platforms Srinivas Kandagatla
2026-07-22 23:58   ` sashiko-bot
2026-07-22 23:42 ` [RFC PATCH 4/8] ASoC: SDCA: add PDE pre/post-pmu hooks to hw_ops Srinivas Kandagatla
2026-07-22 23:56   ` sashiko-bot
2026-07-22 23:42 ` [RFC PATCH 5/8] ASoC: SDCA: class_function: xlate sound-dai cell by entity index Srinivas Kandagatla
2026-07-22 23:57   ` sashiko-bot
2026-07-22 23:42 ` [RFC PATCH 6/8] ASoC: SDCA: register SDCA_FUNCTION_TYPE_SIMPLE_JACK in class function driver Srinivas Kandagatla
2026-07-22 23:56   ` sashiko-bot
2026-07-22 23:42 ` [RFC PATCH 7/8] dt-bindings: sound: qcom: add Tambora WCD9378 SDCA codec Srinivas Kandagatla
2026-07-22 23:51   ` sashiko-bot
2026-07-22 23:42 ` [RFC PATCH 8/8] ASoC: codecs: add Qualcomm Tambora (WCD9378) " Srinivas Kandagatla
2026-07-23  0:03   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.