[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250814-pm4125_audio_codec_v1-v3-0-31a6ea0b368b@linaro.org>
Date: Thu, 14 Aug 2025 01:14:46 +0100
From: Alexey Klimov <alexey.klimov@...aro.org>
To: Srinivas Kandagatla <srini@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Stephen Boyd <sboyd@...nel.org>
Cc: Lee Jones <lee@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, linux-arm-msm@...r.kernel.org,
linux-sound@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>,
Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>,
christophe.jaillet@...adoo.fr, Alexey Klimov <alexey.klimov@...aro.org>
Subject: [PATCH v3 0/3] Add PM4125 audio codec driver
PMICs like PM4125 have in-built audio codec IC. The series here
adds support for this codec driver: DT bindings and codec driver
itself that consists mainly of two parts: soundwire devices and
codec part itself.
This audio codec can be found on platforms like QCM2290 and
on Qualcomm QRB2210 RB1 board.
We are working on this together with Srini
(srinivas.kandagatla@....qualcomm.com or srini@...nel.org).
This driver also has a bit limited support for concurrent playback,
since line out path is connected to left input channel.
Signed-off-by: Alexey Klimov <alexey.klimov@...aro.org>
---
Changes in v3:
-- added qcom,pm4125-codec compatible to qcom,spmi-pmic.yaml
as suggested by Krzysztof;
-- added braces around if-else branch in pm4125_probe, removed coma in
pm4125_slave_id[] as suggested by Christophe Jaillet;
-- slightly re-ordered header files in pm4125.c;
-- reworked how driver deals with regulators after Christophe Jaillet
noted that it is broken, devm_regulator_bulk_get_enable() is used,
it looks like there is no need for regulator_bulk_{disable,free};
-- PDM watchdog irqs are moved to separate (new) widgets
as suggested by Srini, therefore audio routing and events for
HPH{L,R},LO and ERA PGAs are changed;
-- extended pr_err() msg in pm4125_get_micb_vout_ctl_val();
-- small styling code adjustment in pm4125_get_compander();
-- added/reworked pm4125_bind() to add error paths
as suggested by Christophe Jaillet;
-- removed of_node_put() in pm4125_add_slave_components() after Krzysztof
pointed out that of_node_put() is out of place, it looks like
of_parse_phandle() gets the node and component_release_of() will
do of_node_put() on dev release so no need for of_node_put();
-- Link to v2: https://lore.kernel.org/r/20250711-pm4125_audio_codec_v1-v2-0-13e6f835677a@linaro.org
Changes in v2:
-- added rxclk dapm widget, fixed/changed RX1/RX2 widgets;
-- added comment for pm4125_wd_handle_irq();
-- registers access permission routines have been reworked;
-- changed pm4125_sdw_* functions to static inline;
-- cleaned a bit pm4125_{rx,tx}_sdw_channels;
-- got rid of most of hardcoded magic numbers (for the remaining regs+values I don't have documentation);
-- updated commit messages;
-- pm4125_tx_sdw_ports has been updated;
-- removed of_match_ptr() and OF ifdef;
-- removed couple of pm_runtime_mark_last_busy() calls;
-- removed swap_gnd_mic;
-- removed __pm4125_codec_enable_micbias_pullup();
-- reordered sequence of calls in pm4125_probe() to make it a bit more logical;
-- removed excessive regulator_bulk_free() and in error path in _probe();
-- re-aligned for 100-chars length;
-- removed of_node_get(), replaced with of_node_put();
-- corrected some dev_err() messages;
-- corrected some comments;
-- removed legacy "WCD" from stream_name, replaced with "PM4125";
-- removed null callbacks from struct wcd_mbhc_cb;
-- removed "HPH Type" and "HPH{L,R} Impedance";
-- pm4125_codec_enable_micbias() has been updated;
-- pm4125_micbias_control() and pm4125_codec_enable_adc have been implemented;
-- pm4125_codec_enable_dmic() has been updated;
-- cleaned struct pm4125_priv;
-- some rework to pm4125_handle_post_irq() and pm4125_regmap_irq_chip;
-- updated Kconfig+Makefile (to make things be in sorting order);
-- new patch: adding new files to MAINTAINERS file;
For dt bindings:
-- I think all requested comments from Krzysztof were implemented;
-- squashed qcom,spmi-pmic change into previous patch to avoid warnings on dtbs check;
Not done:
-- Mark suggested to look at reimplementing this as a child mfd device from
MFD PMIC without device tree description.
- Link to v1: https://lore.kernel.org/r/20250626-pm4125_audio_codec_v1-v1-0-e52933c429a0@linaro.org
---
Alexey Klimov (3):
dt-bindings: sound: add bindings for pm4125 audio codec
ASoC: codecs: add new pm4125 audio codec driver
MAINTAINERS: add Qualcomm PM4125 audio codec to drivers list
.../devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 7 +-
.../bindings/sound/qcom,pm4125-codec.yaml | 134 ++
.../devicetree/bindings/sound/qcom,pm4125-sdw.yaml | 79 +
MAINTAINERS | 2 +
sound/soc/codecs/Kconfig | 18 +
sound/soc/codecs/Makefile | 8 +
sound/soc/codecs/pm4125-sdw.c | 547 ++++++
sound/soc/codecs/pm4125.c | 1793 ++++++++++++++++++++
sound/soc/codecs/pm4125.h | 313 ++++
9 files changed, 2900 insertions(+), 1 deletion(-)
---
base-commit: 43c3c17f0c805882d1b48818b1085747a68c80ec
change-id: 20250626-pm4125_audio_codec_v1-02ca7a300ddc
Best regards,
--
Alexey Klimov <alexey.klimov@...aro.org>
Powered by blists - more mailing lists