[PATCH v3 0/2] ASoC: codecs: wcd9378: add non-SDCA (mobile) mode support

From: Ravi Hothi

Date: Fri Nov 27 2026 - 08:52:28 EST


The WCD9378 is the audio codec on SM7635 boards such as the eliza-cqs-evk
and the Fairphone 6. Support for the SDCA-compliant fusing of the part is
already upstream; this series adds the other fusing, the one used on mobile
boards, which is not SDCA-compliant.

Which fusing a part has is decided in silicon, not chosen by software: the
same die is fused one way or the other and there is no switching between
them at runtime. Both fusings also carry the same SoundWire class ID and so
the same compatible, which is why they are described in one binding file
and served by one driver module, dispatching on the existing
qcom,sdca-compliant property. That merged-module shape follows the
precedent wcd9378-sdca.c already sets for this same part.

The non-SDCA fusing puts two SoundWire devices on the bus instead of one,
normally on two different masters: a capture device on the TX link and a
playback device on the RX link. They are the same part appearing twice and
are told apart by their SoundWire unique ID, reg = <0 3> for capture and
reg = <0 4> for playback.

Every control register, the analog core included, is reachable only through
the capture device, so that device owns the codec: it takes the reset GPIO,
the supplies and the mic-bias levels, registers the component and the DAIs,
and reaches its playback peer through a new qcom,rx-device phandle. Keeping
those resources on a SoundWire device node rather than on a separate parent
node follows wsa883x and wsa8840. This is the shape Krzysztof asked for
while reviewing the SDCA series:

https://lore.kernel.org/all/6a901a72-fbcf-4478-b798-e5f234c5e9d8@xxxxxxxxxx/

The Kconfig symbol SND_SOC_WCD9378_SDCA becomes SND_SOC_WCD9378, since a
single module now covers both fusings. Patch 2 also touches wcd9378-sdca.c
to drop the fusing filter at the head of its probe, which the shared probe
now performs before the SDCA path is ever reached.

Verified on the eliza-cqs-evk: headset capture and headphone playback at
48 kHz. Verified on the Fairphone 6: handset mic capture through the LPASS
TX macro at 48 kHz, repeated across reboots, including UCM-driven use by
PipeWire in a Plasma Mobile session. System suspend/resume is untested and
is a known limitation, described in patch 2.

This is a respin of Jorijn's v2, which he withdrew and handed over; his
attribution is carried on both patches.

Changes in v3:
- Restructured as an extension of the now-upstream WCD9378 support instead
of a new binding plus a new driver: the binding patch modifies the
existing qcom,wcd9378-sdw.yaml rather than adding two new files, and the
driver is a second entry point in the existing module rather than a
separate one. v2's qcom,wcd9378-codec.yaml is gone along with the
top-level codec node it described, as is the accompanying
wcd937x/938x/939x and wcd93xx-common binding churn.
- The capture device owns the codec and reaches its playback peer through a
qcom,rx-device phandle; v2's qcom,control-device boolean is dropped.
- qcom,port-mapping minItems drops from 8 to 5 so both fusings can share
the property.
- RX/playback added: HPHL/HPHR with the per-channel companders and the FU42
channel volume controls. This was follow-up work in v2.
- Kconfig symbol SND_SOC_WCD9378_SDCA renamed to SND_SOC_WCD9378, and the
redundant fusing filter dropped from wcd9378_sdca_probe().
- Clock-stop handling reworked: a runtime PM reference is held on the
capture device for as long as the codec is bound, because the SDCA
function engine does not survive bus clock-stop.
- Both soundwire prerequisites v2 listed are upstream, so the series no
longer depends on anything outside itself.
- Rebased onto next-20261126.
- Link to v2: https://lore.kernel.org/all/20260729000649.263426-1-jorijnvdgraaf@xxxxxxxxxxxxx/

---
Jorijn van der Graaf (1):
ASoC: codecs: wcd9378: add non-SDCA (mobile) mode support

Ravi Hothi (1):
ASoC: dt-bindings: qcom,wcd9378-sdw: add non-SDCA (mobile) mode

.../bindings/sound/qcom,wcd9378-sdw.yaml | 172 +-
sound/soc/codecs/Kconfig | 23 +-
sound/soc/codecs/Makefile | 4 +-
sound/soc/codecs/wcd9378-sdca.c | 14 +-
sound/soc/codecs/wcd9378-sdw.c | 636 +++++-
sound/soc/codecs/wcd9378.c | 2201 ++++++++++++++++++++
sound/soc/codecs/wcd9378.h | 324 +++
7 files changed, 3311 insertions(+), 63 deletions(-)
---
base-commit: a9c48428cbd8d96b26f92631d0db6f8519c5fcc5
change-id: 20261127-b4-wcd9378-v3-b49611a67835

Best regards,
--
Ravi Hothi <ravi.hothi@xxxxxxxxxxxxxxxx>