Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: shumingf@realtek.com, broonie@kernel.org, lgirdwood@gmail.com
Cc: linux-sound@vger.kernel.org, lars@metafoo.de, flove@realtek.com,
	oder_chiou@realtek.com, jack.yu@realtek.com,
	derek.fang@realtek.com
Subject: Re: [PATCH] ASoC: rt1320: avoid re-initialize in advanced mode
Date: Wed, 9 Sep 2026 13:27:22 +0200	[thread overview]
Message-ID: <3922a062-2e5a-4b9f-9d7b-34e41eb6c4a5@linux.dev> (raw)
In-Reply-To: <20260909091806.872977-1-shumingf@realtek.com>

On 9/9/26 11:18, shumingf@realtek.com wrote:
> From: Shuming Fan <shumingf@realtek.com>
> 
> On some machines, speaker protection is enabled.
> We call this advanced mode, which loads the DSP firmware and changes settings
> based on the basic mode, including blind writes.
> The amplifier can retain the advanced mode settings until a POR or power loss occurs.
> Therefore, the driver does not need to switch from basic mode to advanced mode
> when the system performs a warm reboot.
> We only need to check the function_status to determine
> whether the system has undergone a cold or warm reboot.
> 
> Fixes: 9b30521074f0 ("ASoC: rt1320: run the initialisation preset on the first hardware init")
> Signed-off-by: Shuming Fan <shumingf@realtek.com>

LGTM

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>

this should also be done for all existing SDCA devices, no?

> ---
>  sound/soc/codecs/rt1320-sdw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c
> index 72af413306fa..444a91755be9 100644
> --- a/sound/soc/codecs/rt1320-sdw.c
> +++ b/sound/soc/codecs/rt1320-sdw.c
> @@ -2470,7 +2470,7 @@ static int rt1320_io_init(struct device *dev, struct sdw_slave *slave)
>  	dev_dbg(dev, "%s amp func_status=0x%x\n", __func__, amp_func_status);
>  
>  	/* initialization write */
> -	if ((amp_func_status & FUNCTION_NEEDS_INITIALIZATION) || !rt1320->first_hw_init) {
> +	if ((amp_func_status & FUNCTION_NEEDS_INITIALIZATION)) {
>  		switch (rt1320->dev_id) {
>  		case RT1320_DEV_ID:
>  			if (rt1320->version_id < RT1320_VC)


  reply	other threads:[~2026-09-09 11:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09  9:18 [PATCH] ASoC: rt1320: avoid re-initialize in advanced mode shumingf
2026-09-09 11:27 ` Pierre-Louis Bossart [this message]
2026-09-09 17:54 ` Mark Brown

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=3922a062-2e5a-4b9f-9d7b-34e41eb6c4a5@linux.dev \
    --to=pierre-louis.bossart@linux.dev \
    --cc=broonie@kernel.org \
    --cc=derek.fang@realtek.com \
    --cc=flove@realtek.com \
    --cc=jack.yu@realtek.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=oder_chiou@realtek.com \
    --cc=shumingf@realtek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox