[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7f0c54a3-642a-4516-8f9a-3c10f5e3b8a6@oss.qualcomm.com>
Date: Tue, 16 Sep 2025 14:28:28 +0100
From: Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
To: Alexey Klimov <alexey.klimov@...aro.org>,
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
Subject: Re: [PATCH v4 0/4] Add PM4125 audio codec driver
On 9/15/25 5:27 PM, Alexey Klimov wrote:
> 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>
>
Thanks Alexey for these patches,
I have now tested this series for headset playback, record and lineout.
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
--srini
---
> Changes in v4:
> - clean SDW ports/channels as suggested by Srini;
> - Srini implemented refcounting for global mbias (we didn't manage to make it proper DAPM widget);
> - patch for qcom,spmi-pmic.yaml moved to separate commit
> and "contains" is removed there;
> - rx_clk_cnt removed;
> - HPH{R,L}_COMP kcontrols fixed;
> - removed unneeded kcontrols (LO Switch, DMIC Switches, MBHC Switch);
> - removed "RDAC3", NULL, "RX1";
> - pass dev pointer to pm4125_get_micb_vout_ctl_val();
> - Link to v3: https://lore.kernel.org/r/20250814-pm4125_audio_codec_v1-v3-0-31a6ea0b368b@linaro.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 (4):
> dt-bindings: sound: add bindings for pm4125 audio codec
> dt-bindings: mfd: qcom,spmi-pmic: add qcom,pm4125-codec compatible
> ASoC: codecs: add new pm4125 audio codec driver
> MAINTAINERS: add Qualcomm PM4125 audio codec to drivers list
>
> .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 6 +
> .../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 | 545 ++++++
> sound/soc/codecs/pm4125.c | 1780 ++++++++++++++++++++
> sound/soc/codecs/pm4125.h | 307 ++++
> 9 files changed, 2879 insertions(+)
> ---
> base-commit: 590b221ed4256fd6c34d3dea77aa5bd6e741bbc1
> change-id: 20250626-pm4125_audio_codec_v1-02ca7a300ddc
>
> Best regards,
Powered by blists - more mailing lists