From: sashiko-bot@kernel.org
To: "Richard Acayan" <mailingradian@gmail.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v6 15/15] ASoC: msm8916-wcd-analog: add quirk for cajon 2.0
Date: Thu, 30 Jul 2026 18:03:20 +0000 [thread overview]
Message-ID: <20260730180320.930291F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260730174353.108023-16-mailingradian@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The 20ms delay and TEST bit clear in `POST_PMD` for HPHL/HPHR PAs execute before the digital codec has powered down, contradicting the hardware requirement and potentially violating hardware constraints.
--
--- Patch [15]: [PATCH v6 15/15] ASoC: msm8916-wcd-analog: add quirk for cajon 2.0 ---
commit 3ee3737216b7e26df5f18202ad771c230e2fa0e3
Author: Richard Acayan <mailingradian@gmail.com>
ASoC: msm8916-wcd-analog: add quirk for cajon 2.0
The codec version CAJON_2_0 on the Snapdragon 670 requires touching the
HPH test registers. Add the quirk so this driver can also support
SDM670.
> diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c
> index b9325290c28d9..87f8a47cc293f 100644
> --- a/sound/soc/codecs/msm8916-wcd-analog.c
> +++ b/sound/soc/codecs/msm8916-wcd-analog.c
[ ... ]
> @@ -705,6 +707,59 @@ static int pm8916_wcd_analog_enable_ear_pa(struct snd_soc_dapm_widget *w,
> return 0;
> }
>
> +static int pm8916_wcd_analog_enable_hphl_pa(struct snd_soc_dapm_widget *w,
> + struct snd_kcontrol *kcontrol,
> + int event)
> +{
[ ... ]
> + switch (event) {
> + case SND_SOC_DAPM_POST_PMU:
> + usleep_range(7000, 7100);
> + snd_soc_component_update_bits(component, CDC_A_RX_HPH_L_TEST,
> + 0x04, 0x04);
> + break;
> + case SND_SOC_DAPM_POST_PMD:
> + /* wait 20 ms after the digital codec has powered down */
> + msleep(20);
> + snd_soc_component_update_bits(component, CDC_A_RX_HPH_L_TEST,
> + 0x04, 0x00);
> + break;
[Severity: High]
Will this POST_PMD event actually wait until after the digital codec has
powered down?
During the DAPM power-down sequence, PGAs are processed (sequence 6) before
Mixers (sequence 7), DACs (sequence 8), and AIFs (sequence 12). Since this
event is attached to the "HPHL PA" PGA widget, the POST_PMD event will execute
immediately after the PA powers down, which is before the digital codec (DACs,
Mixers, AIFs) powers down.
Could this premature delay and test bit clearing cause audible pops or
hardware instability?
> + }
> + return 0;
> +}
> +
> +static int pm8916_wcd_analog_enable_hphr_pa(struct snd_soc_dapm_widget *w,
> + struct snd_kcontrol *kcontrol,
> + int event)
> +{
[ ... ]
> + switch (event) {
> + case SND_SOC_DAPM_POST_PMU:
> + usleep_range(7000, 7100);
> + snd_soc_component_update_bits(component, CDC_A_RX_HPH_R_TEST,
> + 0x04, 0x04);
> + break;
> + case SND_SOC_DAPM_POST_PMD:
> + msleep(20);
> + snd_soc_component_update_bits(component, CDC_A_RX_HPH_R_TEST,
> + 0x04, 0x00);
> + break;
[Severity: High]
Similarly here, does this execute before the digital codec powers down?
Since "HPHR PA" is also a PGA widget, it seems the 20ms sleep and TEST bit
clear will occur while the digital codec is still powered on, just like the
left channel.
> + }
> + return 0;
> +}
[ ... ]
> @@ -954,11 +1009,15 @@ static const struct snd_soc_dapm_widget pm8916_wcd_analog_dapm_widgets[] = {
> SND_SOC_DAPM_MUX("EAR_S", SND_SOC_NOPM, 0, 0, &ear_mux),
> SND_SOC_DAPM_SUPPLY("EAR CP", CDC_A_NCP_EN, 4, 0, NULL, 0),
>
> - SND_SOC_DAPM_PGA("HPHL PA", CDC_A_RX_HPH_CNP_EN, 5, 0, NULL, 0),
> + SND_SOC_DAPM_PGA_E("HPHL PA", CDC_A_RX_HPH_CNP_EN, 5, 0, NULL, 0,
> + pm8916_wcd_analog_enable_hphl_pa,
> + SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
> SND_SOC_DAPM_MUX("HPHL", SND_SOC_NOPM, 0, 0, &hphl_mux),
> SND_SOC_DAPM_MIXER("HPHL DAC", CDC_A_RX_HPH_L_PA_DAC_CTL, 3, 0, NULL,
> 0),
> - SND_SOC_DAPM_PGA("HPHR PA", CDC_A_RX_HPH_CNP_EN, 4, 0, NULL, 0),
> + SND_SOC_DAPM_PGA_E("HPHR PA", CDC_A_RX_HPH_CNP_EN, 4, 0, NULL, 0,
> + pm8916_wcd_analog_enable_hphr_pa,
> + SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730174353.108023-1-mailingradian@gmail.com?part=15
prev parent reply other threads:[~2026-07-30 18:03 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 17:43 [PATCH v6 00/15] SDM660 sound card and internal MI2S support Richard Acayan
2026-07-30 17:43 ` [PATCH v6 01/15] ASoC: dt-bindings: qcom,sm8250: add compatible for sdm660 Richard Acayan
2026-07-30 17:43 ` [PATCH v6 02/15] ASoC: dt-bindings: qcom: q6dsp: add support for lpi mi2s ports 5-6 Richard Acayan
2026-07-30 17:43 ` [PATCH v6 03/15] ASoC: dt-bindings: pm8916-wcd-analog-codec: Document pm8950/pm8953 Richard Acayan
2026-07-30 17:43 ` [PATCH v6 04/15] ASoC: dt-bindings: pm8916-analog-codec: Add PM660L compatible Richard Acayan
2026-07-30 17:43 ` [PATCH v6 05/15] ASoC: dt-bindings: msm8916-digital-codec: Add SDM660 compatible Richard Acayan
2026-07-30 17:43 ` [PATCH v6 06/15] ASoC: qdsp6: q6dsp-lpass-ports: add support for lpi mi2s ports 5-6 Richard Acayan
2026-07-30 18:15 ` sashiko-bot
2026-07-30 22:49 ` Srinivas Kandagatla
2026-07-30 17:43 ` [PATCH v6 07/15] ASoC: qdsp6: q6afe: add internal mi2s support Richard Acayan
2026-07-30 18:21 ` sashiko-bot
2026-07-30 22:51 ` Srinivas Kandagatla
2026-07-30 17:43 ` [PATCH v6 08/15] ASoC: qdsp6: q6afe-dai: " Richard Acayan
2026-07-30 18:06 ` sashiko-bot
2026-07-30 22:55 ` Srinivas Kandagatla
2026-07-30 17:43 ` [PATCH v6 09/15] ASoC: qdsp6: q6routing: add lpi " Richard Acayan
2026-07-30 22:57 ` Srinivas Kandagatla
2026-07-30 17:43 ` [PATCH v6 10/15] ASoC: qdsp6: common: support headphone jacks connected to lpi mi2s Richard Acayan
2026-07-30 17:43 ` [PATCH v6 11/15] ASoC: qcom: sm8250: add support for LPI_MI2S_RX_0 and LPI_MI2S_TX_3 Richard Acayan
2026-07-30 18:02 ` sashiko-bot
2026-07-30 17:43 ` [PATCH v6 12/15] ASoC: qcom: sm8250: add SDM660 compatible Richard Acayan
2026-07-30 17:43 ` [PATCH v6 13/15] ASoC: msm8916-wcd-analog: add pm8950 codec Richard Acayan
2026-07-30 17:59 ` sashiko-bot
2026-07-30 17:43 ` [PATCH v6 14/15] ASoC: msm8916-wcd-analog: add pm8953 codec Richard Acayan
2026-07-30 18:03 ` sashiko-bot
2026-07-30 17:43 ` [PATCH v6 15/15] ASoC: msm8916-wcd-analog: add quirk for cajon 2.0 Richard Acayan
2026-07-30 18:03 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260730180320.930291F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=mailingradian@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.