* [PATCH] ASoC: es8328: Fix event generation for deemphasis control
@ 2022-06-03 12:39 Mark Brown
2022-06-07 10:46 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2022-06-03 12:39 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel, Mark Brown
Currently the put() method for the deemphasis control returns 0 when a new
value is written to the control even if the value changed, meaning events
are not generated. Fix this, skip the work of updating the value when it is
unchanged and then return 1 after having done so.
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/es8328.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/es8328.c b/sound/soc/codecs/es8328.c
index 3f00ead97006..dd53dfd87b04 100644
--- a/sound/soc/codecs/es8328.c
+++ b/sound/soc/codecs/es8328.c
@@ -161,13 +161,16 @@ static int es8328_put_deemph(struct snd_kcontrol *kcontrol,
if (deemph > 1)
return -EINVAL;
+ if (es8328->deemph == deemph)
+ return 0;
+
ret = es8328_set_deemph(component);
if (ret < 0)
return ret;
es8328->deemph = deemph;
- return 0;
+ return 1;
}
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: es8328: Fix event generation for deemphasis control
2022-06-03 12:39 [PATCH] ASoC: es8328: Fix event generation for deemphasis control Mark Brown
@ 2022-06-07 10:46 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-06-07 10:46 UTC (permalink / raw)
To: broonie, Liam Girdwood; +Cc: alsa-devel
On Fri, 3 Jun 2022 14:39:37 +0200, Mark Brown wrote:
> Currently the put() method for the deemphasis control returns 0 when a new
> value is written to the control even if the value changed, meaning events
> are not generated. Fix this, skip the work of updating the value when it is
> unchanged and then return 1 after having done so.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: es8328: Fix event generation for deemphasis control
commit: 8259610c2ec01c5cbfb61882ae176aabacac9c19
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-07 10:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-03 12:39 [PATCH] ASoC: es8328: Fix event generation for deemphasis control Mark Brown
2022-06-07 10:46 ` Mark Brown
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.