Skip to content

Commit

Permalink
ASoC: wm_adsp: Correct wm_coeff_tlv_get handling
Browse files Browse the repository at this point in the history
[ Upstream commit dd6fb8f ]

When wm_coeff_tlv_get was updated it was accidentally switch to the _raw
version of the helper causing it to ignore the current DSP state it
should be checking. Switch the code back to the correct helper so that
users can't read the controls when they arn't available.

Fixes: 73ecf1a ("ASoC: wm_adsp: Correct cache handling of new kernel control API")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210626155941.12251-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
charleskeepax authored and gregkh committed Jul 28, 2021
1 parent 57efe4f commit 3b6c430
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/wm_adsp.c
Expand Up @@ -1221,7 +1221,7 @@ static int wm_coeff_tlv_get(struct snd_kcontrol *kctl,

mutex_lock(&ctl->dsp->pwr_lock);

ret = wm_coeff_read_ctrl_raw(ctl, ctl->cache, size);
ret = wm_coeff_read_ctrl(ctl, ctl->cache, size);

if (!ret && copy_to_user(bytes, ctl->cache, size))
ret = -EFAULT;
Expand Down

0 comments on commit 3b6c430

Please sign in to comment.