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 v3] ASoC: tegra: Add per-stream Mixer Fade controls
Date: Tue, 5 May 2026 10:33:32 +0900 [thread overview]
Message-ID: <aflI7IFr6nt05g4R@sirena.co.uk> (raw)
In-Reply-To: <20260504100051.3820808-1-sheetal@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 1186 bytes --]
On Mon, May 04, 2026 at 10:00:51AM +0000, Sheetal wrote:
> +static int tegra210_mixer_put_fade_duration(struct snd_kcontrol *kcontrol,
> + struct snd_ctl_elem_value *ucontrol)
> +{
> + struct soc_mixer_control *mc =
> + (struct soc_mixer_control *)kcontrol->private_value;
> + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol);
> + struct tegra210_mixer *mixer = snd_soc_component_get_drvdata(cmpnt);
> + unsigned int id = mc->reg;
> + u32 duration = ucontrol->value.integer.value[0];
> +
> + if (duration == 0)
> + return -EINVAL;
> +
> + if (mixer->duration[id] == duration)
> + return 0;
> +
> + mixer->duration[id] = duration;
> + mixer->fade_pending[id] = true;
> +
> + return 1;
We're not validating against TEGRA210_MIXER_FADE_DURATION_MAX here,
similarly for the gain.
> +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_IDLE;
> + mixer->in_fade[id] = false;
This doesn't disable the sample counting so subsequent enables will be
noops (due to use of _update_bits()).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2026-05-05 1:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 10:00 [PATCH v3] ASoC: tegra: Add per-stream Mixer Fade controls Sheetal
2026-05-05 1:33 ` Mark Brown [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=aflI7IFr6nt05g4R@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