Skip to content

Commit 18f51ed

Browse files
committed
ASoC: mt8183: Fix event generation for I2S DAI operations
ALSA control put() operations should return 0 if the value changed so that events can be generated appropriately for userspace but the custom control in the MT8183 I2S DAI driver doesn't do that, fix it. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230224-asoc-mt8183-quick-fixes-v1-2-041f29419ed5@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent d71ed1c commit 18f51ed

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

sound/soc/mediatek/mt8183/mt8183-dai-i2s.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static int mt8183_i2s_hd_set(struct snd_kcontrol *kcontrol,
141141
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
142142
struct mtk_afe_i2s_priv *i2s_priv;
143143
struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
144-
int hd_en;
144+
int hd_en, change;
145145

146146
if (ucontrol->value.enumerated.item[0] >= e->items)
147147
return -EINVAL;
@@ -155,9 +155,10 @@ static int mt8183_i2s_hd_set(struct snd_kcontrol *kcontrol,
155155
return -EINVAL;
156156
}
157157

158+
change = i2s_priv->low_jitter_en != hd_en;
158159
i2s_priv->low_jitter_en = hd_en;
159160

160-
return 0;
161+
return change;
161162
}
162163

163164
static const struct snd_kcontrol_new mtk_dai_i2s_controls[] = {

0 commit comments

Comments
 (0)