Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Matthew Schwartz <matthew.schwartz@linux.dev>
To: Lee Mann <leepaulmann@gmail.com>,
	broonie@kernel.org, lgirdwood@gmail.com,
	linux-sound@vger.kernel.org
Cc: shenghao-ding@ti.com, kevin-lu@ti.com, baojun.xu@ti.com,
	sen@ti.com, perex@perex.cz, tiwai@suse.com,
	andrey.golovko@gmail.com, antoine@montane.tech,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: tas2783-sdw: restore the volume controls after re-initialisation
Date: Sat, 17 Oct 2026 22:37:18 -0700	[thread overview]
Message-ID: <9eff39cf-24a1-47f8-ad78-781d467cbfaf@linux.dev> (raw)
In-Reply-To: <20261016102846.22908-1-leepaulmann@gmail.com>

On 10/16/26 3:28 AM, Lee Mann wrote:
> -	return snd_soc_put_volsw(kcontrol, ucontrol);
> +	struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
> +	struct tas2783_prv *tas_dev = snd_soc_component_get_drvdata(component);
> +	s32 ret = snd_soc_put_volsw(kcontrol, ucontrol);
> +
> +	if (ret >= 0)
> +		tas2783_save_vol(tas_dev, TAS2783_DVC_LVL,
> +				 &tas_dev->user_dvc_lvl, &tas_dev->user_dvc_set);


Hi Lee,

I ran into the same bug bringing up the ASUS ROG Xbox Ally X20 (two
TAS2783 on one AMD link), and there's one more case this doesn't cover.

On for-next idle_bias_on is 0, so the amps runtime suspend whenever
nothing is playing. The cache is dropped on attach and after the
firmware download, so until something writes the volume registers
again they aren't cached, and snd_soc_get_volsw()/put_volsw() fail with
-EBUSY from regmap in cache-only mode while the amp is suspended. Your
restore fixes that once a value has been set during playback, but at
boot nothing has set it yet, so the first mixer accesses fail and every
boot logs "ASoC error (-16)" for both registers. On the X20 the link
is also powered off when idle, so the amps are re-initialized on every
wake, not just after system suspend.

I have a fix I was working on that addresses the same issue but keeps
both values in the driver instead of the register cache, so get/put
work while the amp is suspended and the values are programmed again
after every init and resume. It's part of a small series with two
other tas2783 fixes. I'll post it shortly with you on Cc with a
Reported-by on the relevant patch if that's okay with you.

Thanks,
Matt

  reply	other threads:[~2026-10-18  5:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 10:28 [PATCH] ASoC: tas2783-sdw: restore the volume controls after re-initialisation Lee Mann
2026-10-18  5:37 ` Matthew Schwartz [this message]
2026-10-18 10:40   ` Lee Mann

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=9eff39cf-24a1-47f8-ad78-781d467cbfaf@linux.dev \
    --to=matthew.schwartz@linux.dev \
    --cc=andrey.golovko@gmail.com \
    --cc=antoine@montane.tech \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=kevin-lu@ti.com \
    --cc=leepaulmann@gmail.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=sen@ti.com \
    --cc=shenghao-ding@ti.com \
    --cc=tiwai@suse.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