[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250716123323.5831-1-srinivas.kandagatla@oss.qualcomm.com>
Date: Wed, 16 Jul 2025 13:33:18 +0100
From: srinivas.kandagatla@....qualcomm.com
To: broonie@...nel.org
Cc: lgirdwood@...il.com, perex@...ex.cz, tiwai@...e.com, srini@...nel.org,
linux-kernel@...r.kernel.org, linux-sound@...r.kernel.org,
linux-arm-msm@...r.kernel.org, neil.armstrong@...aro.org,
krzysztof.kozlowski@...aro.org,
Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
Subject: [PATCH 0/5] ASoC: codecs: wcd93xxx: remove code duplication
From: Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
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 a some 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.
Srinivas Kandagatla (5):
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: move to using dev_get_regmap
ASoC: codecs: wcd-common: move status_update callback to common
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 | 75 ++++--------------
sound/soc/codecs/wcd937x.h | 22 ++----
sound/soc/codecs/wcd938x-sdw.c | 65 ++-------------
sound/soc/codecs/wcd938x.c | 89 ++++-----------------
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, 303 insertions(+), 501 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