From: Mark Brown <broonie@kernel.org>
To: Sheetal <sheetal@nvidia.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Thierry Reding <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
Sameer Pujar <spujar@nvidia.com>,
Mohan Kumar <mkumard@nvidia.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
linux-sound@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ASoC: tegra: Add per-stream Mixer Fade controls
Date: Thu, 30 Apr 2026 14:59:57 +0900 [thread overview]
Message-ID: <afLv3S6kWnt0D6PW@sirena.co.uk> (raw)
In-Reply-To: <20260429070603.2791011-1-sheetal@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 1895 bytes --]
On Wed, Apr 29, 2026 at 07:06:03AM +0000, Sheetal wrote:
> Add per-stream fade controls for the Tegra mixer to allow
> independently configuring target gain and fade duration for each of
> the 10 input streams (RX1 through RX10).
> +static int tegra210_mixer_get_fade_status(struct snd_kcontrol *kcontrol,
> + struct snd_ctl_elem_value *ucontrol)
> +{
> + if (count >= mixer->duration[id]) {
> + ucontrol->value.integer.value[id] = TEGRA210_MIXER_FADE_COMPLETE;
> + regmap_update_bits(mixer->regmap,
> + MIXER_REG(TEGRA210_MIXER_RX1_CTRL, id),
> + TEGRA210_MIXER_SAMPLE_COUNT_ENABLE, 0);
> + mixer->in_fade[id] = false;
> + } else {
> + ucontrol->value.integer.value[id] = TEGRA210_MIXER_FADE_ACTIVE;
> + }
Is the _FADE_COMPLETE state a good idea here? Only the first read after
a fade will show it, and functionally it's the same as _IDLE - there's
no current fade running.
Also is there any overhead to having the sample counting enabled? This
is the only thing that turns it off AFAICT so if userspace doesn't look
at the control we'll just leave it running indefinitely. Perhaps a
timer to disable might be useful? It's generally a bit odd that we have
a write to the hardware in a get().
> + SOC_SINGLE_EXT("Fade Enable", SND_SOC_NOPM, 0, 1, 0,
> + tegra210_mixer_get_fade_enable,
> + tegra210_mixer_put_fade_enable),
Fade Switch.
> struct tegra210_mixer {
> int gain_value[TEGRA210_MIXER_RX_MAX];
> + u32 duration[TEGRA210_MIXER_RX_MAX];
> + bool in_fade[TEGRA210_MIXER_RX_MAX];
> + bool fade_pending[TEGRA210_MIXER_RX_MAX];
> struct regmap *regmap;
> };
gain_value is used by the existing RX n Gain Volume controls, don't we
need separate data for the fade controls here, or should we just have
the new Fade Gain controls? Having the separate controls is more
complicated.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-04-30 5:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 7:06 [PATCH v2] ASoC: tegra: Add per-stream Mixer Fade controls Sheetal
2026-04-30 5:59 ` Mark Brown [this message]
2026-04-30 9:42 ` Sheetal .
2026-04-30 10:41 ` 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=afLv3S6kWnt0D6PW@sirena.co.uk \
--to=broonie@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mkumard@nvidia.com \
--cc=perex@perex.cz \
--cc=sheetal@nvidia.com \
--cc=spujar@nvidia.com \
--cc=thierry.reding@kernel.org \
--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