[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250822104927.2621866-1-srinivas.kandagatla@oss.qualcomm.com>
Date: Fri, 22 Aug 2025 11:49:19 +0100
From: Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
To: broonie@...nel.org
Cc: perex@...ex.cz, tiwai@...e.com, srini@...nel.org, lgirdwood@...il.com,
linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, krzysztof.kozlowski@...aro.org,
neil.armstrong@...aro.org,
Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
Subject: [PATCH v2 0/8] ASoC: codecs: wcd93xxx: remove code duplication
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
Powered by blists - more mailing lists