[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230223-asoc-mt8192-quick-fixes-v1-3-9a85f90368e1@kernel.org>
Date: Fri, 24 Feb 2023 14:03:57 +0000
From: Mark Brown <broonie@...nel.org>
To: Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
Cc: NĂcolas F. R. A. Prado
<nfraprado@...labora.com>, alsa-devel@...a-project.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
Mark Brown <broonie@...nel.org>
Subject: [PATCH 3/4] ASoC: mt8192: Report an error if when an invalid
sidetone gain is written
Reporting an error on invalid values is optional but helpful to userspace
so do so.
Signed-off-by: Mark Brown <broonie@...nel.org>
---
sound/soc/mediatek/mt8192/mt8192-dai-adda.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/mediatek/mt8192/mt8192-dai-adda.c b/sound/soc/mediatek/mt8192/mt8192-dai-adda.c
index a33d1ce33349..a02a297c0450 100644
--- a/sound/soc/mediatek/mt8192/mt8192-dai-adda.c
+++ b/sound/soc/mediatek/mt8192/mt8192-dai-adda.c
@@ -601,6 +601,8 @@ static int stf_positive_gain_set(struct snd_kcontrol *kcontrol,
POSITIVE_GAIN_MASK_SFT,
(gain_db / 6) << POSITIVE_GAIN_SFT,
&change);
+ } else {
+ return -EINVAL;
}
return change;
--
2.30.2
Powered by blists - more mailing lists