Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/8] ASoC: codecs: wcd93xxx: remove code duplication
@ 2025-08-22 10:49 Srinivas Kandagatla
  2025-08-22 10:49 ` [PATCH v2 1/8] ASoC: codecs: wcd937x: set the comp soundwire port correctly Srinivas Kandagatla
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Srinivas Kandagatla @ 2025-08-22 10:49 UTC (permalink / raw)
  To: broonie
  Cc: perex, tiwai, srini, lgirdwood, linux-sound, linux-kernel,
	linux-arm-msm, krzysztof.kozlowski, neil.armstrong,
	Srinivas Kandagatla

All the Qualcomm WCD codecs and WCD based codecs have lots of code in
common, resulting in lot of duplicate code.
This series is an attempt to clean some of this by moving the common
code to wcd-common library.

Currently I have done cleanups for 4 codecs wcd934x, wcd937x, wcd938x
and wcd939x, however any new Qualcomm codecs can avoid this duplication
by using the wcd-common library.

There is still lot of code that is duplicate, but this is just a
starting point for such cleanups.

This patch depends on the other cleanup patch series 
("[PATCH v2 0/4] ASoC: codecs: wcd937x/8x/9x: cleanup") that was sent few weeks
back: https://www.spinics.net/linux/fedora/linux-sound/msg25202.html

Am happy to merge both of them if it makes it things easy.

I have tested this on T14s, any testing is appreciated.

Changes since v1:
	- add new patches to remove usage of dev_get_regmap
	- add fix to wcd937x for comp soundwire ports

Srinivas Kandagatla (8):
  ASoC: codecs: wcd937x: set the comp soundwire port correctly
  ASoC: codecs: wcd: add common helper for wcd codecs
  ASoC: codecs: wcd-common: move WCD_SDW_CH to common
  ASoC: codecs: wcd-common: move component ops to common
  ASoC: codecs: wcd939x: get regmap directly
  ASoC: codecs: wcd-common: move status_update callback to common
  ASoC: codecs: wcd938x: get regmap directly
  ASoC: codecs: wcd937x: get regmap directly

 sound/soc/codecs/Kconfig       |   8 ++
 sound/soc/codecs/Makefile      |   2 +
 sound/soc/codecs/wcd-common.c  | 139 +++++++++++++++++++++++++++++++++
 sound/soc/codecs/wcd-common.h  |  46 +++++++++++
 sound/soc/codecs/wcd934x.c     |  82 ++++++-------------
 sound/soc/codecs/wcd937x-sdw.c |  61 ++-------------
 sound/soc/codecs/wcd937x.c     |  81 +++++--------------
 sound/soc/codecs/wcd937x.h     |  22 ++----
 sound/soc/codecs/wcd938x-sdw.c |  65 ++-------------
 sound/soc/codecs/wcd938x.c     |  91 +++++----------------
 sound/soc/codecs/wcd938x.h     |  14 +---
 sound/soc/codecs/wcd939x-sdw.c |  84 ++------------------
 sound/soc/codecs/wcd939x.c     |  97 +++++------------------
 sound/soc/codecs/wcd939x.h     |  20 +----
 14 files changed, 307 insertions(+), 505 deletions(-)
 create mode 100644 sound/soc/codecs/wcd-common.c
 create mode 100644 sound/soc/codecs/wcd-common.h

-- 
2.50.0


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

end of thread, other threads:[~2025-09-05 14:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-22 10:49 [PATCH v2 0/8] ASoC: codecs: wcd93xxx: remove code duplication Srinivas Kandagatla
2025-08-22 10:49 ` [PATCH v2 1/8] ASoC: codecs: wcd937x: set the comp soundwire port correctly Srinivas Kandagatla
2025-08-22 10:49 ` [PATCH v2 2/8] ASoC: codecs: wcd: add common helper for wcd codecs Srinivas Kandagatla
2025-08-22 11:18   ` Dmitry Baryshkov
2025-09-05  7:03     ` Srinivas Kandagatla
2025-09-05 13:50       ` Dmitry Baryshkov
2025-09-05 13:59         ` Srinivas Kandagatla
2025-08-22 10:49 ` [PATCH v2 3/8] ASoC: codecs: wcd-common: move WCD_SDW_CH to common Srinivas Kandagatla
2025-08-22 11:21   ` Dmitry Baryshkov
2025-08-22 10:49 ` [PATCH v2 4/8] ASoC: codecs: wcd-common: move component ops " Srinivas Kandagatla
2025-08-22 11:28   ` Dmitry Baryshkov
2025-08-22 10:49 ` [PATCH v2 5/8] ASoC: codecs: wcd939x: get regmap directly Srinivas Kandagatla
2025-08-22 10:49 ` [PATCH v2 6/8] ASoC: codecs: wcd-common: move status_update callback to common Srinivas Kandagatla
2025-08-22 11:32   ` Dmitry Baryshkov
2025-08-22 10:49 ` [PATCH v2 7/8] ASoC: codecs: wcd938x: get regmap directly Srinivas Kandagatla
2025-08-22 10:49 ` [PATCH v2 8/8] ASoC: codecs: wcd937x: " Srinivas Kandagatla

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