All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Zhang Yi" <zhangyi@everest-semi.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 6/7] ASoC: codecs: ES8389: Add INPUTL MUX and INPUTR MUX
Date: Tue, 09 Jun 2026 03:06:34 +0000	[thread overview]
Message-ID: <20260609030635.113F61F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260609025605.16945-7-zhangyi@everest-semi.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The newly added INPUTL MUX and INPUTR MUX controls will lose their user-configured state upon system resume, defaulting back to 'Normal' and causing the ALSA DAPM graph to desync from the physical hardware state.
--

commit c098d0e96724f95fd767bddd48bd70af52c8b3e9
Author: Zhang Yi <zhangyi@everest-semi.com>

ASoC: codecs: ES8389: Add INPUTL MUX and INPUTR MUX

This commit adds INPUTL MUX and INPUTR MUX controls to the audio routing
graph for the ES8389 codec.

> diff --git a/sound/soc/codecs/es8389.c b/sound/soc/codecs/es8389.c
> index d1bcbbfcd4754..5e4afafd9be63 100644
> --- a/sound/soc/codecs/es8389.c
> +++ b/sound/soc/codecs/es8389.c

[ ... ]

> @@ -191,6 +201,20 @@ static const unsigned int es8389_pga_values[] = {
>  	1, 5, 6
>  };
>  
> +static const struct soc_enum es8389_adcl_mux_enum =
> +	SOC_ENUM_SINGLE(ES8389_ADC_MODE, 5,
> +			ARRAY_SIZE(es8389_adcl_mux_txt), es8389_adcl_mux_txt);
> +
> +static const struct snd_kcontrol_new es8389_adcl_mux_controls =
> +	SOC_DAPM_ENUM("INPUTL MUX", es8389_adcl_mux_enum);
> +
> +static const struct soc_enum es8389_adcr_mux_enum =
> +	SOC_ENUM_SINGLE(ES8389_ADC_MODE, 4,
> +			ARRAY_SIZE(es8389_adcr_mux_txt), es8389_adcr_mux_txt);

[Severity: High]
Will the user's MUX selection be lost during system suspend and resume?

These MUX controls are backed by the ES8389_ADC_MODE register. If this
register is treated as volatile by the regmap subsystem, its value will not
be saved in the cache.

During system resume, if power was lost, es8389_init() unconditionally
clears bits 4 and 5 of ES8389_ADC_MODE, forcing the MUX back to 'Normal'.
Because the register is volatile, regcache_sync() will skip it and fail to
restore the user's selected configuration.

Does this cause the ALSA DAPM graph to desynchronize from the physical
hardware state, potentially resulting in incorrect audio routing until the
control is manually toggled again?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260609025605.16945-1-zhangyi@everest-semi.com?part=6

  reply	other threads:[~2026-06-09  3:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09  2:55 [PATCH 0/7] ASoC: codecs: ES8389: Modify the ES8389 driver Zhang Yi
2026-06-09  2:55 ` [PATCH 1/7] ASoC: codecs: ES8389: Modify volatile_register Zhang Yi
2026-06-09  3:09   ` sashiko-bot
2026-06-09  2:56 ` [PATCH 2/7] ASoC: codecs: ES8389: Fix the issue about mclk_src Zhang Yi
2026-06-09  3:11   ` sashiko-bot
2026-06-09  2:56 ` [PATCH 3/7] ASoC: codecs: ES8389: Modify the clock table Zhang Yi
2026-06-09  3:09   ` sashiko-bot
2026-06-09  2:56 ` [PATCH 4/7] ASoC: codecs: ES8389: Modify the initial configuration Zhang Yi
2026-06-09  2:56 ` [PATCH 5/7] ASoC: codecs: ES8389: Add private members related to HPF Zhang Yi
2026-06-09  3:07   ` sashiko-bot
2026-06-09  2:56 ` [PATCH 6/7] ASoC: codecs: ES8389: Add INPUTL MUX and INPUTR MUX Zhang Yi
2026-06-09  3:06   ` sashiko-bot [this message]
2026-06-09  2:56 ` [PATCH 7/7] ASoC: dt-bindings: ES8389: Add members about HPF Zhang Yi
2026-06-09  3:01   ` sashiko-bot
  -- strict thread matches above, loose matches on Subject: below --
2026-06-09  3:06 [PATCH 0/7] ASoC: codecs: ES8389: Modify the ES8389 driver Zhang Yi
2026-06-09  3:06 ` [PATCH 6/7] ASoC: codecs: ES8389: Add INPUTL MUX and INPUTR MUX Zhang Yi
2026-06-09  3:21   ` sashiko-bot
2026-06-09  7:17 [PATCH 0/7] ASoC: codecs: ES8389: Modify the ES8389 driver Zhang Yi
2026-06-09  7:17 ` [PATCH 6/7] ASoC: codecs: ES8389: Add INPUTL MUX and INPUTR MUX Zhang Yi

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=20260609030635.113F61F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=zhangyi@everest-semi.com \
    /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.